Page doesn't render properly ?


The manuals listed below are intended for three different audiences:

Example reports

You might want to see some example OProfile output.

Cheat sheet

Your 4-step plan to profiling.

  1. Compile and install oprofile, making sure to use --with-linux option to point to your current kernel source, or --with-kernel-support for 2.6 kernels.
  2. Start up the profiler :
    opcontrol --vmlinux=/path/to/vmlinux opcontrol --start
  3. Now the profiler is running, go do what ever you want to profile.
  4. Now let's generate a profile summary :
    opreport -l /path/to/mybinary
    Or, if we built our binary with -g, we can produce some annotated source :
    opannotate --source --output-dir=/path/to/annotated-source /path/to/mybinary
    Or we can look at the rankings of the various system components as a whole :

If you reinstall Oprofile over a previous version you need, before starting the profiler, to:

opcontrol --reset

Event type reference

Quick reference for the available event types for the performance counters. The same info can be retrieved by running ophelp.
ALPHA EV4 (kernel 2.6 only)
ALPHA EV5 (kernel 2.6 only)
ALPHA EV6 (kernel 2.6 only)
ALPHA EV67 (kernel 2.6 only)
AMD Athlon/Duron
AMD64 Hammer
AMD64 family10
AMD64 family11h
AMD64 family12h
AMD64 family14h
AMD64 family15h
AMD64 Generic Performance Events
ARM/XScale PMU1 (kernel >= 2.6.8 only)
ARM/XScale PMU2 (kernel >= 2.6.8 only)
ARM V7 Cortex-A9
ARM V7 Scorpion
ARM V7 ScorpionMP
ARM Cortex-A5
ARM Cortex-A7
ARM Cortex-A15
Intel Pentium Pro
Intel Pentium II
Intel Pentium III
Intel P4
Intel P4 with hyperthreading (kernel 2.6 only)
Intel pentium M (P6 core) (kernel >= 2.6.7 only)
Intel IA64 (kernel 2.4 only)
Intel IA64 Itanium (kernel 2.4 only)
Intel IA64 Itanium2 (kernel 2.4 only)
Intel Atom
Intel Core Solo/Duo
Intel Core 2
Intel Core i7 (Nehalem)
Intel architectural perfmon (Intel Core and newer processors)
Intel Nehalem
Intel Westmere
Intel Sandy Bridge
Intel Ivy Bridge microarchitecture
Intel Haswell microarchitecture
MIPS rm9000 (kernel >= 2.6.11)
MIPS Loongson2
MIPS 1004K
ppc e500 (kernel >= 2.6.11 only)
ppc64 POWER4 (kernel >= 2.6.9 only)
ppc64 POWER5 (kernel >= 2.6.9 only)
ppc64 970 (kernel 2.6 only)
PowerPC G4
PowerPC e300
PowerPC e500 v2
ppc64 970MP
ppc64 Cell Broadband Engine (kernel >= 2.6.18)
ppc64 PA6T
ppc64 POWER5+
ppc64 POWER5++
ppc64 POWER6
ppc64 POWER7
ppc64 architected events, version 1 (POWER6 and newer processors)
ppc64 ISA 2.07 Architected Events
ppc64 POWER8
IBM System z10
IBM zEnterprise z196
IBM zEnterprise zEC12

Measurement is a crucial component of performance improvement since reasoning and intuition are fallible guides and must be supplemented with tools like timing commands and profilers. - The Practice of Programming, Brian W. Kernighan and Rob Pike