bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gprof total run time incorrect


From: Hans-Bernhard Broeker
Subject: Re: gprof total run time incorrect
Date: 2 Jul 2001 11:00:29 GMT

Paolo Carlini <address@hidden> wrote:

> When profiling C++ programs (built with gcc3.0) the total running time
> reported by gprof is incorrect by an apparently random factor of ~3-10
> with respect to the total time (u+s) output by time. 

Was this different before you switched to the current versions of gcc
and glibc?

Please note that gprof can't measure and account the time spent in
shared-library routines called by your program. This is usually the
root of the majority of apparently "missing" time in the gprof
measurements. To get over this, the only method I know is forcing a
static linkage of your program, with the profiling version of libc
(libc_p.a) and friends. "gcc -profile -static" or something similar
usually does that.
-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]