public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
@ 2002-03-14  4:25 Dan Kegel
  2002-03-14 14:24 ` jlnance
  2002-03-14 14:28 ` Alan Cox
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Kegel @ 2002-03-14  4:25 UTC (permalink / raw)
  To: linux-kernel, Ulrich Drepper

Alan Cox wrote:
> Dan Kegel wrote:
> > I'm all in favor of a userspace fix.  I suggested a patch
> > to glibc to fix this.  Ulrich rejected it; I'm trying
> > to coax out of him how he thinks profiling of multithreaded
> > programs on Linux should be fixed.
> 
> Good and I'll reject any kernel patches 8)
> 
> If Ulrich won't talk then talk to the NGPT people. Maybe a little
> competition will warm things up.

Surely Ulrich will come up with a constructive proposal for
how to make gprof work with LinuxThreads.  He wouldn't
want an important tool like gprof to remain broken for
years, would he?

While I await his constructive response, perhaps I'll get my 
glibc patch in shape.
I am maintainer of what amounts to a tiny embedded linux
distribution, and I'm pretty sure my users would like
gprof to work.  (In fact, my boss's boss would really
like gprof to work.  This problem has a lot of visibility.)

- Dan

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem   (one li\ne)>
@ 2002-03-14  0:19 Dan Kegel
  2002-03-14  1:28 ` libc/1427: gprof does not profile threads <synopsis of the problem Alan Cox
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Kegel @ 2002-03-14  0:19 UTC (permalink / raw)
  To: Ulrich Drepper
  Cc: darkeye, libc-gnats, gnats-admin, sam, Xavier Leroy, linux-kernel,
	babt

Ulrich Drepper wrote:
> 
> On Wed, 2002-03-13 at 15:17, Dan Kegel wrote:
> 
> > So let's break the logjam and fix glibc's linuxthreads' pthread_create
> > to [support profiling multithreaded programs]
> 
> I will add nothing like this.  The implementation is broken enough and
> any addition just makes it worse.  If you patch your own code you'll get
> what you want at your own risk.

OK.  What's the right way to fix this, then?

Here are a few alternate ideas off the top of my head:

* Rip out Linuxthreads, replace it with NGPT, and
start fixing from there?  (Or does NGPT already fix this?)

* Rewrite Linux's setitimer(ITIMER_PROF,...) to set up an 
interval timer for all threads of the thread group.

* Implement the profil() system call from Solaris
( http://ua1vm.ua.edu/cgi-bin/man-cgi?profil+2 )

What's your favorite idea for getting profiling of
multithreaded programs working on Linux?

Thanks,
Dan

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-03-14 16:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-14  4:25 libc/1427: gprof does not profile threads <synopsis of the problem Dan Kegel
2002-03-14 14:24 ` jlnance
2002-03-14 14:28 ` Alan Cox
2002-03-14 16:15   ` Dan Kegel
  -- strict thread matches above, loose matches on Subject: below --
2002-03-14  0:19 libc/1427: gprof does not profile threads <synopsis of the problem (one li\ne)> Dan Kegel
2002-03-14  1:28 ` libc/1427: gprof does not profile threads <synopsis of the problem Alan Cox
2002-03-14  1:08   ` Dan Kegel
2002-03-14  3:00     ` Alan Cox
2002-03-14  2:55       ` Jeff Garzik
2002-03-14  3:26         ` David Rees
2002-03-14 15:51           ` Dave McCracken
2002-03-14 15:58     ` Daniel Phillips

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox