<?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 Although they are not in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011671#M34449</link>
    <description>&lt;P&gt;Although they are not documented in the Intel Xeon Phi Performance Monitoring Units guide (document 327357-001), Intel's VTune includes performance monitor events that appear to be what you are looking for:&lt;/P&gt;

&lt;P&gt;Event 0xC3, Umask 0x10: HWP_L2HIT : Hardware Prefetch L2 HIT&lt;BR /&gt;
	Event 0xC4, Umask 0x10: HWP_L2MISS : Hardware Prefetch L2 MISS&lt;/P&gt;

&lt;P&gt;The VTune "knc_db.txt" file indicates that all of the events using Umask 0x10 should use counter 0 only, but I don't see that indicated anywhere in the documentation.&lt;/P&gt;</description>
    <pubDate>Tue, 13 May 2014 18:58:03 GMT</pubDate>
    <dc:creator>McCalpinJohn</dc:creator>
    <dc:date>2014-05-13T18:58:03Z</dc:date>
    <item>
      <title>Calculating prefetches that missed L2</title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011669#M34447</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I am currently doing some performance tests on some offload code for Xeon Phi. I have been calculating performance numbers by measuring hardware counters using PAPI, with the calculation methods explained here:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/optimization-and-performance-tuning-for-intel-xeon-phi-coprocessors-part-2-understanding" target="_blank"&gt;https://software.intel.com/en-us/articles/optimization-and-performance-tuning-for-intel-xeon-phi-coprocessors-part-2-understanding&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;However, in the memory bandwidth section (5.4), the guide says to use an event named&amp;nbsp;HWP_L2MISS to count the number of hardware prefetches that missed L2, which is provided in VTune apparently - although it does not appear to be an actual event according to the list of available events for the PMU document here:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/sites/default/files/forum/278102/intelr-xeon-phitm-pmu-rev1.01.pdf" target="_blank"&gt;https://software.intel.com/sites/default/files/forum/278102/intelr-xeon-phitm-pmu-rev1.01.pdf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I assume it is some derived metric VTune works out for you - however I was wondering if anyone knows how it should be calculated? Could I add the number of prefetch0 and prefetch1 requests missed by L2 as provided by counters&amp;nbsp;L2_DATA_PF1_MISS &amp;amp;&amp;nbsp;L2_DATA_PF2_MISS or is there more to it?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Sat, 10 May 2014 16:06:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011669#M34447</guid>
      <dc:creator>Tim_D_1</dc:creator>
      <dc:date>2014-05-10T16:06:15Z</dc:date>
    </item>
    <item>
      <title>Hi Tim,</title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011670#M34448</link>
      <description>&lt;P&gt;Hi Tim,&lt;/P&gt;

&lt;P&gt;Let me ask the experts here and get back to you. Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2014 18:13:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011670#M34448</guid>
      <dc:creator>Loc_N_Intel</dc:creator>
      <dc:date>2014-05-13T18:13:11Z</dc:date>
    </item>
    <item>
      <title>Although they are not</title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011671#M34449</link>
      <description>&lt;P&gt;Although they are not documented in the Intel Xeon Phi Performance Monitoring Units guide (document 327357-001), Intel's VTune includes performance monitor events that appear to be what you are looking for:&lt;/P&gt;

&lt;P&gt;Event 0xC3, Umask 0x10: HWP_L2HIT : Hardware Prefetch L2 HIT&lt;BR /&gt;
	Event 0xC4, Umask 0x10: HWP_L2MISS : Hardware Prefetch L2 MISS&lt;/P&gt;

&lt;P&gt;The VTune "knc_db.txt" file indicates that all of the events using Umask 0x10 should use counter 0 only, but I don't see that indicated anywhere in the documentation.&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2014 18:58:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011671#M34449</guid>
      <dc:creator>McCalpinJohn</dc:creator>
      <dc:date>2014-05-13T18:58:03Z</dc:date>
    </item>
    <item>
      <title>Hi Tim, </title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011672#M34450</link>
      <description>&lt;P&gt;Hi Tim,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;HWP_L2MISS is an actual PMU event. I can see this in the list events in Intel VTune amplifier XE when I try to configure a custom analysis.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Sumedh&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 23:10:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011672#M34450</guid>
      <dc:creator>Sumedh_N_Intel</dc:creator>
      <dc:date>2014-05-14T23:10:43Z</dc:date>
    </item>
    <item>
      <title>Thanks for the assistance</title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011673#M34451</link>
      <description>&lt;P&gt;Thanks for the assistance guys - especially the knc_db.txt file mentioned, i found that file in the VTune installation directory and it answered a fair few of my questions.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Although I note that the event John mentioned:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Event 0xC3, Umask 0x10: HWP_L2HIT : Hardware Prefetch L2 HIT&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Does not seem available in VTune, or appear in the knc_db txt file I have.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Just to note for anyone else, some of the events available in VTune are not available through PAPI (unlisted in PAPI_NATIVE_AVAIL)- for example:&lt;/P&gt;

&lt;P&gt;HWP_L2MISS&lt;BR /&gt;
	L2_STRONGLY_ORDERED_STREAMING_VSTORES_MISS&lt;BR /&gt;
	L2_WEAKLY_ORDERED_STREAMING_VSTORE_MISS&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 10:58:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011673#M34451</guid>
      <dc:creator>Tim_D_1</dc:creator>
      <dc:date>2014-05-15T10:58:15Z</dc:date>
    </item>
    <item>
      <title>Quote:Tim D. wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011674#M34452</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Tim D. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Does not seem available in VTune, or appear in the knc_db txt file I have.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;It is available. Just add&lt;/P&gt;

&lt;P&gt;-knob event-config=HWP_L2MISS:sa=1000003&lt;/P&gt;

&lt;P&gt;too your vtune command line script.&lt;/P&gt;

&lt;P&gt;Mostly I use the following command:&lt;/P&gt;

&lt;P&gt;amplxe-cl -collect-with runsa-knc -knob event-config=BRANCHES:sa=1000003,BRANCHES_MISPREDICTED:sa=1000003,CPU_CLK_UNHALTED:sa=10000000,DATA_CACHE_LINES_WRITTEN_BACK:sa=1000003,DATA_PAGE_WALK:sa=1000003,EEC_STAGE_CYCLES:sa=10000000,HWP_L2MISS:sa=1000003,INSTRUCTIONS_EXECUTED:sa=10000000,L2_READ_HIT_E:sa=1000003,L2_READ_HIT_M:sa=1000003,L2_READ_HIT_S:sa=1000003,L2_RED_MISS:sa=1000003,L2_WRITE_HIT:sa=1000003,LONG_DATA_PAGE_WALK:sa=1000003,VPU_INSTRUCTIONS_EXECUTED:sa=1000003&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 12:04:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011674#M34452</guid>
      <dc:creator>Patrick_S_</dc:creator>
      <dc:date>2014-05-15T12:04:00Z</dc:date>
    </item>
    <item>
      <title>I was referring to the event</title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011675#M34453</link>
      <description>&lt;P&gt;I was referring to the event&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;HWP_L2HIT mentioned by John rather than HWP_L2MISS,&amp;nbsp;I am not actually concerned with monitoring HWP_L2HIT&amp;nbsp;at the moment I was simply commenting that I did not see this event in the custom analysis event menu, nor in the knc_db file john referenced.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Thanks for the example of the command you use though, this is useful&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 12:17:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011675#M34453</guid>
      <dc:creator>Tim_D_1</dc:creator>
      <dc:date>2014-05-15T12:17:33Z</dc:date>
    </item>
    <item>
      <title>I tried reading this HWP</title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011676#M34454</link>
      <description>&lt;P&gt;I tried reading this&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;HWP_L2HIT and&amp;nbsp;HWP_L2MISS and it was showing "0" in all cores. &amp;nbsp;How shall I verify whether is it due to my HWP on/off?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2014 10:48:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011676#M34454</guid>
      <dc:creator>Surya_Narayanan_N_</dc:creator>
      <dc:date>2014-08-12T10:48:48Z</dc:date>
    </item>
    <item>
      <title>That looks like the wrong</title>
      <link>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011677#M34455</link>
      <description>&lt;P&gt;That looks like the wrong event --- the HWP_L2_MISS event is Event 0xC4, not 0x03.&lt;/P&gt;

&lt;P&gt;I definitely get non-zero counts for HWP_L2_HIT.&amp;nbsp; I am not sure if they make sense yet -- that will take a lot more experimenting....&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2014 16:26:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Calculating-prefetches-that-missed-L2/m-p/1011677#M34455</guid>
      <dc:creator>McCalpinJohn</dc:creator>
      <dc:date>2014-08-12T16:26:53Z</dc:date>
    </item>
  </channel>
</rss>

