OPROFILE(1)

πŸ“¦
version 1.4.0 Β· 2 versions
, in ubuntu jammy

✨ 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 with opreport, 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 by oparchive.
  • 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 specifying session: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 as image:, but the matching images are excluded. not invited to the party 🚫
  • lib-image:imagelist β€” same as image:, 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 as lib-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 with tgid: 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 for opreport XML output.
  • /usr/share/doc/oprofile/ophelp.xsd β€” schema file for ophelp XML 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 πŸ“š


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