Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ameen_A_
Beginner
52 Views

(Potential) PCM v2.9 CSV output bug

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.  So, each core is missing a single semicolon.  For example, my system has 72 cores across two sockets.  The first line in my file has 1254 semicolons, whereas the second line has 1326.  Subtracting them gives the one missing semicolon per core.

Here's a patch that fixes the issue:

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 << "Core" << i << " (Socket" << setw(2) << m->getSocketId(i) << ");;;;;";
                        else
-                               cout << "Core" << i << " (Socket" << setw(2) << m->getSocketId(i) << ");;;;;;;;;;;";
+                               cout << "Core" << i << " (Socket" << setw(2) << m->getSocketId(i) << ");;;;;;;;;;;;";
 
             for (int s = 0; s <= PCM::MAX_C_STATE; ++s)
             if (m->isCoreCStateResidencySupported(s))

 

0 Kudos
0 Replies
Reply