开发者

About callgrind output

开发者 https://www.devze.com 2023-04-09 05:38 出处:网络
I am using http://valgrind.org/docs/manual/cl-manual.html to profile my application. But开发者_StackOverflow I have a question about it\'s o/p does it shows

I am using http://valgrind.org/docs/manual/cl-manual.html to profile my application. But开发者_StackOverflow I have a question about it's o/p does it shows

  1. time consumed inside that function

OR

  1. 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.


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

/usr/bin/time -v

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

--cache-sim=yes

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

--branch-sim=yes

Finally with the help of callgrind_annotate utility we get the desired output file.

==========


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号