关于 callgrind 输出
我正在使用 http://valgrind.org/docs/manual/cl-manual.html 来分析我的应用程序。 但我有一个关于它的o/p是否显示
- 该函数内部消耗的时间
或
- 该函数调用内部消耗的cpuU
的问题我猜是 目前,curl connect 的使用率为 90%。我认为这是 I/O 绑定进程。
所以我认为它显示了该函数调用内消耗的时间。
I am using
http://valgrind.org/docs/manual/cl-manual.html
to profile my application.
But I have a question about it's o/p does it shows
- time consumed inside that function
OR
- cpU consumed inside that function call
What I guess is
Currently it is showing 90% usage in curl connect. I think which is i/o bound process.
So I think it is showing time consumed inside that function call.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它可以显示各种内容,指令计数(CPU 时间的粗略代理)、估计的周期计数(也是 CPU 时间的粗略代理)或各种估计的缓存命中/未命中计数。
It can show various things, either instruction count (a rough proxy for CPU time), an estimated cycle count (also a rough proxy for CPU time), or various sorts of estimated cache hit/miss counts.
文档中提到的valgrind的callgrind工具默认只启用Instructions read (Ir)。
该工具本身不适合计算函数消耗的时间,请参考此处。
为了获取时间和 CPU 使用情况,我更喜欢在 Unix 中以详细模式运行“time”命令
获取其他实用程序,例如
但是,我们可以从 doc===
指令读取(“I1mr”/“ILmr”)、数据读取访问(“Dr”)和相关缓存未命中时的缓存未命中(“D1mr”/“DLmr”)、数据写入访问(“Dw”)和相关缓存未命中(“D1mw”/“DLmw”),通过启用以下选项
还可以获取其他实用程序,例如
通过启用以下选项,执行的条件分支和相关预测器未命中(“Bc”/“Bcm”)、执行的间接跳转和跳转地址预测器的相关未命中(“Bi”/“Bim”)的数量
最后,在 callgrind_annotate 实用程序的帮助下,我们获得了所需的输出文件。
=========
The callgrind tool of valgrind as stated in the document has only Instructions read (Ir) enabled by default.
The tool itself is not suitable for calculating the time consumed by the function, refer here.
For getting time and CPU usage I prefer running "time" command in Unix in verbose mode
However, we can get other utilities such as
==snippet from the doc===
Cache misses on instruction reads ("I1mr"/"ILmr"), data read accesses ("Dr") and related cache misses ("D1mr"/"DLmr"), data write accesses ("Dw") and related cache misses ("D1mw"/"DLmw") by enabling the option of
Also its possible to get other utilities such as
Number of executed conditional branches and related predictor misses ("Bc"/"Bcm"), executed indirect jumps and related misses of the jump address predictor ("Bi"/"Bim") by enabling option of
Finally with the help of callgrind_annotate utility we get the desired output file.
==========