2002-03-14 04:15:19

by Dan Kegel

[permalink] [raw]
Subject: Re: libc/1427: gprof does not profile threads <synopsis of the problem

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


2002-03-14 14:13:04

by Alan

[permalink] [raw]
Subject: Re: libc/1427: gprof does not profile threads <synopsis of the problem

> 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)

2002-03-14 14:20:24

by James Lewis Nance

[permalink] [raw]
Subject: Re: libc/1427: gprof does not profile threads <synopsis of the problem

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

2002-03-14 16:05:07

by Dan Kegel

[permalink] [raw]
Subject: Re: libc/1427: gprof does not profile threads <synopsis of the problem

Dave McCracken <[email protected]> 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