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


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.


1 comment:

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