Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Integrating GPROF into Eclipse 3 (linux)
Integrating GPROF into Eclipse 3 (linux) [message #94764] Thu, 19 February 2004 14:36 Go to next message
Eclipse UserFriend
Hi,

I set up the properties so that profile and gprof are in use.

I did a rebuild all of the project called 'test' (its a managed make for
C++)


I do a ls on the Debug Directory
The files are:
main.o makefile subdir.mk subdir.dep test

When I examine the build by doing a make from the command line, I see the
-p and -pg parameters show up. However no gmon.out file is produced
(whether by elipse's managed make, or by the command line directly).

When I try running gprof from the command line it complains because I
don't have a gmon.out file.

I tried setting up an external tool for gprof (I'm not sure if this is the
proper way to go about it). I am not sure what arguments I am supposed to
use to make it work, however I did print out the manpage.

What do I need to do so that eclipse will generate the 'gmon.out' file?

Thanks

David
Re: Integrating GPROF into Eclipse 3 (linux) [message #94992 is a reply to message #94764] Sat, 21 February 2004 07:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ashs01.uqo.ca

The gmon.out file is generated when you execute the program you just built.
And just as a note for gprof you simply need the -pg option on both the
compiler and linker command lines.


David Bearh wrote:

> Hi,

> I set up the properties so that profile and gprof are in use.

> I did a rebuild all of the project called 'test' (its a managed make for
> C++)


> I do a ls on the Debug Directory
> The files are:
> main.o makefile subdir.mk subdir.dep test

> When I examine the build by doing a make from the command line, I see the
> -p and -pg parameters show up. However no gmon.out file is produced
> (whether by elipse's managed make, or by the command line directly).

> When I try running gprof from the command line it complains because I
> don't have a gmon.out file.

> I tried setting up an external tool for gprof (I'm not sure if this is the
> proper way to go about it). I am not sure what arguments I am supposed to
> use to make it work, however I did print out the manpage.

> What do I need to do so that eclipse will generate the 'gmon.out' file?

> Thanks

> David
Re: Integrating GPROF into Eclipse 3 (linux) [message #95197 is a reply to message #94992] Tue, 24 February 2004 09:56 Go to previous message
Eclipse UserFriend
Hi Sébastien,

Thanks for the help. I tried that out and it appears to be working.

When I setup the new tool, I did this to get the external tool on my menu



Field Name Value Notes
Name gprof
Location /usr/bin/gprof
Working Directory ${resource_loc}
Arguments ${project_name}

Doing this allows me to run gprof on any selected project.

David

Sébastien Ashby wrote:

> The gmon.out file is generated when you execute the program you just built.
> And just as a note for gprof you simply need the -pg option on both the
> compiler and linker command lines.


> David Bearh wrote:

> > Hi,

> > I set up the properties so that profile and gprof are in use.

> > I did a rebuild all of the project called 'test' (its a managed make for
> > C++)


> > I do a ls on the Debug Directory
> > The files are:
> > main.o makefile subdir.mk subdir.dep test

> > When I examine the build by doing a make from the command line, I see the
> > -p and -pg parameters show up. However no gmon.out file is produced
> > (whether by elipse's managed make, or by the command line directly).

> > When I try running gprof from the command line it complains because I
> > don't have a gmon.out file.

> > I tried setting up an external tool for gprof (I'm not sure if this is the
> > proper way to go about it). I am not sure what arguments I am supposed to
> > use to make it work, however I did print out the manpage.

> > What do I need to do so that eclipse will generate the 'gmon.out' file?

> > Thanks

> > David
Previous Topic:import/export specifier in 2.0 M7
Next Topic:Can't install CDT correctly
Goto Forum:
  


Current Time: Tue Jun 03 05:07:24 EDT 2025

Powered by FUDForum. Page generated in 0.04983 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top