2. OProfile perf_events profiling mode

OProfile has the ability to profile a single process or every currently running process (i.e., system-wide) via the operf program. operf interfaces with the kernel to collect samples via the Linux Kernel Performance Events Subsystem (hereafter referred to as "perf_events"). OProfile can co-exist with other tools on your system that may also be using the perf_events kernel subsystem.

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.


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, install OProfile 0.9.9 and try profiling with opcontrol to see if your processor type may be supported by OProfile's legacy mode.