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

Bug#207167: glibc: profiling threads gives wrong results



At Mon, 25 Aug 2003 16:42:57 +0200,
Michael Piefel wrote:
> When profiling threads, gprof actually only profiles the main thread,
> which is quite useless. The reason is that there is only one timer for
> the profiling, and that belongs to the main thread. In the profiling
> case, each thread needs its own timer.
> 
> There are several solutions for this, such as a wrapper as on
>   http://sam.zoy.org/writings/programming/gprof.html
> This, however, is unsatisfactory. Compiling with "-p" should
> automatically generate code like that or link code like that; for
> instance with a weak pthread_create symbol. Of course that requires
> interaction with GCC, but the important change is in the C library.

Yes, it's long time concerned item, and not fixed.  I didn't know why
Uli did not want to accept this kind of issue.  IMHO, we have a chance
to investigate more when we support NPTL.

Regards,
-- gotom



Reply to: