Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Linux Tools Project/GProf/User Guide
{{#eclipseproject:technology.linux-distros}}
Overview
The Gprof plugin allows to visualize in eclipse gprof's output (aka gmon.out).
For more details on gprof, visit the GNU Gprof documentation at http://sourceware.org/binutils/docs-2.20/gprof/index.html .
Installation and Set-Up
Gprof plugin depends on binutils (such as addr2line, c++filt and nm). Gprof can be used on any platform as soon as these binutils are in PATH. For example, you can use it on windows with cygwin.
First of all, the user has to compile the C/C++ program with profiling enabled using the -pg option prior to running the tool.
File:Http://www.eclipse.org/linuxtools/new-0.4/images-0.4/gprof-compile-step.png
Opening gmon.out
Once the application run is finished, a gmon.out file is generated under the project. File:Http://www.eclipse.org/linuxtools/new-0.4/images-0.4/gprof-project-explorer.png
Double clicking on this file will open a dialog to select the associated binary.
File:Http://www.eclipse.org/linuxtools/new-0.4/images-0.4/gprof-binary-file.png
GProf View
The Gprof view shows which parts of the program consume most of the execution time. It also provides call graph infomation for each function. Source code can be viewed in an editor by double clicking on a function in the tree.
It's also possible to generate BIRT charts from this view.
Troubleshooting
If you encounter a problem with gprof plugin, please file a bug.