国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫cs250編程、代做C++程序語言
代寫cs250編程、代做C++程序語言

時間:2024-11-07  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



Project 5: Profiling an Assembly Program
Goal
In this project you will learn how to find where a program spends most of the execution time
using statistical profiling, and you will implement your own statistical profiler.
Task 0: Download the initial sources and start tsearch_asm6.s
To start your project clone the project5 repository:
git clone /homes/cs250/sourcecontrol/work/$USER/project5-src.git
cd project5-src
The implementation of binary tree search in C is similar to the one from project4. You will copy
your implementation from tsearch_asm5.s into tsearch_asm6.s
To test the implementation type
data 149 $ ./run_bench.sh
================== Running TreeSearch Iterative in C benchmark ================
Total CPU time: 4.125084397 seconds
real 0m7.960s
user 0m7.830s
sys 0m0.124s
================== Running ASM 6 benchmark ================

It will also try to run the tsearch_asm6.s but it will fail if it is not implemented yet.
Task 1:Insert profiling code in the benchmark
The file profil.c implements the code that starts profiling the program, and writes the histogram
of the file at the end:
void start_histogram();
void print_histogram();
Open the file profil.c and see how start_histogram creates an array of counters, that is passed
to profil(), that creates the execution histogram. See "man profil". This histogram is an array of
integers, where every integer represents an instruction or group of instruction. profil() activates a
timer that every .01secs looks at the program counter of the program, and increments the
counter in the histogram that corresponds to that program counter.
Open the file tsearch_bench_better.c and find the main(). Then above main, you will insert the
external prototypes of start_histogram() and print_histogram(): as follows. Also call
start_histogram() at the beginning of main() and print_histogram() at the end.
extern void start_histogram();
extern void print_histogram();
/*
* Main program function. Runs the benchmark.
*/
__attribute__ (( visibility("default") ))
int
main(int argc, char **argv)
start_histogram();
…..
print_histogram();
}
Modify run_bench, so both gcc compilation commands link profil.c
echo ================== Running TreeSearch Iterative in C benchmark ================
gcc -g -static -o tsearch_bench_iterative_c tsearch_bench_better.c tsearch.c AVLTree.c tsearch_iterative.c profil.c || exit 1

gcc -g -static -o tsearch_bench_asm6 tsearch_bench_better.c tsearch.c AVLTree.c tsearch_asm6.s profil.c || exit 1

Now type run_bench.
data149 $ ./run_bench.sh
You will find the following file:
ls *.hist
tsearch_bench_iterative_c.hist
Open this file, and you will observe that it contains the program counters in the histogram that
are larger than 0. The counter is multiplied by 1ms, so the counters are displayed in ms. Identify
the program counter where the program is spent most of its time:

0x45b86a 60ms
0x45b870 1120ms
0x45b878 10ms
0x45b87c 30ms

Then run the command "nm -v tsearch_bench_iterative_c | less"that prints all the functions in
the program sorted by address, and finds the function that includes this program counter. Use
the up/down arrow keys to navigate "less".
data 163 $ nm -v tsearch_bench_iterative_c | less
….
000000000045aee0 T __stpcpy_evex
000000000045b340 T __strchr_evex
000000000045b5e0 T __strchrnul_evex
000000000045b840 T __strcmp_evex
000000000045bcb0 T __strcpy_evex
000000000045c100 T __strlen_evex
000000000045c280 T __strncmp_evex
000000000045c7f0 T __strncpy_evex
….
__strcmp_evex is the function where tsearch_bench_iterative_c spends most of its time.
Now to find the assembly instruction type "objdump -d tsearch_bench_iterative_c | less" that
prints the assembly instructions that make the program and their address in the program. Find
the assembly instruction that includes the counter 45b870, that is 45b86c . This is because
0x45b870 is larger than 45b86c but smaller than 45b8**.
objdump -d tsearch_bench_iterative_c | less
000000000045b840 <__strcmp_evex>:
45b840: f3 0f 1e fa endbr64
45b844: 89 f8 mov %edi,%eax
45b846: 31 d2 xor %edx,%edx
45b848: 62 a1 fd 00 ef c0 vpxorq %xmm16,%xmm16,%xmm16
45b84e: 09 f0 or %esi,%eax
45b850: 25 ff 0f 00 00 and $0xfff,%eax
45b855: 3d 80 0f 00 00 cmp $0xf80,%eax
45b85a: 0f 8f 70 03 00 00 jg 45bbd0 <__strcmp_evex+0x3**>
45b860: 62 e1 fe 28 6f 0f vmovdqu64 (%rdi),%ymm17
45b866: 62 b2 75 20 26 d1 vptestmb %ymm17,%ymm17,%k2
45b86c: 62 f3 75 22 3f 0e 00 vpcmpeqb (%rsi),%ymm17,%k1{%k2}
45b8**: c5 fb 93 c9 kmovd %k1,%ecx
45b877: ff c1 inc %ecx
45b879: 74 45 je 45b8c0 <__strcmp_evex+0x80>
45b87b: f3 0f bc d1 tzcnt %ecx,%edx
45b87f: 0f b6 04 17 movzbl (%rdi,%rdx,1),%eax
The instruction marked in red is the instruction that is taking the most time.
Task 2: Write your own profiler program.
Using the example in Task1, write a program myprof.c that prints a table with the top 10
functions where the program spends most of its time and it will also print for each function,
which instructions take most of the time . The program will take the following arguments:
myprof prog
The program will open prog.hist, and store the entries in an array of structs with the program
counter and the time in ms. Then it will call system("nm -v prog > nm.out") using the system()
function (see man system) that executes a command inside a C program, and redirect it into a
file nm.out. Myprof will read nm.out, and it will also store the entries in an array of structs with
program counters and function names. Then for every pc in the histogram, it will increment the
time in ms of the corresponding function. After this is done, it will sort the functions by time, and
identify the 10 top functions where the execution spends most of the time. Finally, it will also
print the assembly code of these functions using objdump, and print the time spend in each
assembly instruction. Only the instructions with a time greater than 0 are printed.
The output will look like the following example:
myprof tsearch_bench_iterative_c
Top 10 functions:
ith Function Time(ms) (%)
1: mystrcmp 120ms 25%
2: malloc 80ms 36%
….
Top 10 functions Assembly
1: mystrcmp 120ms 25%
120ms 42cf60: f6 c2 20 test $0x20,%dl
2: malloc 80ms 36%
20ms 4628cc: 48 89 de mov %rbx,%rsi
10ms 4628cf: e8 cc e3 ff ff call 460ca0
Task 3:Using your profiler, improve your tsearch_asm6.s
Using your profiler, optimize your implementation in tsearch_asm6.s
Grading
The grading will be done during lab time. You don't need to turn in the implementation since the
git repository will have your most recent implementation.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp




 

掃一掃在手機打開當前頁
  • 上一篇:代做COMP3230、Python語言程序代寫
  • 下一篇:MSE 280代做、代寫C++,Python程序
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久久久欧美精品| 久久天堂电影网| 亚洲国产另类久久久精品极度| av动漫在线观看| 国内揄拍国内精品| 青青青在线视频播放| 日本精品久久久久影院| 午夜老司机精品| 亚洲一区二区三区久久| 亚洲一区三区电影在线观看 | 欧美又粗又长又爽做受| 日韩**中文字幕毛片| 亚洲精品在线视频观看| 国产精品久久久久久五月尺| 9191国产视频| 9191国产视频| 久久人人爽人人爽人人片av高请| 国产日本欧美在线观看| 国产在线视频91| 国内精品国语自产拍在线观看| 日韩精品在在线一区二区中文| 日本免费成人网| 日本a在线天堂| 日韩久久久久久久久久久久| 青青在线免费观看| 欧美无砖专区免费| 欧美精品一区二区三区四区五区 | 日日碰狠狠丁香久燥| 熟女少妇精品一区二区| 一区二区视频在线观看| 亚洲欧洲精品一区二区三区波多野1战4| 久久久久久91| 日韩资源av在线| 欧美一区观看| 国产自产女人91一区在线观看| 国产一区二区三区小说| 国产伦精品一区二区三区免| 国产精品一区二区a| 97公开免费视频| 久久国产色av免费观看| 久久精品国产2020观看福利| 国产精品二区三区| 中文字幕无码不卡免费视频| 午夜免费久久久久| 午夜久久资源| 热99久久精品| 国产日韩亚洲欧美在线| 久久天天狠狠| 国产精品久久久影院| 欧美激情亚洲视频| 视频一区国产精品| 激情视频一区二区| 91久久久久久久久| 久久最新资源网| 亚洲熟女乱色一区二区三区 | 免费看成人午夜电影| 成人免费91在线看| 久久天天狠狠| 国产精品久久久久久久午夜| 久久综合伊人77777| 亚洲国产日韩综合一区| 任我爽在线视频精品一| 国产素人在线观看| 国产福利精品av综合导导航| 精品国产乱码久久久久久88av| 日本精品视频在线| 不卡中文字幕在线| 国产精品无码人妻一区二区在线 | 久久精品视频亚洲| 亚洲日本欧美在线| 欧美少妇一区二区三区| 高清视频在线观看一区| 国产成人精品综合| 亚洲精品在线免费| 国产又黄又爽免费视频| 久久超碰亚洲| 九九久久国产精品| 午夜欧美一区二区三区免费观看| 欧美亚洲视频在线看网址| 狠狠色噜噜狠狠色综合久| 麻豆成人在线看| 精品人妻一区二区三区四区在线| 国产熟女高潮视频| 久久免费视频网| 久久中文字幕国产| 日本高清视频精品| 91久久偷偷做嫩草影院| 欧美成人精品在线| 热草久综合在线| 久久久亚洲天堂| 亚洲一区尤物| 成人精品网站在线观看| 国产精品久久久久久久久久久久久久 | 精品国产一区二区三区麻豆小说| 亚洲日本精品国产第一区| 欧美高清性xxxxhdvideosex| 日韩在线观看网址| 涩涩日韩在线| 国产精品一区二区三区在线 | 欧美成人午夜剧场免费观看| 无码播放一区二区三区| 国产欧美日韩亚洲精品| 久久精品国产美女| 欧美一区二区三区在线免费观看 | 亚洲精品乱码视频| 国产在线观看精品| 国产chinese精品一区二区| 欧美一区二区三区四区在线观看地址| 国产精品一区二区久久| 国产精品乱码| 免费特级黄色片| 深夜福利一区二区| 日韩精品在线视频免费观看| 国产成人在线小视频| 大地资源第二页在线观看高清版| 国产精品亚洲第一区| 久久国产精品亚洲| 国产伦精品一区| 中文字幕一区二区三区四区五区 | 国产免费内射又粗又爽密桃视频| 久久成人资源| 欧美精品做受xxx性少妇| 美女黄毛**国产精品啪啪| 国产精品久久久影院| 国产日韩欧美综合精品| 中文字幕在线亚洲三区| 国产成人自拍视频在线观看| 日本黄网站色大片免费观看| 久久久久免费网| 欧美亚洲第一页| 国产精品久久久久91| 国产专区一区二区三区| 久久国产精品久久久久久久久久| 福利在线一区二区| 视频一区二区视频| 久久精品视频亚洲| 欧美视频在线第一页| 日韩在线视频免费观看高清中文| 日韩暖暖在线视频| 国产精品激情自拍| aaa毛片在线观看| 日本成人在线不卡| 国产精品欧美在线| 成人av中文| 日韩精品最新在线观看| 久久成人这里只有精品| 成人av在线播放观看| 日本天堂免费a| 国产精品视频免费观看www| 国产视频一区二区不卡| 亚洲精品在线观看免费| 久久精品ww人人做人人爽| 国产综合视频在线观看| 欧美激情伊人电影| 久久久综合av| 霍思燕三级露全乳照| 国产精品久久不能| 国产精品91久久久| 国产在线精品播放| 日本电影一区二区三区| 中文一区一区三区免费| 久久av一区二区三区亚洲| 国产熟女高潮视频| 日本a在线天堂| 亚洲图片在线观看| 国产精品视频一区二区高潮| 国产欧美婷婷中文| 欧美日韩一区在线视频| 亚洲色婷婷久久精品av蜜桃| xxx一区二区| 91精品国产高清自在线| 精品嫩模一区二区三区| 亚洲 欧美 日韩 国产综合 在线| 国产精品传媒毛片三区| 久久精品99国产| 久久久免费观看| 91九色在线视频| 97久草视频| 国产精品羞羞答答| 豆国产97在线| 国产另类自拍| 国产视频99| 国产欧美精品在线播放| 国产免费xxx| 国产精自产拍久久久久久| 国产伦精品一区二区三区免| 国产精品亚洲第一区| www国产免费| 99三级在线| 久久一区二区三区欧美亚洲| 国产成人短视频| 久久久久久久av| 久久久91精品国产| 国产精品啪啪啪视频| 国产精品福利小视频| 久久99精品久久久久久青青91| 久久的精品视频| 亚洲一区二区三区乱码aⅴ| 日本久久久网站| 免费av在线一区二区|