This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gprof reports wrong execution times
Hi Anton,
> This is the correct and expected behavior, because
> the man page says:
>
> The granularity of the sampling is shown, but re-
> mains statistical at best. We assume that the time
> for each execution of a function can be expressed by
> the total time for the function divided by the num-
> ber of times the function is called. Thus the time
> propagated along the call graph arcs to the func-
> tion's parents is directly proportional to the num-
> ber of times that arc is traversed.
Right. See also the "Inaccuracy of gprof Output" chapter in the gprof documentation.
Cheers
Nick