System information
OProfile—System-Wide Profiler 105
OProfile—System-Wide
Profiler
8
OProfile is a profiler for dynamic program analysis. It investigates the behaviour of a
running program and gathers information. This information can be viewed and gives
hints for further optimizations.
It is not necessary to recompile or use wrapper libraries in order to use OProfile. Not
even a Kernel patch is needed. Usually, when you profile an application, a small over-
head is expected, depending on work load and sampling frequency.
8.1 Conceptual Overview
OProfile consists of a Kernel driver and a daemon for collecting data. It makes use of
the hardware performance counters provided on Intel, AMD, and other processors.
OProfile is capable of profiling all code including the Kernel, Kernel modules, Kernel
interrupt handlers, system shared libraries, and other applications.
Modern processors support profiling through the hardware by performance counters.
Depending on the processor, there can be many counters and each of these can be
programmed with an event to count. Each counter has a value which determines how
often a sample is taken. The lower the value, the more often it is used.
During the post-processing step, all information is collected and instruction addresses
are mapped to a function name.