This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gprof basic-block counting?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]