Update gprof documentation

Segher Boessenkool segher@kernel.crashing.org
Wed Oct 29 18:32:00 GMT 2003


Nick Clifton wrote:
> + Note: The @samp{-pg} option must be part of your compilation options
> + as well as your link options.  If it is not, when you run @code{gprof}
> + you will get no profile report and an error message like this:
> + 
> + @example
> + gprof: gmon.out file is missing call-graph data
> + @end example

So use -p or -Q.  It is very useful to link, but not compile with -pg .

Also, there is no reason this should be an error; a warning is fine,
but if a gmon file contains a flat profile (and no call graph data),
it is more logical to still display that profile than to bail out
completely.


Segher



More information about the Binutils mailing list