* Re: libc/1427: gprof does not profile threads <synopsis of the problem
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 15:58 ` Daniel Phillips
0 siblings, 2 replies; 11+ messages in thread
From: Dan Kegel @ 2002-03-14 1:08 UTC (permalink / raw)
To: Alan Cox
Cc: Ulrich Drepper, darkeye, libc-gnats, gnats-admin, sam,
Xavier Leroy, linux-kernel, babt
Alan Cox wrote:
>
> > 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?
>
> Kernel support is not needed for this, do it in user space. Or prove it
> has to be in kernel space
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.
I hope we can all at least agree that
cc foo.c -pg -pthread
./a.out
gprof a.out
should work in Linux without any workarounds on the part of the programmer...
- Dan
- Dan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
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 ` Alan Cox
2002-03-14 1:08 ` Dan Kegel
0 siblings, 1 reply; 11+ messages in thread
From: Alan Cox @ 2002-03-14 1:28 UTC (permalink / raw)
To: Dan Kegel
Cc: Ulrich Drepper, darkeye, libc-gnats, gnats-admin, sam,
Xavier Leroy, linux-kernel, babt
> 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?
Kernel support is not needed for this, do it in user space. Or prove it
has to be in kernel space
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
2002-03-14 3:00 ` Alan Cox
@ 2002-03-14 2:55 ` Jeff Garzik
2002-03-14 3:26 ` David Rees
0 siblings, 1 reply; 11+ messages in thread
From: Jeff Garzik @ 2002-03-14 2:55 UTC (permalink / raw)
To: Alan Cox
Cc: Dan Kegel, Ulrich Drepper, darkeye, libc-gnats, gnats-admin, sam,
Xavier Leroy, linux-kernel, babt
Alan Cox 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.
>
Talk about a small world, I just found out today someone I know has been
maintaining the NGPT kernel patches :)
http://gtf.org/~dank/ngpt/
Jeff
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
2002-03-14 1:08 ` Dan Kegel
@ 2002-03-14 3:00 ` Alan Cox
2002-03-14 2:55 ` Jeff Garzik
2002-03-14 15:58 ` Daniel Phillips
1 sibling, 1 reply; 11+ messages in thread
From: Alan Cox @ 2002-03-14 3:00 UTC (permalink / raw)
To: Dan Kegel
Cc: Alan Cox, Ulrich Drepper, darkeye, libc-gnats, gnats-admin, sam,
Xavier Leroy, linux-kernel, babt
> 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
2002-03-14 2:55 ` Jeff Garzik
@ 2002-03-14 3:26 ` David Rees
2002-03-14 15:51 ` Dave McCracken
0 siblings, 1 reply; 11+ messages in thread
From: David Rees @ 2002-03-14 3:26 UTC (permalink / raw)
To: linux-kernel
On Wed, Mar 13, 2002 at 09:55:01PM -0500, Jeff Garzik wrote:
>
> Talk about a small world, I just found out today someone I know has been
> maintaining the NGPT kernel patches :)
>
> http://gtf.org/~dank/ngpt/
It even looks like kernel support is included 2.4.19-pre3:
http://oss.software.ibm.com/pthreads/
But don't see anything about it in any of the recent change logs...
-Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
* 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
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
1 sibling, 0 replies; 11+ messages in thread
From: jlnance @ 2002-03-14 14:24 UTC (permalink / raw)
To: linux-kernel
On Wed, Mar 13, 2002 at 08:25:21PM -0800, Dan Kegel wrote:
> 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.)
Does gprof work with dynamically loaded libraries? I remember trying to
get it to work with mozilla and if I remember correctly it would not
work because mozilla used threads and it dlopen()ed things.
Thanks,
Jim
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
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
1 sibling, 1 reply; 11+ messages in thread
From: Alan Cox @ 2002-03-14 14:28 UTC (permalink / raw)
To: dank; +Cc: linux-kernel, Ulrich Drepper
> 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.)
So would lots of people. You might find the gprof maintainr would like to
ship your patch with his package for example 8)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
2002-03-14 3:26 ` David Rees
@ 2002-03-14 15:51 ` Dave McCracken
0 siblings, 0 replies; 11+ messages in thread
From: Dave McCracken @ 2002-03-14 15:51 UTC (permalink / raw)
To: David Rees; +Cc: linux-kernel
--On Wednesday, March 13, 2002 07:26:56 PM -0800 David Rees
<dbr@greenhydrant.com> wrote:
> On Wed, Mar 13, 2002 at 09:55:01PM -0500, Jeff Garzik wrote:
>>
>> Talk about a small world, I just found out today someone I know has been
>> maintaining the NGPT kernel patches :)
>>
>> http://gtf.org/~dank/ngpt/
>
> It even looks like kernel support is included 2.4.19-pre3:
>
> http://oss.software.ibm.com/pthreads/
>
> But don't see anything about it in any of the recent change logs...
The relevant line from the changelog is:
- Signal changes for thread groups (Dave McCracken)
This is the only patch that NGPT needs to work.
Dave McCracken
======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
dmccr@us.ibm.com T/L 678-3059
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
2002-03-14 1:08 ` Dan Kegel
2002-03-14 3:00 ` Alan Cox
@ 2002-03-14 15:58 ` Daniel Phillips
1 sibling, 0 replies; 11+ messages in thread
From: Daniel Phillips @ 2002-03-14 15:58 UTC (permalink / raw)
To: Dan Kegel, Alan Cox
Cc: Ulrich Drepper, darkeye, libc-gnats, gnats-admin, sam,
Xavier Leroy, linux-kernel, babt
On March 14, 2002 02:08 am, Dan Kegel wrote:
> Alan Cox wrote:
> > Kernel support is not needed for this, do it in user space. Or prove it
> > has to be in kernel space
>
> 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.
I find it odd he vetoed your fix and didn't suggest an alternative.
/me checks to make sure this is cc'd to Ulrich.
--
Daniel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libc/1427: gprof does not profile threads <synopsis of the problem
2002-03-14 14:28 ` Alan Cox
@ 2002-03-14 16:15 ` Dan Kegel
0 siblings, 0 replies; 11+ messages in thread
From: Dan Kegel @ 2002-03-14 16:15 UTC (permalink / raw)
To: Dave McCracken; +Cc: linux-kernel
Dave McCracken <dmccr@us.ibm.com> wrote:
> > It even looks like kernel support is included 2.4.19-pre3:
> >
> > http://oss.software.ibm.com/pthreads/
> >
> > But don't see anything about it in any of the recent change logs...
>
> The relevant line from the changelog is:
>
> - Signal changes for thread groups (Dave McCracken)
>
> This is the only patch that NGPT needs to work.
Does NGPT support profiling yet? i.e. can I compile a program
using -pg and NGPT, and view the runtime distribution histogram
with gprof?
- 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