Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Linux Tools Project/GProf/User Guide"

(First draft of the Gprof documentation)
 
(First draft of the Gprof documentation)
Line 11: Line 11:
 
First of all, the user has to compile the C/C++ program with profiling enabled using the -pg option prior to running the tool.  
 
First of all, the user has to compile the C/C++ program with profiling enabled using the -pg option prior to running the tool.  
  
[[Image:http://www.eclipse.org/linuxtools/new-0.4/images-0.4/gprof-compile-step.png]]
+
[[Image:gprof-compile-step.png]]
  
 
= Opening gmon.out =
 
= Opening gmon.out =
  
 
Once the application run is finished, a gmon.out file is generated under the project.
 
Once the application run is finished, a gmon.out file is generated under the project.
[[Image:http://www.eclipse.org/linuxtools/new-0.4/images-0.4/gprof-project-explorer.png]]
+
[[Image:gprof-project-explorer.png]]
  
  
 
Double clicking on this file will open a dialog to select the associated binary.  
 
Double clicking on this file will open a dialog to select the associated binary.  
[[Image:http://www.eclipse.org/linuxtools/new-0.4/images-0.4/gprof-binary-file.png]]
+
[[Image:gprof-binary-file.png]]
  
  

Revision as of 11:22, 27 April 2010

{{#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.

Gprof-compile-step.png

Opening gmon.out

Once the application run is finished, a gmon.out file is generated under the project. Gprof-project-explorer.png


Double clicking on this file will open a dialog to select the associated binary. 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.

Back to the top