<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PEBS Counters and Linux &amp;quot;perf&amp;quot; utility in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791937#M560</link>
    <description>Thanks Hussam for the clarification. Here is one questions I have now.&lt;BR /&gt;&lt;BR /&gt;[System: Intel Core i7, sandy bridge, cpu family 6, model 42; linux kernel 3.0.0-24-generic-pae / Ubuntu 11.10; perf version 3.0.38]&lt;BR /&gt;&lt;BR /&gt;For PEBS events, even without the ":pp" or ":p" suffix, perf stat will give some numbers. I noted that for some cases I tried, I did not see much differences between using ":pp" and not using. Still do you recommend to always use ":pp" to be safe?&lt;BR /&gt;&lt;BR /&gt;Here is an example:&lt;BR /&gt;&lt;BR /&gt;%&amp;gt; sudo perf stat -e r00c0,r01c0,r01c0:p,r01c0:pp ./prog 2&lt;BR /&gt;N= 100000000 : NumThreads= 2 : Time= 439.044 msec&lt;BR /&gt;&lt;BR /&gt;Performance counter stats for './prog 2':&lt;BR /&gt;&lt;BR /&gt; 10,707,296,495 r00c0 [49.96%]&lt;BR /&gt; 10,671,452,933 r01c0 [50.13%]&lt;BR /&gt; 10,676,277,604 r01c0:p [25.11%]&lt;BR /&gt; 10,704,588,878 r01c0:pp [25.01%]&lt;BR /&gt;&lt;BR /&gt; 2.192624454 seconds time elapsed&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 16 Aug 2012 22:27:06 GMT</pubDate>
    <dc:creator>Sanath_Jayasena</dc:creator>
    <dc:date>2012-08-16T22:27:06Z</dc:date>
    <item>
      <title>PEBS Counters and Linux "perf" utility</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791935#M558</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to know if it is possible to correctly access the PEBS counters via the "perf" utility in Linux? For example, suppose on nehalem I want to collect the number of MEM_LOAD_RETIRED.L1D_HIT events (Code=0xcb, UMask=0x01) during running my program "prog" (and a few other similar events). When I run the perf as follows, I get some numbers (sometimes "scaled" if I try to get a few event numbers):&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;sudo perf stat -e r01cb ./prog&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;Are the numbers I get reasonably correct? I ask this because I am not sure I clearly understand the PEBS events.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Sanath</description>
      <pubDate>Fri, 29 Jun 2012 21:45:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791935#M558</guid>
      <dc:creator>Sanath_Jayasena</dc:creator>
      <dc:date>2012-06-29T21:45:10Z</dc:date>
    </item>
    <item>
      <title>PEBS Counters and Linux "perf" utility</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791936#M559</link>
      <description>Hello Sanath,&lt;BR /&gt;&lt;BR /&gt;PEBS (Precise Event Based Sampling) is a feature available to a subset of events which allows the hardware to collect additionalinformation very close to the exact time the configured event overflowed. This presents theanalysis tools whith susbstantially more accurate information since the alternative is to wait for a software interrupt to collect this information, typically hundreds of cycles later.The additional collected information are stored in a special PEBS buffer and retrieved by the tool (in this case perf_events) later.&lt;BR /&gt;&lt;BR /&gt;To use with perf you need to append ":pp" to the event coding. so it would look like this:&lt;BR /&gt;sudo perf stat -e r01cb:pp ./prog&lt;BR /&gt;&lt;BR /&gt;The results will typicallybe more preciseif you are able to trace to a specific line of code. so perf stat wouldn't utilize this precision, but perf record would.&lt;BR /&gt;&lt;BR /&gt;Please let me know if you need additional details. Be sure to reference the kernel version and specific cpu model number you are using (cat /proc/cpuinfo)&lt;BR /&gt;-Hussam</description>
      <pubDate>Thu, 12 Jul 2012 16:36:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791936#M559</guid>
      <dc:creator>Hussam_Mousa__Intel_</dc:creator>
      <dc:date>2012-07-12T16:36:04Z</dc:date>
    </item>
    <item>
      <title>PEBS Counters and Linux "perf" utility</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791937#M560</link>
      <description>Thanks Hussam for the clarification. Here is one questions I have now.&lt;BR /&gt;&lt;BR /&gt;[System: Intel Core i7, sandy bridge, cpu family 6, model 42; linux kernel 3.0.0-24-generic-pae / Ubuntu 11.10; perf version 3.0.38]&lt;BR /&gt;&lt;BR /&gt;For PEBS events, even without the ":pp" or ":p" suffix, perf stat will give some numbers. I noted that for some cases I tried, I did not see much differences between using ":pp" and not using. Still do you recommend to always use ":pp" to be safe?&lt;BR /&gt;&lt;BR /&gt;Here is an example:&lt;BR /&gt;&lt;BR /&gt;%&amp;gt; sudo perf stat -e r00c0,r01c0,r01c0:p,r01c0:pp ./prog 2&lt;BR /&gt;N= 100000000 : NumThreads= 2 : Time= 439.044 msec&lt;BR /&gt;&lt;BR /&gt;Performance counter stats for './prog 2':&lt;BR /&gt;&lt;BR /&gt; 10,707,296,495 r00c0 [49.96%]&lt;BR /&gt; 10,671,452,933 r01c0 [50.13%]&lt;BR /&gt; 10,676,277,604 r01c0:p [25.11%]&lt;BR /&gt; 10,704,588,878 r01c0:pp [25.01%]&lt;BR /&gt;&lt;BR /&gt; 2.192624454 seconds time elapsed&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Aug 2012 22:27:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791937#M560</guid>
      <dc:creator>Sanath_Jayasena</dc:creator>
      <dc:date>2012-08-16T22:27:06Z</dc:date>
    </item>
    <item>
      <title>PEBS Counters and Linux "perf" utility</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791938#M561</link>
      <description>Hi Sanath,&lt;BR /&gt;&lt;BR /&gt;The PEBS and non PEBS version of events will both producevery similar counts ofthe number of cycles (or any other event).&lt;BR /&gt;&lt;BR /&gt;The added accuracy from PEBS applies to identifying the active "Instruction Pointer" which can be traced to a specific line of code. This is typically collected with 'perf record'.</description>
      <pubDate>Fri, 17 Aug 2012 14:55:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791938#M561</guid>
      <dc:creator>Hussam_Mousa__Intel_</dc:creator>
      <dc:date>2012-08-17T14:55:21Z</dc:date>
    </item>
    <item>
      <title>Hi Hussam,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791939#M562</link>
      <description>&lt;P&gt;Hi Hussam,&lt;/P&gt;

&lt;P&gt;Is Linux Perf, PEBS events haven't been patched. For example, I want to log&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;MEM_UOPS_RETIRED.L2_HIT_LOADS&lt;STRONG&gt;_PS,&amp;nbsp;&lt;/STRONG&gt;but I see&amp;nbsp;MEM_UOPS_RETIRED.L2_HIT_LOADS being&lt;A href="https://github.com/torvalds/linux/blob/master/tools/perf/pmu-events/arch/x86/knightslanding/cache.json#L53"&gt; patched for KNL&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;   53         "PEBS": "1",
   54         "EventCode": "0x04",
   55         "Counter": "0,1",
   56         "UMask": "0x2",
   57         "EventName": "MEM_UOPS_RETIRED.L2_HIT_LOADS",
   58         "SampleAfterValue": "200003",
   59         "BriefDescription": "Counts the number of load micro-ops retired that hit in the L2",
   60         "Data_LA": "1"
&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;In that case possible to share event codes for these for KNL?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;MEM_UOPS_RETIRED.L2_HIT_LOADS_PS&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;MEM_UOPS_RETIRED.L2_MISS_LOADS_PS&lt;/SPAN&gt;&lt;BR /&gt;
	RECYCLEQ.LD_SPLITS_PS&lt;BR /&gt;
	RECYCLEQ_LD_BLOCK_ST_FORWARD_PS&lt;/P&gt;

&lt;P&gt;Also, why above code has "PEBS " as 1?&lt;BR /&gt;
	&lt;BR /&gt;
	Thanks.&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 03:15:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PEBS-Counters-and-Linux-quot-perf-quot-utility/m-p/791939#M562</guid>
      <dc:creator>CPati2</dc:creator>
      <dc:date>2018-05-02T03:15:02Z</dc:date>
    </item>
  </channel>
</rss>

