OPANNOTATE(1)
π opannotate(1) β the General Commands Manual cutie π
okay so this is the manual for opannotate, and itβs lowkey iconic: annotated source and/or assembly, but make it readable. fr fr π
πΈ NAME πΈ
opannotate β produce source or assembly annotated with profile data.
β¨ SYNOPSIS β¨
opannotate [ options ] [profile specification]
π¦ DESCRIPTION π¦
okay so opannotate outputs annotated source and/or assembly from profile data of an OProfile session. See oprofile(1) for how to write profile specifications. no cap, thatβs the whole vibe of this tool. π«Ά
π OPTIONS π
--assembly/-aβ 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,opannotatewill silently refuse to annotate the binary. If this option is combined with--source, then mixed source / assembly annotations are output. π--demangle/-D none|smart|normalβnone: no demangling.normal: use default demangler (default).smart: use pattern-matching to make C++ symbol demangling more readable. cute little name-cleaning moment β¨--exclude-dependent/-xβ 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-file [files]β Exclude all files in the given comma-separated list of glob patterns. This option is supported solely with the--sourceoption. 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-symbols/-e [symbols]β Exclude all the symbols in the given comma-separated list. bye bye, symbols π--help/-?/--usageβ Show help message.--image-path/-p [paths]β Comma-separated list of additional paths to search for binaries. This is needed to find modules in kernels 2.6 and upwards. very βwhere are my binaries bestieβ energy π--root/-R [path]β A path to a filesystem to search for additional binaries.--include-file [files]β Only include files in the given comma-separated list of glob patterns. The same rules apply for this option as for the--exclude-fileoption.--merge/-m [lib,cpu,tid,tgid,unitmask,all]β Merge any profiles separated in a--separatesession. group-chat merge, but for profiles π«Ά--include-symbols/-i [symbols]β Only include symbols in the given comma-separated list.--objdump-params [params]β Pass the given parameters as extra values when callingobjdump. If more than one option is to be passed toobjdump, 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-dir/-o [dir]β Output directory. This makesopannotateoutput one annotated file for each source file. This option can't be used in conjunction with--assembly. not them being incompatible, we love boundaries π--search-dirs/-d [paths]β 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.--base-dirs/-b [paths]β Comma-separated list of paths to strip from debug source files, prior to looking for them in--search-dirs.--session-dir=dir_pathβ Use sample database from the specified directorydir_pathinstead of the default location. If--session-diris not specified, thenopannotatewill search for samples in<current_dir>/oprofile_datafirst. If that directory does not exist, the standard session-dir of/var/lib/oprofileis used.--source/-sβ Output annotated source. This requires debugging information to be available for the binaries.--threshold/-t [percentage]β 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.
--verbose/-V [options]β Give verbose debugging output.--version/-vβ Show version.
π ENVIRONMENT π
No special environment variables are recognised by opannotate. ngl, itβs giving unbothered. π
π FILES π
<session_dir>/samplesβ The location of the generated sample files.
β VERSION β
This man page is current for oprofile-1.4.0.
π«Ά SEE ALSO π«Ά
/usr/share/doc/oprofile/, oprofile(1)
okay thatβs the whole manual, bestie π β source/version sign-off: 4th Berkeley Distribution, dated Thu 28 September 2023. periodt π
π¦ where this page comes from
- opensuse-leap 16.0: oprofile 1.4.0-bp160.1.14 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: oprofile 1.4.0-bp160.1.14 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: oprofile 1.4.0-bp160.1.14 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: oprofile 1.4.0-bp160.1.14 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms