<?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 (Potential) PCM v2.9 CSV output bug in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/Potential-PCM-v2-9-CSV-output-bug/m-p/1033883#M4350</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;In v2.9 of the Performance Counter Module, the first header field in the CSV output (using the -csv= option) is missing a number of semicolons equal to the number of cores in the system. &amp;nbsp;So, each core is missing a single semicolon. &amp;nbsp;For example, my system has 72 cores across two sockets. &amp;nbsp;The first line in my file has 1254 semicolons, whereas the second line has 1326. &amp;nbsp;Subtracting them gives the one missing semicolon per core.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Here's a patch that fixes the issue:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;diff --git a/pcm.cpp b/pcm.cpp
--- a/pcm.cpp
+++ b/pcm.cpp
@@ -541,7 +541,7 @@ void print_csv_header(PCM * m,
                        if (cpu_model == PCM::ATOM)
                                cout &amp;lt;&amp;lt; "Core" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " (Socket" &amp;lt;&amp;lt; setw(2) &amp;lt;&amp;lt; m-&amp;gt;getSocketId(i) &amp;lt;&amp;lt; ");;;;;";
                        else
-                               cout &amp;lt;&amp;lt; "Core" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " (Socket" &amp;lt;&amp;lt; setw(2) &amp;lt;&amp;lt; m-&amp;gt;getSocketId(i) &amp;lt;&amp;lt; ");;;;;;;;;;;";
+                               cout &amp;lt;&amp;lt; "Core" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " (Socket" &amp;lt;&amp;lt; setw(2) &amp;lt;&amp;lt; m-&amp;gt;getSocketId(i) &amp;lt;&amp;lt; ");;;;;;;;;;;;";
 
             for (int s = 0; s &amp;lt;= PCM::MAX_C_STATE; ++s)
             if (m-&amp;gt;isCoreCStateResidencySupported(s))&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Sep 2015 01:03:18 GMT</pubDate>
    <dc:creator>Ameen_A_</dc:creator>
    <dc:date>2015-09-19T01:03:18Z</dc:date>
    <item>
      <title>(Potential) PCM v2.9 CSV output bug</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Potential-PCM-v2-9-CSV-output-bug/m-p/1033883#M4350</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;In v2.9 of the Performance Counter Module, the first header field in the CSV output (using the -csv= option) is missing a number of semicolons equal to the number of cores in the system. &amp;nbsp;So, each core is missing a single semicolon. &amp;nbsp;For example, my system has 72 cores across two sockets. &amp;nbsp;The first line in my file has 1254 semicolons, whereas the second line has 1326. &amp;nbsp;Subtracting them gives the one missing semicolon per core.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Here's a patch that fixes the issue:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;diff --git a/pcm.cpp b/pcm.cpp
--- a/pcm.cpp
+++ b/pcm.cpp
@@ -541,7 +541,7 @@ void print_csv_header(PCM * m,
                        if (cpu_model == PCM::ATOM)
                                cout &amp;lt;&amp;lt; "Core" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " (Socket" &amp;lt;&amp;lt; setw(2) &amp;lt;&amp;lt; m-&amp;gt;getSocketId(i) &amp;lt;&amp;lt; ");;;;;";
                        else
-                               cout &amp;lt;&amp;lt; "Core" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " (Socket" &amp;lt;&amp;lt; setw(2) &amp;lt;&amp;lt; m-&amp;gt;getSocketId(i) &amp;lt;&amp;lt; ");;;;;;;;;;;";
+                               cout &amp;lt;&amp;lt; "Core" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " (Socket" &amp;lt;&amp;lt; setw(2) &amp;lt;&amp;lt; m-&amp;gt;getSocketId(i) &amp;lt;&amp;lt; ");;;;;;;;;;;;";
 
             for (int s = 0; s &amp;lt;= PCM::MAX_C_STATE; ++s)
             if (m-&amp;gt;isCoreCStateResidencySupported(s))&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2015 01:03:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Potential-PCM-v2-9-CSV-output-bug/m-p/1033883#M4350</guid>
      <dc:creator>Ameen_A_</dc:creator>
      <dc:date>2015-09-19T01:03:18Z</dc:date>
    </item>
  </channel>
</rss>

