The gprof utility produces an execution profile of a program.
| -a | Suppress printing statically declared functions. If this option is given, all relevant information about the static function (for instance, time samples, calls to other functions, calls from other functions) belongs to the function loaded just before the static function in the a.out file. |
| -b | Brief. Suppress descriptions of each field in the profile. |
| -c | Discover the static call-graph of the program by a heuristic which examines the text space of the object file. Static-only parents or children are indicated with call counts of 0. Note that for dynamically linked executables, the linked shared objects' text segments are not examined. |
| -C | Demangle C++ symbol names before printing them out. |
| -D | Produce a profile file gmon.sum that represents the difference of the profile information in all specified profile files. This summary profile file may be given to subsequent executions of gprof (also with -D) to summarize profile data across several runs of an a.out file. See also the -s option. As an example, suppose function A calls function B n times in profile file gmon.sum, and m times in profile file gmon.out. With -D, a new gmon.sum file will be created showing the number of calls from A to B as n-m. |
| -l | Suppress the reporting of graph profile entries for all local symbols. This option would be the equivalent of placing all of the local symbols for the specified executable image on the -E exclusion list. |
| -s | Produce a profile file gmon.sum which represents the sum of the profile information in all of the specified profile files. This summary profile file may be given to subsequent executions of gprof (also with -s) to accumulate profile data across several runs of an a.out file. See also the -D option. |
| -z | Display routines which have zero usage (as indicated by call counts and accumulated time). This is useful in conjunction with the -c option for discovering which routines were never called. Note that this has restricted use for dynamically linked executables, since shared object text space will not be examined by the -c option. |
| -e function-name | Suppress printing the graph profile entry for routine function-name and all its descendants (unless they have other ancestors that are not suppressed). More than one -e option may be given. Only one function-name may be given with each -e option. |
| -E function-name | Suppress printing the graph profile entry for routine function-name (and its descendants) as -e, below, and also exclude the time spent in function-name (and its descendants) from the total and percentage time computations. More than one -E option may be given. For example: `-E mcount -E mcleanup' is the default. |
| -f function-name | Print the graph profile entry only for routine function-name and its descendants. More than one -f option may be given. Only one function-name may be given with each -f option. |
| -F function-name | Print the graph profile entry only for routine function-name and its descendants (as -f, below) and also use only the times of the printed routines in total time and percentage computations. More than one -F option may be given. Only one function-name may be given with each -F option. The -F option overrides the -E option. |