[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help-using gnu's gprof for getting profiling information

From: Stepan Kasal
Subject: Re: help-using gnu's gprof for getting profiling information
Date: Tue, 6 Apr 2004 11:42:57 +0200
User-agent: Mutt/1.4.1i


On Mon, Apr 05, 2004 at 08:34:07PM -0500, Rakesh M. Patel wrote:
I suggest that you work in a separate directory, so that you can easily
see what files have been created. Perhaps:

>    c:\testdir> gcc -o test_prog test_prog.c -g -pg -a
>    c:\testdir> rm bb.out
>    c:\testdir> test_prog

The last command should create two files: gmon.out and bb.out
which together contain the information you need.
The file bb.out is a text file, but gprof cannot read it.

Thus you can transform its contents into a binary file.
To perform this, you have to use the program bbconv.pl which is part
of gcc distribution.  Either you have it as part of your instalation,
or you have to extract it from gcc source tarball.
(If you use cygwin, the source tarball should be installable through

To run bbconv.pl, you need perl.  I'm sure perl for Windows is available
in various ways, cygwin being one of them.

When bbconv is sucessfully run and a non-empty BB-DATA file is created,
you can run gprof:

>    c:\> gprof -A -l test_prog gmon.out BB-DATA

Good luck,

Stepan Kasal

PS: If you could find a user of unix and GNU/Linux and discuss these
instructions with him, it could prove helpful.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]