This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gprof basic-block counting?
- To: egcs at cygnus dot com
- Subject: gprof basic-block counting?
- From: "Fred Richardson (at home)" <frichard at bbn dot com>
- Date: Tue, 18 Aug 1998 07:56:14 -0400
- Reply-to: frichard at bbn dot com
Hi-
I've tried doing basic block counting using the following approach:
[1] Compile/link with flags -pg -a (along with -O3 -funroll-loops
-finline-functions)
[2] Run the program.
% prog <args>
[4] On i686-pc-linux-gnulibc1 and sparc-sun-solaris2.5.1 I had to
convert "bb.out" using "bbconv.pl" because bb.out was an older
text format file (according to the "gprof" info file):
% bbconv.pl bb.out > bb.out.conv
[5] Check profiling info:
% gprof -i prog gmon.out bb.out.conv
File `gmon.out' (version 0) contains:
1 histogram record
1736 call-graph records
0 basic-block count records
gprof: warning: ignoring basic-block exec counts (use -l or --line)
File `bb.out.conv' (version 1) contains:
0 histogram records
0 call-graph records
25 basic-block count records
[6] Generate profiling info:
% gprof -l prog gmon.out bb.out.conv > gprof.out
Bus error
"gprof" crashes on both i686-pc-linux-gnulibc1 and
sparc-sun-solaris2.5.1. Does anyone know what's wrong and how to fix
it?
Thanks,
-Fred