GProf's sampling inaccuracies
Segher Boessenkool
segher@kernel.crashing.org
Thu Jun 28 08:39:00 GMT 2007
> When I run the
> program with profiling on the build I get 5743514 calls to
> CompareReferences() in the flat profile.
Please make sure the asm code in your actual binary is the
same as you think it is; run objdump -drS on the .o file
or your resulting executable.
> When I run it with profiling just on
> the link, the self-seconds are: 1.85. This comes to an average of
> 322ns/call.
> How do we explain that? Do we conclude that those 5743514 calls to
> movl and
> 5743514 calls to cmpl where all cache misses?
Dunno. You might want to look at using a more fine-grained
profiler instead, that can use your CPU's profiling extensions,
like Oprofile on Linux.
Segher
More information about the Binutils
mailing list