Page doesn't render properly ?

Manuals

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 :
    opreport

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 op_help.
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
ARM/XScale PMU1 (kernel >= 2.6.8 only)
ARM/XScale PMU2 (kernel >= 2.6.8 only)
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)
MIPS rm9000 (kernel >= 2.6.11)
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)
AMD64 family10
AMD64 family11h
ARM MPCore
ARM V6
ARM V7
AVR32
Intel Atom
Intel Core Solo/Duo
Intel Core 2
Intel Core i7 (Nehalem)
Intel architectural perfmon (Intel Core and newer processors)
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)

More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity. - W. A. Wulf
2009/11/24