Scroll to navigation

OPANNOTATE(1) General Commands Manual OPANNOTATE(1)

NAME

opannotate - produce source or assembly annotated with profile data

SYNOPSIS

opannotate [ options ] [profile specification]

DESCRIPTION

opannotate outputs annotated source and/or assembly from profile data of an OProfile session. See oprofile(1) for how to write profile specifications.

OPTIONS

Output annotated assembly. The binary file to be annotated does not need full debugging information to use this option, but symbol information is required. Without symbol information, opannotate will silently refuse to annotate the binary. If this option is combined with --source, then mixed source / assembly annotations are output.
none: no demangling. normal: use default demangler (default) smart: use pattern-matching to make C++ symbol demangling more readable.
Do not include application-specific images for libraries, kernel modules and the kernel. This option only makes sense if the profile session used --separate.
Exclude all files in the given comma-separated list of glob patterns. This option is supported solely with the --source option. It can be used to filter out source files in the output using the following types of specifications:
  • filenames (basename -- i.e., no path)
  • filename glob specifications (all files whose base filename matches the given pattern)
  • directory segments (all source files located in the specified directory; e.g. "libio")
  • directory segment glob specifications (e.g., "libi*")

Exclude all the symbols in the given comma-separated list.
Show help message.
Comma-separated list of additional paths to search for binaries. This is needed to find modules in kernels 2.6 and upwards.
A path to a filesystem to search for additional binaries.
Only include files in the given comma-separated list of glob patterns. The same rules apply for this option as for the --exclude-file option.
Merge any profiles separated in a --separate session.
Only include symbols in the given comma-separated list.
Pass the given parameters as extra values when calling objdump. If more than one option is to be passed to objdump, the parameters must be enclosed in a quoted string.

An example of where this option is useful is when your toolchain does not automatically recognize instructions that are specific to your processor. For example, on IBM POWER7/RHEL 6, objdump must be told that a binary file may have POWER7-specific instructions. The opannotate option to show the POWER7-specific instructions is:
--objdump-params=-Mpower7

The opannotate option to show the POWER7-specific instructions, the source code (--source) and the line numbers (-l) would be:
--objdump-params="-Mpower7 -l --source"

Output directory. This makes opannotate output one annotated file for each source file. This option can't be used in conjunction with --assembly.
Comma-separated list of paths to search for source files. You may need to use this option when the debug information for an image contains relative paths.
Comma-separated list of paths to strip from debug source files, prior to looking for them in --search-dirs.
Use sample database from the specified directory dir_path instead of the default location. If --session-dir is not specified, then opannotate will search for samples in <current_dir>/oprofile_data first. If that directory does not exist, the standard session-dir of /var/lib/oprofile is used.
Output annotated source. This requires debugging information to be available for the binaries.
For annotated assembly, only output data for symbols that have more than the given percentage of total samples. For profiles using multiple events, if the threshold is reached for any event, then all sample data for the symbol is shown.

For annotated source, only output data for source files that have more than the given percentage of total samples. For profiles using multiple events, if the threshold is reached for any event, then all sample data for the source file is shown.

Give verbose debugging output.
Show version.

ENVIRONMENT

No special environment variables are recognised by opannotate.

FILES

<session_dir>/samples
The location of the generated sample files.

VERSION

SEE ALSO

/usr/share/doc/oprofile/, oprofile(1)

Fri 08 November 2024 4th Berkeley Distribution