Re: libc/1427: gprof does not profile threads on linux

From: Dan Kegel (dank@kegel.com)
Date: Thu Dec 06 2001 - 18:24:31 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Dec 07 2001 - 21:00:36 EST