Connecting Tech Pros Worldwide Forums | Help | Site Map

gcc + gprof : basic bloc counting

=?iso-8859-1?q?Nicolas_Herv=E9?=
Guest
 
Posts: n/a
#1: Jul 25 '07
I am using gprof, and as explain in
http://www.gnu.org/software/binutils..._18.html#SEC18
I could use the "-g -pg -a" options of gcc and then use the "-l -A"
options of gprof to obtain an anotated source listing at the basic
bloc level.

Unfortunately my version of gcc (4.0.0) does not recognize the "-a"
option.
cc1: error: unrecognized command line option "-a"

So does the option name have changed, or does this feature desapears ?
I have tried with the -fprofile-arcs option, but it does'nt seems to
be the good one.

Any Idee ?
Thanks


Flash Gordon
Guest
 
Posts: n/a
#2: Jul 25 '07

re: gcc + gprof : basic bloc counting


Nicolas Hervé wrote, On 25/07/07 22:08:
Quote:
I am using gprof, and as explain in
<snip>

This is about gcc and gprof rather than about the C programming
language, so you need to ask somewhere specific to you tools or OS such
as gnu.gcc.help or one of the GNU mailing lists.
-
Flash Gordon
Richard
Guest
 
Posts: n/a
#3: Jul 26 '07

re: gcc + gprof : basic bloc counting


Nicolas Hervé <nicolas.herve@gmail.comwrites:
Quote:
I am using gprof, and as explain in
http://www.gnu.org/software/binutils..._18.html#SEC18
I could use the "-g -pg -a" options of gcc and then use the "-l -A"
options of gprof to obtain an anotated source listing at the basic
bloc level.
>
Unfortunately my version of gcc (4.0.0) does not recognize the "-a"
option.
cc1: error: unrecognized command line option "-a"
>
So does the option name have changed, or does this feature desapears ?
I have tried with the -fprofile-arcs option, but it does'nt seems to
be the good one.
>
Any Idee ?
Thanks

it's wrong or misleading.

-pg to activate and link the profiling libraries
-g for line by line profiling

-a is an option for gprof.

Closed Thread