Hello!

This content has been updated. You will be momentarily redirected to the current version.

Moved!



Moved! I now blog at http://www.saicharan.in



Friday, September 14, 2007

MinGW GProf with Eclipse 3.3 (Europa )

To use MinGW gprof with Eclipse, in the project settings, under complier, enable the gprof option. Further, in the Linker section, under command line, add -pg to your list. Build the program. Run the program and check that the gmon.out file has been created.

You can run gprof as follows:
gprof.exe .

You can run gprof from within eclipse by configuring the external tools:
1. Open the external tools dialog
2. Double click on program to create a new program configuration
3. Give this profile a name, eg. gprof
4. In the location text box, give the FULL path to the grpof command
5. In the working directory, choose: ${workspace_loc:/path/to/executable}
6. Arguements: ${file_prompt} ${GMON}, where GMON has been assigned the path to the gmon.out file using the variables button.

References:
1.http://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.cmds/doc/aixcmds2/gprof.htm
2.http://gcc.gnu.org/ml/fortran/2006-11/msg00217.html

1 comment:

Unknown said...
This comment has been removed by the author.