<?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 Thanks for your reply :) in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005698#M3656</link>
    <description>&lt;P&gt;Thanks for your reply :)&lt;/P&gt;

&lt;P&gt;So, if I am using Linux, it is more accurate to use Intel PCM compiled with the DPCM_USE_PERF ?&lt;/P&gt;

&lt;P&gt;Other question:&lt;/P&gt;

&lt;P&gt;In my code, above, what about the accuracy ? I mean, what about the sampling rate, etc.&lt;/P&gt;

&lt;P&gt;I did not specify anything in the code about the sampling rate, is it normal ? what is the default sampling rate of Intel PCM ?&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2015 07:49:56 GMT</pubDate>
    <dc:creator>Jeremie_Lagraviere</dc:creator>
    <dc:date>2015-07-13T07:49:56Z</dc:date>
    <item>
      <title>[PCM] Measuring memory traffic, good practice ?</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005696#M3654</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;In a very simple code, these dayz, I am measuring the memory traffic, and I would like to be sure that my code is correct, and delivers relatively accurate results:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;int main(void)                                    
{
	PCM * m = PCM::getInstance();
	if (m-&amp;gt;program() != PCM::Success)
	{
		cout &amp;lt;&amp;lt; "Intel PCM does not Work";
		exit(0);
	}

	SystemCounterState before_sstate = getSystemCounterState();

	//some code to measure

	SystemCounterState after_sstate = getSystemCounterState();

	cout &amp;lt;&amp;lt; "Bytes read: ";
	cout &amp;lt;&amp;lt; getBytesReadFromMC(before_sstate,after_sstate) / double(1024ULL * 1024ULL * 1024ULL) &amp;lt;&amp;lt; endl;


	printf("done !");
	m-&amp;gt;cleanup();
	exit(EXIT_SUCCESS);
}&lt;/PRE&gt;

&lt;P&gt;Also, I would like to know if there is cleaner way to end my Intel PCM code ? I ask this, because sometimes I have to reset the PMU by calling (for instance), pcm.x -r&lt;/P&gt;

&lt;P&gt;Thanks in advance for your help :)&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2015 11:26:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005696#M3654</guid>
      <dc:creator>Jeremie_Lagraviere</dc:creator>
      <dc:date>2015-07-10T11:26:33Z</dc:date>
    </item>
    <item>
      <title>Hi Jeremie,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005697#M3655</link>
      <description>&lt;P&gt;Hi Jeremie,&lt;/P&gt;

&lt;P&gt;the way you end PCM measurement looks clean. Sometimes other programs &lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;(not PCM)&amp;nbsp;&lt;/SPAN&gt;using performance counters that run in parallel may disturb your measurements. &lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;Are you using Linux?&amp;nbsp;&lt;/SPAN&gt;An example of such program is Linux perf. However, PCM can be compiled in a mode that uses Linux perf to program core performance counters, this will avoid possible collisions. Uncomment "#CXXFLAGS += -DPCM_USE_PERF" in the Makefile to enable this mode.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Roman&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 07:06:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005697#M3655</guid>
      <dc:creator>Roman_D_Intel</dc:creator>
      <dc:date>2015-07-13T07:06:52Z</dc:date>
    </item>
    <item>
      <title>Thanks for your reply :)</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005698#M3656</link>
      <description>&lt;P&gt;Thanks for your reply :)&lt;/P&gt;

&lt;P&gt;So, if I am using Linux, it is more accurate to use Intel PCM compiled with the DPCM_USE_PERF ?&lt;/P&gt;

&lt;P&gt;Other question:&lt;/P&gt;

&lt;P&gt;In my code, above, what about the accuracy ? I mean, what about the sampling rate, etc.&lt;/P&gt;

&lt;P&gt;I did not specify anything in the code about the sampling rate, is it normal ? what is the default sampling rate of Intel PCM ?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 07:49:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005698#M3656</guid>
      <dc:creator>Jeremie_Lagraviere</dc:creator>
      <dc:date>2015-07-13T07:49:56Z</dc:date>
    </item>
    <item>
      <title>yes, please use PCM_USE_PERF.</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005699#M3657</link>
      <description>&lt;P&gt;yes, please use&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;PCM_USE_PERF.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;PCM does *NOT* use sampling. It uses "counting mode". That means the counters are read once in each&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.0080003738403px; line-height: 14.3088006973267px; background-color: rgb(248, 248, 248);"&gt;getSystemCounterState call and then the difference between their values is computed.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.0080003738403px; line-height: 14.3088006973267px; background-color: rgb(248, 248, 248);"&gt;Roman&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 07:59:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/PCM-Measuring-memory-traffic-good-practice/m-p/1005699#M3657</guid>
      <dc:creator>Roman_D_Intel</dc:creator>
      <dc:date>2015-07-13T07:59:00Z</dc:date>
    </item>
  </channel>
</rss>

