Go to the first, previous, next, last section, table of contents.


Symspecs

Many of the output options allow functions to be included or excluded using symspecs (symbol specifications), which observe the following syntax:

  filename_containing_a_dot
| funcname_not_containing_a_dot
| linenumber
| ( [ any_filename ] `:' ( any_funcname | linenumber ) )

Here are some sample symspecs:

main.c
Selects everything in file "main.c"---the dot in the string tells gprof to interpret the string as a filename, rather than as a function name. To select a file whose name does not contain a dot, a trailing colon should be specified. For example, "odd:" is interpreted as the file named "odd".
main
Selects all functions named "main". Notice that there may be multiple instances of the same function name because some of the definitions may be local (i.e., static). Unless a function name is unique in a program, you must use the colon notation explained below to specify a function from a specific source file. Sometimes, function names contain dots. In such cases, it is necessar to add a leading colon to the name. For example, ":.mul" selects function ".mul".
main.c:main
Selects function "main" in file "main.c".
main.c:134
Selects line 134 in file "main.c".


Go to the first, previous, next, last section, table of contents.