From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199709291337.PAA29887@blinky.bfr.co.il> Date: Mon, 29 Sep 1997 15:37:56 +0200 From: Harvey J. Stein Subject: Profiling still broken? 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 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