自动化装配循环级分析 [英] automated assembly loop level profiling
问题描述
有谁知道任何汇编循环水平探查?
Does anyone know any assembly loop level profiler?
我一直在使用gprof的,但gprof的隐藏的循环,它是功能层面分析,还没有优化我的code我想要的东西去循环水平。我希望它是自动的,只要给我像gprof的输出。我建议去但我不知道是开始dtrace的。任何人都可以直接我呢?
例如:
I have been using gprof but gprof hides loops and it is function level profiling, yet to optimize my code i want something to go to the loop level. I want it to be automated and just give me the output like gprof. I was recommended to go to dtrace yet I have no idea were to start. anyone can direct me in anyway? for example
main:
pushl %ebp
movl %esp, %ebp
subl $16, %esp
movl $5000000, -4(%ebp)
movl $0, -12(%ebp)
movl $0, -8(%ebp)
jmp .L2
.L3:
movl -8(%ebp), %eax
addl %eax, -12(%ebp)
addl $1, -8(%ebp)
.L2:
movl -8(%ebp), %eax
cmpl -4(%ebp), %eax
jl .L3
movl $0, %eax
leave ret
例如gprof的它会说主要执行1次和富执行100次。但我想知道,如果L2或L3上优化会在这里执行1M次,然后我的注意力。
如果我的问题是模糊的,请叫我解释更多
谢谢
for example in gprof it would say main executed 1 time and foo executed 100 times. yet I want to know if L2, or L3 executed 1M times then my concentration on optimizing would be here. if my question is vague please ask me to explain more Thanks
推荐答案
我建议使用Callgrind(之一 Valgrind的一>工具,通常用它安装)。这可以在一个更精细的级别收集统计信息,而 KCacheGrind调试工具是非常良好的可视化效果。
I suggest using Callgrind (one of the Valgrind tools, and usually installed with it). This can gather statistics on a much more fine-grained level, and the kcachegrind tool is very good for visualising the results.
这篇关于自动化装配循环级分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!