<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3447</bug_id>
          
          <creation_ts>2012-11-15 20:36:30 +0000</creation_ts>
          <short_desc>Configure oprofile to use &apos;operf&apos; perf_events mode rather than legacy mode</short_desc>
          <delta_ts>2013-02-01 22:17:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>patchset posted to oe-core maling list</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tom Zanussi">tom.zanussi</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>sgw</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>27492</commentid>
    <comment_count>0</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-11-15 20:36:30 +0000</bug_when>
    <thetext>OProfile in Yocto is still using the old &apos;Oprofile legacy mode&apos;.  Configure it to use the new operf perf_events mode.  Here&apos;s more information from the oprofile website.

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

&quot;Legacy&quot; 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 &quot;legacy mode&quot; 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 &quot;perf_events&quot;). 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29060</commentid>
    <comment_count>1</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-01-22 21:42:04 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29244</commentid>
    <comment_count>2</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-01-28 17:55:18 +0000</bug_when>
    <thetext>I have a patch for this, but am hitting this bug when building for ppc:
 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3717</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29469</commentid>
    <comment_count>3</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-02-01 22:17:32 +0000</bug_when>
    <thetext>Fixed in poky/master: 8b8caef6295e657f3ddf4dd27cc307bee92444ea</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>