libc/1427: gprof does not profile threads <synopsis of the problem
Quoted 10 lines · Alan Cox
Quoted 4 lines · Dan Kegel
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
Quoted 3 lines
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)
Quoted 11 lines · Dave McCracken
Quoted 5 lines
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
Quoted 6 lines · Dan Kegel
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