国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久久精品亚洲一区| 久久精品视频va| 97精品视频在线| 精品国产一区二区三区在线观看 | 久久精品影视伊人网| 一区二区三视频| 日本午夜在线亚洲.国产| 777午夜精品福利在线观看| 国产精品久久久999| 欧美中文字幕第一页| 99久久综合狠狠综合久久止| 国产精品日日摸夜夜添夜夜av| 青青在线免费观看视频| 97欧洲一区二区精品免费| 国产精品美女久久久久av福利| 欧美自拍资源在线| 国产精品12| 中文字幕人妻熟女人妻洋洋| 国产精品综合久久久久久| 国产精品久久一区主播| 青青草视频国产| 久久99精品国产一区二区三区| 亚洲乱码一区二区三区| 国产精品自拍片| 国产精品福利视频| 国产一区二区视频在线免费观看| 国产成人精品午夜| 日韩欧美一区二区三区四区| 久草一区二区| 日韩电影天堂视频一区二区| 久久综合久久网| 欧美在线观看视频| 九九热只有这里有精品| 性欧美精品一区二区三区在线播放| 国产欧美日韩视频| 亚洲最大成人网色| 国模精品视频一区二区| 国产精品欧美激情在线播放 | 天天干天天色天天爽| 宅男av一区二区三区| 成人在线观看a| 在线一区日本视频| 91久久久久久久久久| 婷婷久久青草热一区二区| 成人国产精品日本在线| 在线视频不卡一区二区| 国产伦精品一区二区三区| 亚洲色欲久久久综合网东京热| 99精品99久久久久久宅男| 欧美激情视频一区二区三区不卡| 91精品国产91久久久久| 日本一区二区在线免费播放| 久久久久久久久久久免费精品| 欧美 日韩 国产一区| 国产精品二区在线观看| 国产伦精品一区二区| 一本久道综合色婷婷五月| 国产盗摄xxxx视频xxx69| 日韩久久久久久久久久久久久| 久久精品久久久久久国产 免费| 国产99视频精品免费视频36| av一区二区三区免费| 欧美一级免费播放| 91精品国产高清久久久久久91裸体| 日本一区二区免费高清视频| 久久久久久亚洲精品不卡| 精品人妻大屁股白浆无码| 亚洲综合av一区| 国产经典一区二区| 欧美中文字幕在线观看视频| 国产精品久久久久av福利动漫| 古典武侠综合av第一页| 色中色综合成人| 久久精品成人欧美大片古装| 国产日韩在线播放| 三年中文高清在线观看第6集| 久久精品国产久精国产思思| 黄色一级视频片| 色婷婷精品国产一区二区三区 | 国产成人av网址| 国模精品一区二区三区色天香| 少妇高清精品毛片在线视频 | 国产亚洲福利社区| 欧美一区二区三区精美影视| 色婷婷成人综合| 91九色国产视频| 欧美精品一区免费| 亚洲在线视频一区二区| 国产精品电影网站| 91精品一区二区三区四区| 欧美日韩电影一区二区| 少妇免费毛片久久久久久久久| 国产精品免费一区二区三区四区| av一区观看| 国产一区二区三区av在线| 色之综合天天综合色天天棕色| 国产精品丝袜久久久久久高清| 91精品国产综合久久久久久丝袜| 激情综合网俺也去| 性色av香蕉一区二区| 国产精品久久二区| 国产a级片免费看| 国产美女无遮挡网站| 国产精品99久久久久久久| 国模极品一区二区三区| 日本成人黄色免费看| 欧美激情视频在线免费观看 欧美视频免费一| 成人免费观看毛片| 国产欧美日韩伦理| 欧美黄色直播| 日本精品一区二区| 亚洲成人av动漫| 欧美精品www在线观看| 久久九九亚洲综合| 国产一区不卡在线观看| 奇米一区二区三区四区久久| 中文字幕日本最新乱码视频| 久久国产精彩视频| 国产精品偷伦免费视频观看的| 久久国产精品久久精品国产| 97精品视频在线观看| 99久久精品免费看国产一区二区三区| 黄色成人在线看| 日韩精品视频在线观看视频| 日本电影一区二区三区| 午夜精品久久久久久久99黑人 | 国产日韩在线看| 国产无套内射久久久国产| 欧美日韩精品免费观看| 午夜在线视频免费观看| 亚洲精品电影在线一区| 中文字幕色呦呦| 欧美激情一区二区久久久| 久久综合88中文色鬼| 国产精品日日摸夜夜添夜夜av| 国产精品爽黄69| 久久精品电影网站| 国产精品久久久久久久久久久久 | 日韩免费av一区二区三区| 亚洲va韩国va欧美va精四季| 性视频1819p久久| 日本欧美精品在线| 欧美日韩免费精品| 国产在线精品一区二区三区| 国产毛片视频网站| 国产精品678| 久久久久久久久久久久久国产| 国产成人精品一区二区三区 | 国产精品亚洲аv天堂网| 97精品久久久| 国产不卡av在线| 国产精品视频不卡| 色综合五月天导航| 亚洲a成v人在线观看| 日本网站免费在线观看| 欧美日韩一区二区三区电影| 国产美女直播视频一区| 国产大片精品免费永久看nba| 国产精品日韩精品| 亚洲三区四区| 欧美久久久久久久久久久久久| 国产免费人做人爱午夜视频| 69久久夜色精品国产69| 国产精品视频99| 亚洲区成人777777精品| 欧美日韩国产综合视频在线| 国产九色91| 久久精品第九区免费观看| 国产精品久久久久av福利动漫| 中文字幕色呦呦| 欧美一区深夜视频| 97久久精品人人澡人人爽缅北| 久久精品成人动漫| 亚洲一区亚洲二区亚洲三区| 欧美日韩另类丝袜其他| 91美女福利视频高清| 国产精品啪视频| 性欧美长视频免费观看不卡| 国产一区二区三区小说| 国产福利视频一区二区| 久久综合九色九九| 日韩欧美手机在线| 成人av资源在线播放| 国产精品人成电影| 亚洲一区二区久久久久久久| 精品欧美日韩在线| 久久久精品国产一区二区三区| 久久91精品国产91久久跳| 日韩欧美精品在线观看视频| 91免费福利视频| 欧美激情视频网| 欧美视频小说| 国产成人avxxxxx在线看| 一本色道久久综合亚洲精品婷婷 | 亚洲综合色激情五月| 国产主播一区二区三区四区| 国产成人成网站在线播放青青| 欧美激情视频网址| 国内精品伊人久久| 日韩中文字幕在线看|