Product SiteDocumentation Site

19.5.4. Using opannotate

The opannotate tool tries to match the samples for particular instructions to the corresponding lines in the source code. The resulting files generated should have the samples for the lines at the left. It also puts in a comment at the beginning of each function listing the total samples for the function.
For this utility to work, the appropriate debuginfo package for the executable must be installed on the system. By default, Fedora debuginfo packages are not installed together with their corresponding packages, which contain the executable, so that you have to obtain and install the debuginfo packages separately.
The general syntax for opannotate is as follows:
~]# opannotate --search-dirs src-dir --source executable
The directory containing the source code and the executable to be analyzed must be specified. See the opannotate man page for a list of additional command line options.