Please guide me about gcov and gprof for basic-block information

Nick Clifton nickc@redhat.com
Wed Jan 14 15:25:00 GMT 2009


Hi Fahimeh,

> I am writing to ask you about gcov and gprof.

The gcov program is not part of the binutils project, so we cannot 
really help you with that.  Try asking on the gcc@gcc.gnu.org mailing 
list instead.


> 2)  I examined "gprof -i test gmon.out bb.out" and the results were :
> 
> File `gmon.out' (version 1) contains:
> 	1 histogram record
> 	5 call-graph records
> 	0 basic-block count records
> bb.out: No such file or directory
> 
> also about bb.out.conv!

The "bb.out" file used to be produced by old versions of the C profiling 
library.  It is not used with modern versions of gprof and the glibc C 
library.

> Please guide me how I can have basic-block count records for a program?

Invoke gcc with "-g -pg" on the command line.  If you have an old 
version of gcc you may also need to add "-a" to the command line.

Cheers
   Nick






More information about the Binutils mailing list