gcc + gprof : basic bloc counting

Discussion in 'C Programming' started by =?iso-8859-1?q?Nicolas_Herv=E9?=, Jul 25, 2007.

  1. I am using gprof, and as explain in
    http://www.gnu.org/software/binutils/manual/gprof-2.9.1/html_node/gprof_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
    =?iso-8859-1?q?Nicolas_Herv=E9?=, Jul 25, 2007
    #1
    1. Advertising

  2. =?iso-8859-1?q?Nicolas_Herv=E9?=

    Flash Gordon Guest

    Nicolas Hervé wrote, On 25/07/07 22:08:
    > 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
    Flash Gordon, Jul 25, 2007
    #2
    1. Advertising

  3. =?iso-8859-1?q?Nicolas_Herv=E9?=

    Richard Guest

    Nicolas Hervé <> writes:

    > I am using gprof, and as explain in
    > http://www.gnu.org/software/binutils/manual/gprof-2.9.1/html_node/gprof_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.
    Richard, Jul 26, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jcomeau_ictx

    gcc -pg and gprof not showing libc call times

    jcomeau_ictx, Oct 15, 2009, in forum: C Programming
    Replies:
    2
    Views:
    1,231
    Tim Prince
    Oct 16, 2009
  2. Josselin

    exit in a bloc DRY way...

    Josselin, Feb 18, 2007, in forum: Ruby
    Replies:
    8
    Views:
    105
    SonOfLilit
    Feb 18, 2007
  3. Yaya __

    Proc&Bloc

    Yaya __, Apr 11, 2007, in forum: Ruby
    Replies:
    2
    Views:
    75
    Yaya Sow
    Apr 11, 2007
  4. Josselin
    Replies:
    2
    Views:
    95
    Josselin
    Oct 2, 2007
  5. Tj Holowaychuk

    Bloc param parens |memo, (a, b)|

    Tj Holowaychuk, Jan 16, 2009, in forum: Ruby
    Replies:
    2
    Views:
    69
    Tj Holowaychuk
    Jan 16, 2009
Loading...

Share This Page