line-by-line profiling

Neal D. Becker nbecker@hns.com
Thu Nov 21 08:01:00 GMT 2002


>>>>> "Jan" == Jan Hubicka <jh@suse.cz> writes:

    >> How do I get line-by-line profiling to work?  I'm using gcc-3.2 linux
    >> binutils-2.13.90.0.2-2.
    >> 
    >> The instructions in gprof say to turn on basic block profiling using
    >> gcc -a.  Apparantly this flag is obsolete?  I'm guessing it should be
    >> -fprofile-arcs?
    >> 
    >> Compiling with g++ -pg -g -mcpu=athlon-xp -march=athlon-xp -O6
    >> -ffast-math -fprofile-arcs, then running 
    >> 
    >> gprof -l  exechns27 > prof
    >> 
    >> The results I get don't seem to make sense.  What am I doing wrong?

    Jan> Compiling with g++ -mcpu=athlon-xp -march=athlon-xp -O6 -ftest-coverage
    Jan> -ffast-math -fprofile-arcs, then running 

    Jan> gcov source.c

Any way to get line-by-line timing info?  I see only how to get
execution count from gcov, I'm really looking for profile of execution
time.



More information about the Gcc mailing list