Skip to contentSkip to conversation

Profiling support in glibc?

DISCUSSION Brian Murphy 6 participants 7 messages Jun 18, 2001 – Jun 19, 2001 MIPS

lore
Share & tools
lore
#0 lore raw

What is the status of profiling in glibc? Our (egcs-1.1.2 based) compiler fails with a missing symbol
_start (glibc 2.0.6) but even if one fixes this up there are more fundamental problems.

Is there a later glibc for which profiling works?

/Brian

#1 lore raw
Quoted 6 lines · Brian Murphy

What is the status of profiling in glibc? Our (egcs-1.1.2 based) compiler fails with a missing symbol
_start (glibc 2.0.6) but even if one fixes this up there are more fundamental problems.

Is there a later glibc for which profiling works?

I've never tried profiling but remember from looking at the source of glibc 2.0.6 that there were rather obvious bugs. Also you shouldn't assume that anybody of the core developers has interest in wasting any work into 2.0.6 since 2.2 is so much better so you may want to upgrade anyway.

The other issue is of course gprof ...

Ralf

#2 lore raw

Oddly enough I didn't have to make any changes to gprof. I used the version in binutils-2.11.90.0.1.

Thanks,
Greg

Quoted 1 line · on 6/18/01 2:25 PM, Ralf Baechle at [email protected] wrote:

The other issue is of course gprof ...

#3 lore raw
In reply to Brian Murphy

I was able to get profiling working using glibc-2.2.2 and gcc-2.95.3. Both packages needed changes. The compiler had a stack misalignment correction for glibc. Glibc didn't save all the registers nor treat sp/fp correctly. Currently files compiled with -pg need to be linked -static. Specs need to be updated to do this automatically.

I will send diffs if there is any interest.

Thanks,
Greg

Quoted 10 lines · on 6/18/01 1:07 PM, Brian Murphy at [email protected] wrote:

What is the status of profiling in glibc? Our (egcs-1.1.2 based) compiler fails with a missing symbol
_start (glibc 2.0.6) but even if one fixes this up there are more fundamental problems.

Is there a later glibc for which profiling works?

/Brian

#4 lore raw
Quoted 6 lines · Greg Satz

I was able to get profiling working using glibc-2.2.2 and gcc-2.95.3. Both packages needed changes. The compiler had a stack misalignment correction for glibc. Glibc didn't save all the registers nor treat sp/fp correctly. Currently files compiled with -pg need to be linked -static. Specs need to be updated to do this automatically.

The next release of my mips toolchain should be as good as the x86 version in RedHat 7.1. If you can send me patches against binutils, glibc and gcc under

http://ftp.kernel.org/pub/linux/devel/binutils/mips/

I will take a look to see if I can include them in my next release.

H.J.

#5 lore raw
In reply to Greg Satz
Quoted 7 lines · Greg Satz

I was able to get profiling working using glibc-2.2.2 and gcc-2.95.3. Both packages needed changes. The compiler had a stack misalignment correction for glibc. Glibc didn't save all the registers nor treat sp/fp correctly. Currently files compiled with -pg need to be linked -static. Specs need to be updated to do this automatically.

I will send diffs if there is any interest.

Please send me diffs for glibc,

Andreas

Signature · 4 lines
 Andreas Jaeger
  SuSE Labs [email protected]
   private [email protected]
    http://www.suse.de/~aj