System information

110 System Analysis and Tuning Guide
8.6 Generating Reports
Before generating a report, make sure OProfile has dumped your data to the /var/
lib/oprofile/samples directory using the command opcontrol --dump.
A report can be generated with the commands opreport or opannotate.
Calling oreport without any options gives a complete summary. With an executable
as an argument, retrieve profile data only from this executable. If you analyze applica-
tions written in C++, use the --demangle smart option.
The opannotate generates output with annotations from source code. Run it with
the following options:
opannotate --source \
--base-dirs=BASEDIR \
--search-dirs= \
--output-dir=annotated/ \
/lib/libfoo.so
The option --base-dir contains a comma separated list of paths which is stripped
from debug source files. This paths were searched prior than looking in --search-
dirs. The --search-dirs option is also a comma separated list of directories to
search for source files.
NOTE: Inaccuracies in Annotated Source
Due to compiler optimization, code can disappear and appear in a different
place. Use the information in http://oprofile.sourceforge.net/
doc/debug-info.html to fully understand its implications.
8.7 For More Information
This chapter only provides a short overview. Refer to the following links for more in-
formation:
http://oprofile.sourceforge.net
The project home page.
Manpages
Details descriptions about the options of the different tools.