Bug 3447 - Configure oprofile to use 'operf' perf_events mode rather than legacy mode
Summary: Configure oprofile to use 'operf' perf_events mode rather than legacy mode
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.4 M4
Assignee: Tom Zanussi
QA Contact:
URL:
Whiteboard: patchset posted to oe-core maling list
Depends on:
Blocks:
 
Reported: 2012-11-15 20:36 UTC by Tom Zanussi
Modified: 2013-02-01 22:17 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Zanussi 2012-11-15 20:36:30 UTC
OProfile in Yocto is still using the old 'Oprofile legacy mode'.  Configure it to use the new operf perf_events mode.  Here's more information from the oprofile website.

http://oprofile.sourceforge.net/doc/introduction.html#legacy_mode

"Legacy" OProfile consists of the opcontrol shell script, the oprofiled daemon, and several post-processing tools (e.g., opreport). The opcontrol script is used for configuring, starting, and stopping a profiling session. An OProfile kernel driver (usually built as a kernel module) is used for collecting samples, which are then recorded into sample files by oprofiled. Using OProfile in "legacy mode" requires root user authority since the profiling is done on a system-wide basis, which may (if misused) cause adverse effects to the system. 

http://oprofile.sourceforge.net/doc/perf_events.html

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.
Comment 1 Tom Zanussi 2013-01-22 21:42:04 UTC
oe-core has been upgraded to 0.98, but legacy mode is still automatically being selected, so starting to work on making perf_events mode happen instead.
Comment 2 Tom Zanussi 2013-01-28 17:55:18 UTC
I have a patch for this, but am hitting this bug when building for ppc:
 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3717
Comment 3 Tom Zanussi 2013-02-01 22:17:32 UTC
Fixed in poky/master: 8b8caef6295e657f3ddf4dd27cc307bee92444ea