Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* gprof almost there...
@ 1997-10-05 19:59 Harvey J. Stein
  1997-10-05 20:59 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Harvey J. Stein @ 1997-10-05 19:59 UTC (permalink / raw)


I installed David Mosberger's patches to libc_p & gprof.  I also
rebuilt gcc with Toon Moene's profiling patch.  Now profiling seems to
basically work:

   hjstein@randy:~$ cat foo.c
   #include <stdio.h>

   main ()
   {
       int i;
       double x = 0;
       for (i=1; i<100; i++) {
	   x+= i*i/2;
       }
       printf("x = %f\n", x);
   }

   hjstein@randy:~$ gcc -pg -g -O2 foo.c -o foo
   hjstein@randy:~$ ./foo
   x = 164150.000000

gprof runs on the output & doesn't seg fault.

I also seem to be able to use the -a option for block counting:

   hjstein@randy:~$ gcc -pg -g -O2 -a foo.c -o foo
   ld: bfd assertion fail elf64-alpha.c:2312
   ld: bfd assertion fail elf64-alpha.c:2312
   hjstein@randy:~$ ./foo
   x = 164150.000000

gprof also seems to work, except that with the -l --annotate options
it seems that nothing happens:

   hjstein@randy:~$ gprof -l --annotate foo
   hjstein@randy:~$ 

Firstly, does anyone know of any way to fix this?  And secondly, the
two above failed assertions are worrying.  Is this something I should
worry about?

Thanks,

-- 
Harvey J. Stein
Berger Financial Research
hjstein@bfr.co.il

--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gprof almost there...
  1997-10-05 19:59 gprof almost there Harvey J. Stein
@ 1997-10-05 20:59 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 1997-10-05 20:59 UTC (permalink / raw)


On Sun, Oct 05, 1997 at 09:59:28PM +0200, Harvey J. Stein wrote:
> 
>    ld: bfd assertion fail elf64-alpha.c:2312
>    ld: bfd assertion fail elf64-alpha.c:2312
> 
> And secondly, the two above failed assertions are worrying. 
> Is this something I should worry about?

No.  The assertion was bogus.  It is a correct condition that could
occur in staticly linked binaries, and the code goes ahead and does
the right thing.

It has been removed in current binutils releases.

r~

--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-10-05 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-05 19:59 gprof almost there Harvey J. Stein
1997-10-05 20:59 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox