This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: line-by-line profiling
- From: Jan Hubicka <jh at suse dot cz>
- To: "Neal D. Becker" <nbecker at hns dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 21 Nov 2002 14:37:08 +0100
- Subject: Re: line-by-line profiling
- References: <x88isyrhwqj.fsf@rpppc1.md.hns.com>
> 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?
Compiling with g++ -mcpu=athlon-xp -march=athlon-xp -O6 -ftest-coverage
-ffast-math -fprofile-arcs, then running
gcov source.c