Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Andreas Johansson <ajo@wopr.campus.luth.se>
Subject: Re: Profiling under Linux Alpha ?
Date: Wed, 19 Nov 1997 03:18:02 +0100 (MET)	[thread overview]
Message-ID: <27c60332634f9667e6a15e4d4006162b.axp-list@archive.invalid> (raw)
In-Reply-To: <Pine.GSO.3.96L.971118165438.12429A-100000@unixs1.cis.pitt.edu>

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

  parent reply	other threads:[~1997-11-19  2:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.GSO.3.96L.971118165438.12429A-100000@unixs1.cis.pitt.edu>
1997-11-18 22:55 ` Profiling under Linux Alpha ? Hugo van der Kooij
1997-11-19  2:18 ` Andreas Johansson [this message]
1997-11-19  9:16 Stefan Schroepfer
     [not found] <Pine.LNX.3.96.971118235506.31837C-100000@hvdkooij.caiw.nl>
1997-11-19  3:28 ` Jason Shiffer
  -- strict thread matches above, loose matches on Subject: below --
1997-11-18 22:00 Miguel A Sepulveda
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