Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Harvey J. Stein <abel@netvision.net.il>
Subject: Profiling still broken?
Date: Mon, 29 Sep 1997 15:37:56 +0200	[thread overview]
Message-ID: <199709291337.PAA29887@blinky.bfr.co.il> (raw)

Is profiling working now?  I saw various discussions in the axp-list
archive about broken profiling, but they seemed to be fairly old and
have been resolved.  None the less, I'm still having trouble using
profiling.

Basically, if I compile with -pg then the program segfaults in
__i333_set_fp_control.  If I compile with -p then the program runs but
gprof can't process the profiling file, and I don't seem to have a
prof program.

This is with gcc-2.7.2.1-2b, which is rpm 2.7.2.1-2 + Richard
Henderson's recently distributed patch, glibc-0.961212-5, and
kernel-source-2.0.30-3.  I.e. - a fairly straight forward RedHat 4.2 +
the recent gcc patch.

Here's an example:
   hjstein@randy:~/pascal/Tests/cmo$ 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:~/pascal/Tests/cmo$ gcc -p -g -o foo foo.c
   hjstein@randy:~/pascal/Tests/cmo$ ls -l gmon.out
   ls: gmon.out: No such file or directory
   hjstein@randy:~/pascal/Tests/cmo$ ./foo
   x = 164150.000000
   hjstein@randy:~/pascal/Tests/cmo$ ls -l gmon.out
   -rw-r--r--   1 hjstein  users         378 Sep 29 09:27 gmon.out
   hjstein@randy:~/pascal/Tests/cmo$ gprof foo gmon.out
   gprof: gmon.out: unexpected end of file
   hjstein@randy:~/pascal/Tests/cmo$ prof foo gmon.out
   bash: prof: command not found
   hjstein@randy:~/pascal/Tests/cmo$ rm gmon.out 
   hjstein@randy:~/pascal/Tests/cmo$ gcc -pg -g -o foo foo.c
   hjstein@randy:~/pascal/Tests/cmo$ ./foo
   Segmentation fault (core dumped)
   hjstein@randy:~/pascal/Tests/cmo$ gdb foo
   GDB is free software and you are welcome to distribute copies of it
    under certain conditions; type "show copying" to see the conditions.
   There is absolutely no warranty for GDB; type "show warranty" for details.
   GDB 4.16 (alpha-unknown-linux), Copyright 1996 Free Software Foundation, Inc...
   (gdb) run
   Starting program: /home/hjstein/pascal/Tests/cmo/foo 

   Program received signal SIGSEGV, Segmentation fault.
   __ieee_set_fp_control () at ../sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S:29
   ../sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S:29: No such file or directory.
   Current language:  auto; currently asm
   (gdb) quit
   The program is running.  Quit anyway (and kill it)? (y or n) y

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

             reply	other threads:[~1997-09-29 13:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-29 13:37 Harvey J. Stein [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-09-29 17:51 Profiling still broken? Toon Moene
     [not found] <9709291751.AA16877@moene.indiv.nluug.nl>
1997-09-30 13:50 ` Harvey J. Stein
1997-10-01 11:05 ` Harvey J. Stein
1997-09-30 17:35 Toon Moene
     [not found] <199710011105.NAA09773@blinky.bfr.co.il>
1997-10-02  6:09 ` Richard Henderson
1997-10-02  8:12 Stefan Schroepfer
     [not found] <34335786.41C67EA6@iis.fhg.de>
1997-10-02 16:05 ` Richard Henderson
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