GProf's sampling inaccuracies
Segher Boessenkool
segher@kernel.crashing.org
Sat Jun 23 19:19:00 GMT 2007
[Why did you reply to the list only, not to me? I could
have very likely missed this mail. Next time, when replying
to a mailing list, use "reply to all".]
>> Use -pg only in the final link, so you don't get mcount()
>> implanted into every function. You won't have a call count
>> or a call graph, but you do get a much more accurate time
>> profile in return.
>
> Unfortunately, everytime I tired running gprof on the debug version
> of the
> program which only does profiling at link-time, I got "gprof: gmon.out
> file
> is missing call-graph data".
info gprof
(short story: gprof -p or gprof -Q )
> For some strange reason the optimized version (that is, built from the
> "optimized" profile in KDevelop) didn't give me this trouble. However,
> the
> execution time for CompareReferences() went up 70%. God help me if
> that's
> more accurate!
No idea. Could be KDevelop's fault, could be anything
else.
Segher
More information about the Binutils
mailing list