From: hjstein@bfr.co.il (Harvey J. Stein)
To: axp-list@redhat.com
Cc: hjstein@bfr.co.il
Subject: Re: gprof on Alpha
Date: 23 Feb 2000 09:03:59 -0500 [thread overview]
Message-ID: <kiwbt585834.fsf@blinky.bloomberg.com> (raw)
In-Reply-To: "W Bauske"'s message of "Wed, 23 Feb 2000 01:35:08 -0600"
"W Bauske" <wsb@paralleldata.com> writes:
> Ok, I'm trying to do some tuning and I set -pg in my make
> file and recompiled all my code on my UP2000. Then run a
> test and it generates a gmon.out just fine. So, then I try
> a 'gprof my_binary' and it SEGV's in malloc. Traceback is:
In redhat 4.2, you needed to a) patch gprof, b) patch libc_p.a, and
c) compile statically linked. Some subset of this might be what you
need. Don't apply the libc_p.a patch because it almost certainly will
just screw things up (since it was for RH 4.2, which has an extremely
old libc).
Here're some details (from my alpha-patches-n-bugfixes document, which
you might be able to find on the net):
4. Profiling Repair.
To make profiling work, you need two patches from David Mosberger
which were posted to axp-list@redhat.com (tracked down by Toon Moene
who posted their archive URLs to axp-list). You might also need one of
the gcc patches mentioned above.
In any case, David Mosberger's patches are in the axp-list archive at:
http://www.redhat.com/support/mailing-lists/archives/axp-list/1997-March/0463.html
and
http://www.redhat.com/support/mailing-lists/archives/axp-list/1997-March/0464.html
The former is a source patch for binutils to keep gprof from seg
faulting, and the latter is a binary patch for libc_p.a to keep your
programs from seg faulting.
For convenience, both are included in the Patches section. The former
is in binutils-new-patches.tar.gz.uue, along with an RPM spec file for
incorporating it into binutils-2.7.0.2-4.src.rpm, and the latter is
David Mosberger's libc_p.a binary patch.
To fix gprof, unpack binutils-new-patches.tar.gz.uue, and rebuild
binutils-2.7.0.2-4.src.rpm analogously to the instructions above for
gcc. But, *don't* install the binary rpm after rebuilding. It
conflicts with the libc headers. Just either copy gprof over the
version in /usr/bin, or override the /usr/bin version with the new one
in /usr/local/bin, etc.
As for the binary patches for libc_p.a, here's an extract from David
Mosberger's message about it how to apply them:
After extracting these files, replace them in your libc_p.a. E.g.:
ar rv /usr/lib/libc_p.a gmon.po ieee_{s,g}et_fp_control.po
and then profiling should work again. Note that the binutils-2.7 gprof
has a bug that sometimes causes a SIGFPE. See my earlier mail for a
patch that fixes this.
Finally, there is still a problem with mixing profiling and dynamic
linking. E.g., with dynamic linking, adding -lm will cause a binary
that segfaults. Adding the -static flag should fix this problem for
now (until a real solution is found).
Here're the patches:
begin 644 binutils-new-patches.tar.gz
M'XL(`,B_<C0``^U6;6_;-A#.U_!7'+`52UQ+UIOM1FV&OJ1+,R1MD*3KQX"6
M:)NK1&HDE<0!UM^^(RT[7NRL0U&TP*8'-B3RCL?C/2?>C;BH#2^T)]BU5U&3
M39GN;7U=0!(,^WW8`H#A8/X,D\0]&P0`@R1.^C'*^U8:1L$6]+^R'QM1:T,5
MP-;T=VT8%_^@QY3^%@Y]6XPV\;^<C/RA1V^JQ'>2+]TC#()!P_<F_J-HF-SQ
MG\0X$T3)<`N"KWG0A_`_YQ_C?T"O>`XG4H^8FC#E75`Q@9W<SI;/Z:V-CV#&
MSV2Y2U#]O!9="`=P@F$+]_:&$$9I?R\-8_""81!8%?M_PQ0#KH'"F-_`6"J8
M5$J.@0M832\?+J8,7'I9;<4*:O@5`R/!3)DU=,9R>$,-)'ZX7`EGIR==&-4&
MN/E)`[I6%<RP8@9&\2M."Z`B!SV5=9$#K:IB9BUE!:/"ZCC;(!6?<(&Z6M8J
M8^BJAFM6%#Y\X`:7&J?E7.O:5SP/5<ZEC&I4OW93,UG#A!DX/SK\Y?0U2.%6
MO2BJ*841RRCF#6Y0,C>=RWI4.!-75'&*[]H&Q*U0&6BCZLS4:%6QDG*!)Z\%
M%]S@B?@MR_U%<#W/T4,(Z70Z\\#V7DV1-W8L)Y^V/^#"7^L"PB$$<1H&:1!9
MJ@;$\[S[VMO()[S+#$#?,AFC\L#Q:DVOPFT5=A-P`VLI[(8!NN)YY+'-BGE&
M#%P^Q&G\9)X=&[/KV:;L^AG-X&^[`]GDDJI,^QGLX/.2YOEN"B4K-3,[NX`W
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FUEN^^?0A"_<7-ZFYLG3ZP'F<
MGDTGJ0WI:1N$(I\G03-;B_7Y,<<6&S\L;%G.7K\X.'E-5D+H7DLJ[#]<C!<>
M-4-[ZJ7$!O-[7]@M6K1HT:)%BQ8M6K1HT:)%BQ8M6K1HT:+%O\!?^?_D]0`H
"````
`
end
--
Harvey Stein
Bloomberg LP
hjstein@bfr.co.il
next prev parent reply other threads:[~2000-02-23 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-23 7:35 gprof on Alpha W Bauske
2000-02-23 14:03 ` Harvey J. Stein [this message]
2000-02-23 16:55 ` Rolf Neugebauer
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox