[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libc/1427: gprof does not profile threads on linux
From: |
Dan Kegel |
Subject: |
Re: libc/1427: gprof does not profile threads on linux |
Date: |
Thu, 06 Dec 2001 15:24:31 -0800 |
There is a longstanding bug against glibc
related to gprof support on multithreaded programs on linux:
http://bugs.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=default&pr=1427
The glibc maintainer's feeling at the time was that it was
linux's fault for having nonstandard signal semantics for
multithreaded programs. This is certainly a valid viewpoint.
Pragmatically, however, there is a simple workaround, documented at
http://sam.zoy.org/doc/programming/gprof.html
which works by putting a small wrapper around pthread_create.
(I haven't tested it myself, but it seems reasonable.)
Is it not time for glibc to incorporate this workaround when
building for Linux? That would get gprof working for now,
and if Linux ever changes its pthread signal semantics, the
workaround can be dropped.
Comments?
- Dan
- Re: libc/1427: gprof does not profile threads on linux,
Dan Kegel <=