OPROFILE(1)
β¨ oprofile(1) β the manual, but make it make sense β¨
okay bestie, sit down, hydrate, because we're about to talk about oprofile β a statistical profiler for Linux systems π it's genuinely iconic: it can profile all running code at low overhead, and it also ships with a whole lil squad of post-profiling analysis tools plus a simple event counting tool. no cap. π«Ά
this page lives in the General Commands Manual section, so like⦠it's the real deal.
πΈ NAME πΈ
oprofile β a statistical profiler for Linux systems, capable of profiling all running code at low overhead; also included is a set of post-profiling analysis tools, as well as a simple event counting tool β¨
π SYNOPSIS π
operf [ options ]
ocount [ options ]
opreport [ options ] [ profile specification ]
opannotate [ options ] [ profile specification ]
oparchive [ options ] [ profile specification ]
opgprof [ options ] [ profile specification ]
π DESCRIPTION π
OProfile is a profiling system for systems running Linux 2.6.31 and greater. it makes use of the hardware performance counters provided on Intel, AMD, and other processors β yes bestie, it's out here reading the actual silicon's receipts π₯
OProfile can profile a selected program or process, or the whole system. and it can also be used to collect cumulative event counts at the application, process, or system level. it's giving versatility, it's giving range π
for a gentle guide to using OProfile, please read the HTML documentation listed in SEE ALSO β literally go read it, it's right there at the bottom π¦
π OPERF π
operf is a performance profiler tool for Linux. periodt.
π OCOUNT π
ocount is an event counting tool for Linux. tiny tool, big energy.
π OPREPORT π
opreport gives image and symbol-based profile summaries for the whole system or a subset of binary images. it's the "so what actually happened" tool fr fr.
π§ OPANNOTATE π§
opannotate can produce annotated source or mixed source and assembly output. aesthetic and informative, we love to see it.
π OPARCHIVE π
oparchive produces oprofile archive for offline analysis β so you can take your little profile data on tour βοΈ
π OPGPROF π
opgprof can produce a gprof-format profile for a single binary. one binary, one glow-up.
β¨ PROFILE SPECIFICATIONS β¨
various optional profile specifications may be used with the post-profiling tools. a profile specification is some combination of the parameters listed below. π«Ά
β οΈ note, bestie: enclosing part of a profile specification in curly braces{ }can be used for differential profiles withopreport, but the braces must be surrounded by whitespace. do not skip the whitespace, i'm begging π
archive:archiveβ path to the archive to inspect, as generated byoparchive.session:sessionlistβ a comma-separated list of session names to resolve in. absence of this tag, unlike all others, means "the current session", equivalent to specifyingsession:current. yeah, it's the special one πsession-exclude:sessionlistβ a comma-separated list of sessions to exclude. bye πimage:imagelistβ a comma-separated list of image names to resolve. each entry may be a relative path, a glob-style name, or a full path, e.g.
opreport 'image:/usr/bin/operf,*op*,./oprofpp'
image-exclude:imagelistβ same asimage:, but the matching images are excluded. not invited to the party π«lib-image:imagelistβ same asimage:, but only for images that are for a particular primary binary image (namely, an application). this only makes sense to use if you're using--separate. this includes kernel modules and the kernel when using--separate=kernel.lib-image-exclude:imagelistβ same aslib-image:, but the matching images are excluded.event:eventnameβ the symbolic event name to match on, e.g.event:DATA_MEM_REFS.count:eventcountβ the event count to match on, e.g.event:DATA_MEM_REFS count:30000.unit-mask:maskvalueβ the unit mask value of the event to match on, e.g.unit-mask:1.cpu:cpulistβ only consider profiles for the given numbered CPU (starting from zero). this is only useful when using CPU profile separation.tgid:pidlistβ only consider profiles for the given task groups. unless some program is using threads, the task group ID of a process is the same as its process ID. this option corresponds to the POSIX notion of a thread group. this is only useful when using per-process profile separation.tid:tidlistβ only consider profiles for the given threads. when using recent thread libraries, all threads in a process share the same task group ID, but have different thread IDs. you can use this option in combination withtgid:to restrict the results to particular threads within a process. this is only useful when using per-process profile separation.
π± ENVIRONMENT π±
no special environment variables are recognized by OProfile. that's it. that's the section. nothing to see here bestie, go home π
π FILES π
/usr/share/doc/oprofile/oprofile.htmlβ OProfile user guide./usr/share/doc/oprofile/opreport.xsdβ schema file foropreportXML output./usr/share/doc/oprofile/ophelp.xsdβ schema file forophelpXML output./usr/share/oprofile/β event description files used by OProfile.<session-dir>/samples/operf.logβ the profiler log file.<session-dir>/samples/currentβ the location of the generated sample files.
β VERSION β
this man page is current for oprofile-1.4.0. iykyk π
π¦ SEE ALSO π¦
/usr/share/doc/oprofile/, operf(1), ocount(1), opreport(1), opannotate(1), oparchive(1), opgprof(1), gprof(1), and CPU vendor architecture manuals π
π COPYRIGHT π
oprofile is Copyright (C) 1998-2004 University of Manchester, UK, John Levon, and others. OProfile is released under the GNU General Public License, Version 2, or (at your option) any later version. slay, legally π«Ά
πΈ AUTHORS πΈ
John Levon <levon@movementarian.org> is the primary author β main character energy, truly. see the documentation for other contributors π
and that's the whole page bestie!! this one's from the 4th Berkeley Distribution, dated Thu 21 January 2021 β go profile something and make me proud β¨ππ¦π
π¦ where this page comes from
- ubuntu jammy: oprofile 1.4.0-0ubuntu7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms