From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <27c60332634f9667e6a15e4d4006162b.axp-list@archive.invalid> X-Archive-Original-Message-ID: <3.0.1.32.19971118191331.00a425c0@cybercom.net> Date: Wed, 19 Nov 1997 03:18:02 +0100 (MET) From: Andreas Johansson Subject: Re: Profiling under Linux Alpha ? In-Reply-To: On Tue, 18 Nov 1997, Miguel A Sepulveda wrote: > > Hi Everyone, > > I am trying to profile and program of mine under my Alpha platform > Kenerl 2.0.30. > > I compiled the sources with -g2 -pg, then run the executable. After the > executable finishes it is suppose to generate a gmon.out, instead the > program crash and dump a core. The program is fine because without > the -pg option it works just fine. You're not by coincidence linking in the math library? In that case I think you should try linking your program static. I have had problems with profiling as well. At some point no profiling was working at all. Right now I'm using RedHat's mustang distribution (beta), and it seems that profiling works as long as you don't make the file dynamic AND link in the math library: ajo@wopr ~/tmp2 >cat >test.cc main() { printf ("Test\n"); } ajo@wopr ~/tmp2 >gcc -pg -o test test.cc test.cc: In function `int main()': test.cc:3: warning: implicit declaration of function `int printf(...)' ajo@wopr ~/tmp2 >./test Test ajo@wopr ~/tmp2 >gcc -pg -o test test.cc -lm test.cc: In function `int main()': test.cc:3: warning: implicit declaration of function `int printf(...)' ajo@wopr ~/tmp2 >./test Segmentation fault (core dumped) ajo@wopr ~/tmp2 >gcc -pg -o test test.cc -lm -static test.cc: In function `int main()': test.cc:3: warning: implicit declaration of function `int printf(...)' ajo@wopr ~/tmp2 >./test Test ajo@wopr ~/tmp2 > I can 'gprof test' after this too. /Andreas -- <-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> : E-mail: ajo@wopr.campus.luth.se : : S-mail: Andreas Johansson, Karhusvagen 5 6:618, 977 54 Lulea, SWEDEN : : Have you had your dose of 261.62 BogoMIPS today? - Run Alpha! : <-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-> -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com