On Saturday 08 May 2010, n179911 wrote:
> I have run callgrind with my application like this
> "valgrind --tool=callgrind MyApplication"
> and then call 'callgrind_annotate --auto=yes ./callgrind.out.2489'
> 
> 
> I see output like
> 
> 768,097,560  PROGRAM TOTALS
> 
> --------------------------------------------------------------------------------
>         Ir  file:function
> --------------------------------------------------------------------------------
> 18,624,794  /build/buildd/eglibc-2.11.1/elf/dl-lookup.c:do_lookup_x
> [/lib/ld-2.11.1.so]
> 18,149,492  /src/js/src/jsgc.cpp:JS_CallTracer'2
> [/src/firefox-debug-objdir/js/src/libmozjs.so]
> ...
> 
> I have a few questions.
> 1. What does the number on the right mean?

I do not see any number on the right. Do you mean the left?

> Does it mean it spend 
> accumulative that long in calling the function on the right?

The default output is exclusive cost. For inclusive cost (ie. with
cost of all callees, both direct and indirect, use "--inclusive=yes").

> How can I 
> tell how many times that function has been called

Hmm.. indeed, callgrind_annotate does not give the call count; obviously
I forgot about this. You can use "--tree=both". Then, for every function,
you also get all callers and callees, and there, after the function name,
you get the call counts in parenthesis.

> and Does that
> include the time spend in calling the functions called by that
> function?

Yes, but needs "--inclusive=yes", see above.

> 2. What does line with ??? mean? e.g. ???:0x0000000000009190
> [/usr/lib/libpangocairo-1.0.so.0.2800.0]

"???" means "no debug information present".
callgrind_annotate uses <source file>:<function name> as specification for a 
function.
If the source can not be found from debug info, you will see "???". If the 
function name
can not be found, you will get the address offset of the function entry 
instruction
in the ELF object (binary/shared lib).

As already noted by Milian, it is easier to use KCachegrind for browsing 
profiling
results of callgrind. Yet unreleased, but quite stable, there is also a pure Qt
version (in KDE SVN) and a command-line Qt-tool "cgview" (more or less the same 
as
callgrind_annotate, but based on code used in KCachegrind).

Best,
Josef


> 
> Thank you.
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> Valgrind-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
> 



------------------------------------------------------------------------------

_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to