Update gprof documentation

Zack Weinberg zack@codesourcery.com
Wed Oct 29 20:44:00 GMT 2003


Nick Clifton <nickc@redhat.com> writes:

> ! In addition to the @samp{-pg} and @samp{-g} options, older versions of
> ! GCC required you to specify the @samp{-a} option when compiling in
> ! order to instrument it to perform basic-block counting.  Newer
> ! versions do not require this option and will not accept it;
> ! basic-block counting is always enabled when @samp{-pg} is on.

To the best of my knowledge, this is not true.  The -a option is no
longer supported; however, -pg does not cause basic block profiling.
You need -fprofile-arcs for that.  (And -fprofile-arcs does a very
different sort of profiling; you don't use gprof to examine the
results.)

zw



More information about the Binutils mailing list