2. OProfile perf_events mode
As of release 0.9.8, OProfile now includes the ability to profile a single process versus the system-wide technique
of legacy OProfile. With this new technique, the
operf program is used to control profiling instead of the
opcontrol script and
oprofiled daemon of leagacy mode. Also,
operf does not require the
special OProfile kernel driver that legacy mode does; instead, it interfaces with the kernel to collect samples via the Linux Kernel
Performance Events Subsystem (hereafter referred to as "perf_events"). Using
operf to profile a single
process can be done as a normal user; however, root authority
is required to run
operf in system-wide
profiling mode.
Note 1
The same OProfile post-processing tools are used whether you collect your profile with operf or opcontrol.
Note 2
Some older processor models are not supported by the underlying perf_events kernel and, thus, are not supported by
operf.
If you receive the message
Your kernel's Performance Events Subsystem does not support your processor type |
when attempting to use
operf, try profiling with
opcontrol
to see if your processor type may be supported by OProfile's legacy mode.