Previous: Code Coverage of Ada Programs using gcov, Up: Code Coverage and Profiling

29.2 Profiling an Ada Program using gprof

This section is not meant to be an exhaustive documentation of gprof. Full documentation for it can be found in the GNU Profiler User's Guide documentation that is part of this GNAT distribution.

Profiling a program helps determine the parts of a program that are executed most often, and are therefore the most time-consuming.

gprof is the standard GNU profiling tool; it has been enhanced to better handle Ada programs and multitasking. It is currently supported on the following platforms

In order to profile a program using gprof, 3 steps are needed:

The following sections detail the different steps, and indicate how to interpret the results: