This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: gprof and LinuxThreads
- To: drepper@cygnus.com (Ulrich Drepper)
- Subject: Re: gprof and LinuxThreads
- From: Zack Weinberg <zack@rabi.columbia.edu>
- Date: Thu, 14 Jan 1999 18:30:53 -0500
- cc: Geoff Keating <geoffk@ozemail.com.au>, Xavier.Leroy@inria.fr, libc-hacker@cygnus.com
On 14 Jan 1999 10:38:17 -0800, Ulrich Drepper wrote:
>> It's not unlikely that on a fast machine, all the sampling will happen
>> at the same time; all that would be required is for all threads to
>> start inside the same tick. This could produce wrong results if the
>> code spends much time inside some small inner loop (as code tends to
>> do).
>
>Before be think about fixing the broken implementation let's make a
>step back and look at the ugly and limited design. I would rather
>like to replace the whole implementation.
>
>Did you ever tried to profile a program which didn't ran for minutes?
>On my home machine I see for these programs zero hits for almost all
>the functions, rendering the data useless.
A first step to solving this problem would be: if gmon.out already exists,
add the figures for the current run to that file instead of overwriting it.
(Like doing gprof -s in between runs). Then you could run the program many
times and get overall statistics.
zw