<?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>3342</bug_id>
          
          <creation_ts>2012-10-26 22:45:43 +0000</creation_ts>
          <short_desc>perf script: improve &apos;live mode&apos;</short_desc>
          <delta_ts>2017-06-13 11:12:57 +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>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</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>dvhart</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26984</commentid>
    <comment_count>0</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-10-26 22:45:43 +0000</bug_when>
    <thetext>The &apos;live mode&apos; in perf script essentially sends the stdout of the record process to the stdin of the report process through a pipe.  This is OK for low-volume events e.g. for &apos;perf script rwtop&apos;, but breaks down at high volume:

root@crownbay:~# perf script sctop

syscall events:

event                                          count
----------------------------------------  ----------
3                                              88768
240                                             1208
4                                                127
54                                                51
265                                               18
168                                               18
102                                               18
142                                               14
192                                               12
104                                               12
91                                                12
78                                                12
13                                                10
146                                                6
43                                                 4
195                                                2
197                                                1
^CWarning:
Processed 589913 events and lost 179 chunks!

Check IO/CPU overload!

There also seems to be some kind of drawing problem with the display for this script as you can see it visibly drawing line by line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28959</commentid>
    <comment_count>1</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-01-18 20:49:35 +0000</bug_when>
    <thetext>As a start to this, I&apos;ve sent out a patchset to lkml that fixes various related problems:

http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg370505.html

In a lot of cases the high loads are a result of tracing perf-related activity, so I also experimented with the event filters to screen out perf-originated events.

e.g. to screen out perf write events:

[root@empanada ~]# export x=`expr \`ls /proc/self/task\` + 1`;perf record -a -e syscalls:sys_enter_read -e syscalls:sys_exit_read -e syscalls:sys_enter_write --filter &quot;common_pid != $x&quot; -e syscalls:sys_exit_write  --filter &quot;common_pid != $x

This works but is pretty unwieldy - need to try to come up with an easier interface that still uses the kernel event filtering engine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74061</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-06-13 11:12:57 +0000</bug_when>
    <thetext>This bug is tracking an enhancement to perf which does not fall under the YP umbrella.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>