From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 6121 invoked from network); 23 Feb 2000 14:04:07 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 23 Feb 2000 14:04:07 -0000 Received: from mh1dmz1.bloomberg.com (mh1dmz1.bloomberg.com [199.172.169.36]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id JAA25621 for ; Wed, 23 Feb 2000 09:04:06 -0500 Received: from ns2.bloomberg.com by mh1dmz1.bloomberg.com; Wed, 23 Feb 2000 09:03:42 -0500 Received: from blinky.bloomberg.com by ns2.bloomberg.com (8.6.13/200.20.1.1) id JAA06971; Wed, 23 Feb 2000 09:03:59 -0500 Received: (from hjstein@localhost) by blinky.bloomberg.com (8.9.3/8.9.3) id JAA05099; Wed, 23 Feb 2000 09:03:59 -0500 X-Authentication-Warning: blinky.bloomberg.com: hjstein set sender to hjstein@bfr.co.il using -f Sender: hjstein@blinky.bloomberg.com To: axp-list@redhat.com Subject: Re: gprof on Alpha References: <38B38DAC.6527C88A@paralleldata.com> CC: hjstein@bfr.co.il From: hjstein@bfr.co.il (Harvey J. Stein) Date: 23 Feb 2000 09:03:59 -0500 In-Reply-To: "W Bauske"'s message of "Wed, 23 Feb 2000 01:35:08 -0600" Message-Id: X-Mailer: Gnus v5.7/Emacs 20.4 "W Bauske" 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_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\;^2+]TC#()!P_`XG4H^8FC#E75`Q@9W$,-)'ZX7`EGIR==&-4& MN/E)`[I6%=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&^[`]GDDJ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