加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

代寫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程序
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

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

    一本综合久久| 美女黄网久久| 日韩欧美影院| 日韩成人精品一区二区三区| 久久国产精品毛片| 99成人在线视频| 日本一区精品视频| 青青草国产精品亚洲专区无| 一区二区精品伦理...| 婷婷激情图片久久| 欧美日韩一区二区三区在线电影| 亚洲自拍偷拍网| 另类一区二区| 免费在线小视频| 美女诱惑一区| 天天色天天射综合网| 精品国产91乱码一区二区三区四区 | 日本在线一区二区三区| 日韩国产欧美三级| 韩国精品主播一区二区在线观看| 日本 国产 欧美色综合| 欧美日韩三级电影在线| 亚洲h色精品| 99ri日韩精品视频| 日韩欧美中文字幕电影| 电影中文字幕一区二区| 国产一区二区三区久久久久久久久| 天堂中文在线播放| 国产精品国产一区| 模特精品在线| 噜噜噜躁狠狠躁狠狠精品视频| 亚洲午夜精品久久久久久app| 成人综合专区| 99精品在免费线中文字幕网站一区| 国产免费久久| 国模精品一区| 91视频亚洲| 欧美精品二区| 欧美区日韩区| 综合久久精品| 粉嫩av国产一区二区三区| 亚洲精选国产| 亚洲欧美在线综合| 国产精品毛片aⅴ一区二区三区| 国产精品porn| 亚洲一区在线| 久久成人av| 亚洲制服欧美另类| 啪啪亚洲精品| 欧美高清一级片| 欧美日韩xxxx| 久久精品九色| 极品国产人妖chinesets亚洲人妖| 日韩三级av高清片| 黄色美女久久久| 99久久99久久精品国产片桃花| 日韩精品久久久久久久电影99爱| 男人的天堂久久| 亚洲午夜91| 国产婷婷精品| 岛国av在线网站| 人人精品久久| 另类小说视频一区二区| 欧美黄色一级视频| www.久久99| 亚洲1区在线观看| 禁果av一区二区三区| 久久精品播放| 亚洲尤物在线| 成人片免费看| 免费在线日韩av| 999精品视频在线观看| 日韩av中文在线观看| theporn国产在线精品| 国内成人在线| 日本一区二区三区视频| 深夜成人在线| 亚洲精品乱码| 亚洲精品在线a| 亚洲福利免费| 免费观看在线综合| 欧洲美女精品免费观看视频| 青青青伊人色综合久久| 婷婷亚洲成人| 91精品秘密在线观看| 久久亚洲欧美| 国产精品久久久久久妇女| 亚洲老司机网| 色婷婷精品视频| 先锋影音久久久| 国产原创一区| 亚洲免费专区| 激情欧美丁香| 综合日韩av| 亚洲人成免费网站| 丁香五月缴情综合网| 亚洲中字黄色| 久久国内精品自在自线400部| 亚洲人挤奶视频| 免费精品国产的网站免费观看| 成人影院在线| 亚洲乱亚洲高清| 欧美日韩直播| 激情黄产视频在线免费观看| 日本成人超碰在线观看| 日韩精品视频一区二区三区| 婷婷激情图片久久| 国产一区一一区高清不卡| 精品一区二区三区免费看| 国内精品视频在线观看| av在线视屏| 国产一区二区三区天码| 天堂资源在线亚洲| 综合久久2023| 日韩美女毛片| 最新亚洲视频| 麻豆精品在线观看| 久久久噜噜噜久久狠狠50岁| 日本蜜桃在线观看视频| 亚洲综合小说| 亚洲国产一区二区在线观看 | 亚洲日本va午夜在线电影| 男人的天堂免费在线视频| 中文字幕人成人乱码| 极品中文字幕一区| 高清在线一区| 北条麻妃在线一区二区免费播放| 日韩专区一卡二卡| 欧美日韩a区| 欧美日韩国产欧| 美女视频第一区二区三区免费观看网站 | 大陆精大陆国产国语精品| 日本一区二区高清不卡| 国产麻豆精品久久| 国产婷婷精品| 高清在线一区二区| 黄色成人av网站| 亚洲精选91| 女同性一区二区三区人了人一| 久久精品国产99国产精品| 99久久亚洲精品蜜臀| 国产私拍福利精品视频二区| 亚洲日本va午夜在线电影| 亚洲精品**中文毛片| 激情五月综合婷婷| 伊人成综合网站| 超碰成人在线观看| 日韩精品第一| 欧美色图一区| 亚洲国产精品一区制服丝袜| 希岛爱理av一区二区三区| 亚洲精品社区| 午夜一区不卡| 日本午夜精品久久久| 手机在线观看av| 禁断一区二区三区在线| 久久精品国产福利| 欧洲杯什么时候开赛| 亚洲精品日韩久久| 丝瓜av网站精品一区二区| 久久99成人| 国产精品亲子伦av一区二区三区| 久久精选视频| 久久资源综合| 国产传媒在线观看| 精品理论电影在线| 麻豆久久久久久久| 男女男精品网站| 欧美黄色影院| 亚洲美女色禁图| 热久久国产精品| 精品国产一区二区三区av片 | 国产日产一区| 三级中文字幕在线观看| 欧美sss在线视频| 综合久久一区| av资源中文在线天堂| 99视频精品视频高清免费| 欧美日一区二区三区在线观看国产免| 亚洲欧美久久| 女同一区二区三区| 一区二区三区四区日韩| 91欧美大片| 免费观看久久av| 亚洲男人都懂第一日本| 国产福利亚洲| 蜜桃视频在线观看一区二区| 日韩精品一区二区三区免费观影 | 日韩极品在线| 亚洲视频二区| 色综合天天综合网中文字幕| 天堂网av成人| 国产中文字幕一区二区三区| 福利一区在线| 免费观看成人av| 激情久久综合| 国产精品视频3p| 欧美大片91| 美女久久久精品| 久久91导航|