Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
96f1edb
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Feb 24, 2017
7633db0
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Feb 24, 2017
06f8783
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Feb 24, 2017
0792708
add API to monitor DDR-T events
rdementi Mar 2, 2017
c5f8c13
introduce DDRTTrafficMetricsAvailable() and program DDR-T events in P…
rdementi Mar 2, 2017
2ff95af
display DDR-T bandwidth in pcm.x
rdementi Mar 2, 2017
f43d63a
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 2, 2017
c4fd3cb
improve formatting
Mar 2, 2017
e6a1990
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 2, 2017
209633d
support DDR-T BW metrics (-ddr-t switch) for pcm-memory
rdementi Mar 2, 2017
765eb7d
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 2, 2017
6583189
fix typo
rdementi Mar 2, 2017
bb4a63c
fix pcm-memory for DDR-T
rdementi Feb 17, 1998
17a7d06
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 6, 2017
8e35831
include DDR-T traffic to total MC traffic in getQPItoMCTrafficRatio
rdementi Mar 6, 2017
889ff35
added DDR-T metrics to pcm-sensor KSysGuard plugin
rdementi Mar 6, 2017
f8fffcd
correctly list DDR-T metrics in ksysguard
rdementi Feb 17, 1998
06a7e24
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 6, 2017
16d0c21
implement and use a sscanf alternative
rdementi Mar 8, 2017
5f07ba2
drop the last usages of sscanf
rdementi Mar 8, 2017
e626fa6
Merge remote-tracking branch 'origin/master' into SKX
rdementi Mar 8, 2017
ca39ec0
Merge remote-tracking branch 'origin/master' into SKX
rdementi Mar 8, 2017
ee652f9
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 8, 2017
a3ef2f9
support UPI metrics on Windows
rdementi Mar 17, 2017
6e51c8d
Merge remote-tracking branch 'origin/master' into SKX
rdementi Mar 17, 2017
2e56800
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 17, 2017
2d91df1
touch memory also on Windows
rdementi Mar 17, 2017
64c5029
make NUMA allocation on Windows more robust
rdementi Mar 17, 2017
99bdb97
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 17, 2017
c597395
correctly implement PciHandl::exist for WinRing0 driver
rdementi Mar 17, 2017
33a0ba6
load drivers on Windows
rdementi Mar 17, 2017
7734384
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 20, 2017
c426c5c
Merge remote-tracking branch 'origin/Denverton' into NDA
rdementi Mar 29, 2017
45d34a1
fix dram_joules_per_energy_unit for SKX
rdementi Mar 30, 2017
4cfdc25
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Mar 30, 2017
27a7c19
Merge remote-tracking branch 'origin/master' into SKX
rdementi Apr 4, 2017
c6121f6
Merge remote-tracking branch 'origin/SKX' into NDA
rdementi Apr 4, 2017
dc59a56
Add event file for pcm-iio.x
Apr 6, 2017
d3f60af
Update authoership
Apr 6, 2017
6eba3f4
Merge remote-tracking branch 'origin/SKX' into NDA
Apr 6, 2017
9951cec
fix OSX scripts
rdementi Apr 5, 2017
73ec003
show SMI (system management interrupt) count
rdementi Apr 5, 2017
b656d4f
Store shared memory key in a file
stevenbriscoe Apr 5, 2017
4e8c6f0
add clang to the test matrix
rdementi Apr 6, 2017
29ea67f
Merge remote-tracking branch 'origin/master' into NDA
rdementi Apr 7, 2017
35412c9
Merge remote-tracking branch 'origin/master' into NDA
rdementi Apr 19, 2017
5e9fa83
Merge remote-tracking branch 'origin/master' into NDA
rdementi Apr 19, 2017
1300413
fix compilation (restore a function has been dropped during a merge)
rdementi Apr 19, 2017
9c49f77
use c++ threads to simplify code
rdementi Apr 24, 2017
c704b14
constify
rdementi Apr 24, 2017
53e76e3
protect socket2bus for multithreaded initialization
rdementi Apr 24, 2017
dac585c
Merge remote-tracking branch 'origin/master' into SKX
rdementi Apr 24, 2017
9f53bc4
Merge remote-tracking branch 'origin/SKX' into SKX
rdementi Apr 24, 2017
6f44926
Merge remote-tracking branch 'origin/master' into SKX
rdementi Apr 24, 2017
7f5164a
Merge branch 'master' into SKX
rdementi Apr 24, 2017
2e9fc20
async computation of UPI speed
rdementi Apr 24, 2017
0ab329a
Merge branch 'NDA' into SKX
rdementi Apr 25, 2017
c8a2d43
Merge remote-tracking branch 'origin/master' into SKX
rdementi Apr 25, 2017
78d7b06
Merge remote-tracking branch 'origin/master' into SKX
rdementi Apr 25, 2017
8560ad3
simplify UPI utilization calculation
rdementi May 5, 2017
516b997
change event names
rdementi May 16, 2017
829ac32
update README.md
rdementi May 17, 2017
e230ac6
pcm-iio.x: Enable IIO_MCP stack and minor bug fix
May 19, 2017
22f7940
print UPI instead of QPI in pcm.x (for SKX)
rdementi May 30, 2017
2fa00a8
cleanup handles for disabled links
rdementi May 31, 2017
05dcce4
Merge remote-tracking branch 'origin/master' into SKX
rdementi May 31, 2017
e2cd98b
clear xPI handles (since no xPI events are programmed)
rdementi Jun 1, 2017
61ccac1
add M2M perfmon devices
rdementi Jun 2, 2017
3ba85a4
Merge branch 'SKX' of ssh://git-ger-3.devtools.intel.com:29418/opcm-o…
Jun 5, 2017
82ba68a
Merge remote-tracking branch 'origin/SKX' into 2LM
rdementi Jun 20, 2017
61143a5
unify uncore PMON CTL register format definitions
rdementi Jun 21, 2017
7d37d60
Merge remote-tracking branch 'origin/SKX' into 2LM
rdementi Jun 21, 2017
43dce38
add M2M register addresses
rdementi Jun 21, 2017
ad08019
add M2M PMU programming code (for TAG_HIT.NM_DRD_HIT_* events (CLEAN …
rdementi Jun 26, 2017
4c419e0
implement M2M (un)freeze
rdementi Jun 26, 2017
339556d
implement IIO PMU (un)freeze
rdementi Jun 26, 2017
297be3c
Merge remote-tracking branch 'origin/SKX' into 2LM
rdementi Jun 26, 2017
eab5e5c
rely on automatic device discovery
rdementi Jun 26, 2017
c99703e
implement getM2MCounter
rdementi Jun 26, 2017
270162c
implement getNumMCChannels for given mem controller
rdementi Jun 26, 2017
0018057
implement getImcReadsForController and getImcReadsForChannels
rdementi Jun 27, 2017
6d2321e
add 2LM read hit metric to pcm-memory (ddr-t option)
rdementi Jun 27, 2017
9e0ab16
disable debug output
rdementi Jun 29, 2017
a55f991
add errata number
rdementi Jul 3, 2017
6c74671
Merge branch 'SKX_public' into SKX
rdementi Jul 6, 2017
05b7cdd
drop duplicates intorduced by automated conflict resolution
rdementi Jul 6, 2017
9538ea0
drop duplicates introduced by automated conflict resolution
rdementi Jul 6, 2017
2aa8490
Merge remote-tracking branch 'origin/SKX_public' into SKX
rdementi Jul 6, 2017
4770d38
failed attempt to use perf API for offcore_rsp events
rdementi Aug 16, 2017
5105448
failed attempt to use perf API for offcore_rsp events
rdementi Aug 16, 2017
ac4ee78
Merge remote-tracking branch 'origin/master' into SKX
rdementi Aug 16, 2017
dab73b3
Cleanups
ogbrugge-work Aug 29, 2017
2575cf6
Merge remote-tracking branch 'origin/master' into SKX
rdementi Aug 30, 2017
2cdcdae
Fix compilation by adding the <assert> include file
ogbrugge-work Aug 30, 2017
5fec96c
Calculate QPI utilisation using difference mode (when using absolute …
stevenbriscoe Sep 12, 2017
528b961
fix overflow
rdementi Sep 18, 2017
2c68553
fix Makefile
rdementi Sep 18, 2017
2a01c5b
Cleanups for topology discovery
ogbrugge-work Sep 4, 2017
f4b5783
Cleanups: indentation, spelling.
ogbrugge-work Sep 11, 2017
411efc0
Merge changes I8589e13c,Iec61fb99 into SKX
rdementi Sep 19, 2017
c7a9e3b
Merge remote-tracking branch 'opcm-github/master'
rdementi Oct 20, 2017
d53d6be
Zero regs array, add warning in case no custom event provided
ogbrugge-work Oct 18, 2017
431ecfe
Merge remote-tracking branch 'opcm-github/master'
rdementi Oct 20, 2017
15adb36
Zero regs array, add warning in case no custom event provided
ogbrugge-work Oct 18, 2017
08cd80e
Add *.swp (vim) to .gitignore
ogbrugge-work Oct 4, 2017
ae45b26
Merge remote-tracking branch 'opcm-github/master'
rdementi Oct 30, 2017
d00c26b
Fix timestamp and data consistency bug
stevenbriscoe Sep 12, 2017
f5756c0
Fix missing column headers for DDRT socket read/write BW
ogbrugge-work Dec 15, 2017
76a0c31
implement LLC miss read/prefetch latency metric
rdementi Mar 14, 2018
b176e25
Merge "implement LLC miss read/prefetch latency metric"
rdementi Mar 20, 2018
c013932
basic PCICFG read/write utility
rdementi Mar 21, 2018
992356e
add a note about *extended* configuration space access
rdementi Mar 21, 2018
87f3f09
Merge remote-tracking branch 'opcm-github/master'
rdementi Mar 21, 2018
99329f3
report error when read/write MSR fails
rdementi Apr 4, 2018
9c92cab
fix llc rd latency metric for sampling delay != 1 second
rdementi Apr 5, 2018
f2ebf44
on SKX enable LLCReadMissLatency metric only for single socket systems
rdementi Jun 12, 2018
9141e2b
csv header lacks % columns
rdementi Aug 22, 2018
7adb61f
check if the requested number of core counters is available on CPU
rdementi Sep 3, 2018
e28fdc0
refactor
rdementi Sep 3, 2018
3578754
add getMaxCustomCoreEvents and use it
rdementi Sep 3, 2018
f12aa5e
pcm-numa needs just two core events
rdementi Sep 3, 2018
9bfdd7c
pcm-memory: check if CPU is supported earlier, before programming PMU
rdementi Sep 4, 2018
34af06c
don't use magic constants
rdementi Sep 4, 2018
d416cef
change event positions
rdementi Sep 4, 2018
ac39055
add support of C-states monitoring for KBL_1 cpu model
rdementi Sep 7, 2018
57d2beb
introduce a bunch of is<Metric>Available() functions and streamline P…
rdementi Sep 7, 2018
3666b13
refactor
rdementi Sep 7, 2018
5cf3120
use the cache metric available api
rdementi Sep 7, 2018
ac0a8d0
Merge commit 'f12aa5e2ef9b95c4549337dccc75fcf613fb2187' into SKX
rdementi Sep 10, 2018
46be3b2
Merge commit '9bfdd7c961377d11a302474f8af2652cfdf4c659' into SKX
rdementi Sep 10, 2018
c42db2b
Merge commit 'ac39055a8b5b6f0b02265053872dff3bb164e1b2' into SKX
rdementi Sep 10, 2018
c475c94
Merge commit '57d2beb0b1fe7153c1d744315016304c15c52267' into SKX
rdementi Sep 10, 2018
cd794f6
fix compiler issue
rdementi Sep 10, 2018
65e706d
Merge remote-tracking branch 'origin/master' into SKX
rdementi Sep 10, 2018
98162d0
improve logic
rdementi Sep 13, 2018
729ebf4
build daemon binaries in the main Makefile
rdementi Sep 13, 2018
530712d
make PciHandle::exists more robust
rdementi Sep 12, 2018
5861615
for custom TSX events ask only for required number of counters
rdementi Sep 13, 2018
f0d7329
disallow cygwin/mingw
rdementi Sep 18, 2018
553f693
Merge remote-tracking branch 'opcm-github/master'
rdementi Sep 18, 2018
80e6976
use secure _dupenv_s function instead of insecure getenv
rdementi Sep 20, 2018
7d74d10
implement thread affinity trick for Windows
rdementi Sep 21, 2018
2e8e332
provide API to read CPU microcode level and also print it in the tools
rdementi Sep 21, 2018
c215360
refactor
rdementi Sep 21, 2018
4f54815
pcm-iio.x: Change default events
Oct 1, 2018
96323b1
pcm-iio.x: Provide TLP metrics
Oct 1, 2018
691c681
pcm-pcie.x: Correct total count
Oct 1, 2018
c0e3d3c
Merge "pcm-pcie.x: Correct total count"
Oct 1, 2018
ba42eb0
Merge "pcm-iio.x: Provide TLP metrics"
Oct 1, 2018
ca5886e
Revert "pcm-iio.x: Provide TLP metrics"
Oct 1, 2018
cd09b64
Merge "Revert "pcm-iio.x: Provide TLP metrics""
Oct 1, 2018
ef00e76
Initialize IIO PMU Register
Oct 5, 2018
ca0fe4d
make Release64 MSVC configuration compile
rdementi Oct 18, 2018
19f28ae
fix macos automatic installation
rdementi Oct 24, 2018
8843e43
Merge remote-tracking branch 'opcm-github/master'
rdementi Oct 24, 2018
957a585
implement LLC miss read/prefetch latency metric
rdementi Mar 14, 2018
ec2d575
basic PCICFG read/write utility
rdementi Mar 21, 2018
6e4eaaf
add a note about *extended* configuration space access
rdementi Mar 21, 2018
b8134d4
report error when read/write MSR fails
rdementi Apr 4, 2018
cda20eb
fix llc rd latency metric for sampling delay != 1 second
rdementi Apr 5, 2018
130a1c7
on SKX enable LLCReadMissLatency metric only for single socket systems
rdementi Jun 12, 2018
ce3dd2c
csv header lacks % columns
rdementi Aug 22, 2018
0c3ab5a
check if the requested number of core counters is available on CPU
rdementi Sep 3, 2018
4876ce6
refactor
rdementi Sep 3, 2018
687772d
add getMaxCustomCoreEvents and use it
rdementi Sep 3, 2018
f4f982f
pcm-numa needs just two core events
rdementi Sep 3, 2018
b60751f
pcm-memory: check if CPU is supported earlier, before programming PMU
rdementi Sep 4, 2018
9e6dc9c
don't use magic constants
rdementi Sep 4, 2018
e52dc5d
change event positions
rdementi Sep 4, 2018
5458e6b
add support of C-states monitoring for KBL_1 cpu model
rdementi Sep 7, 2018
f3fa958
introduce a bunch of is<Metric>Available() functions and streamline P…
rdementi Sep 7, 2018
3fc03c7
refactor
rdementi Sep 7, 2018
035cbbe
use the cache metric available api
rdementi Sep 7, 2018
1a7c3aa
improve logic
rdementi Sep 13, 2018
b7fb6bf
build daemon binaries in the main Makefile
rdementi Sep 13, 2018
28de898
make PciHandle::exists more robust
rdementi Sep 12, 2018
dd14e9f
for custom TSX events ask only for required number of counters
rdementi Sep 13, 2018
12f18ff
disallow cygwin/mingw
rdementi Sep 18, 2018
5fd731e
use secure _dupenv_s function instead of insecure getenv
rdementi Sep 20, 2018
176e18c
implement thread affinity trick for Windows
rdementi Sep 21, 2018
324ea50
provide API to read CPU microcode level and also print it in the tools
rdementi Sep 21, 2018
8cda92b
refactor
rdementi Sep 21, 2018
20bf51c
pcm-iio.x: Change default events
Oct 1, 2018
737068b
pcm-pcie.x: Correct total count
Oct 1, 2018
e22521d
Initialize IIO PMU Register
Oct 5, 2018
279dde4
make Release64 MSVC configuration compile
rdementi Oct 18, 2018
1cc1681
fix macos automatic installation
rdementi Oct 24, 2018
dbd2fd2
build daemon-binaries only on Linux
rdementi Nov 6, 2018
1d62f21
Merge branch 'push_github_24_oct_2018_2'
rdementi Nov 6, 2018
c619695
Merge remote-tracking branch 'opcm-github/master'
rdementi Nov 6, 2018
02f1caf
ensure consistent autocrlf behavior for git
rdementi Nov 15, 2018
8db5885
detect Cascade Lake
rdementi Nov 22, 2018
17f49ab
Merge remote-tracking branch 'origin/master' into CLX
rdementi Nov 22, 2018
64a2852
add (inactive) paths for MSVC2017
rdementi Nov 23, 2018
c2ad58a
drop useless Release64/Debug64 configurations
rdementi Nov 23, 2018
d12f3c3
make Debug MSVC builds work
rdementi Nov 23, 2018
05718ac
add PCM-PCICFG_Win project
rdementi Nov 23, 2018
9d45957
Merge remote-tracking branch 'opcm-github/master'
rdementi Nov 23, 2018
7d812fb
Merge remote-tracking branch 'origin/master' into CLX
rdementi Nov 26, 2018
9c7eead
implement isCLX and use it (for DDR-T detection)
rdementi Nov 26, 2018
e342a5f
pcm-memory: suppress output per channel with -nc
twillhal Nov 29, 2018
41cb6d1
rename DDR-T -> PMM (official naming)
rdementi Dec 3, 2018
b2fa4d9
rename 2LM -> NM
rdementi Dec 3, 2018
aeb09a6
Merge remote-tracking branch 'origin/CLX' into CLX_push
rdementi Dec 4, 2018
c29ced4
Merge remote-tracking branch 'origin/2LM' into CLX_push
rdementi Dec 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ Release64
.metadata/
html/
latex/
*.swp
435 changes: 331 additions & 104 deletions cpucounters.cpp

Large diffs are not rendered by default.

188 changes: 157 additions & 31 deletions cpucounters.h

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pcm-core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ int main(int argc, char * argv[])
bool show_partial_core_output = false;
std::bitset<MAX_CORES> ycores;


PCM * m = PCM::getInstance();

conf.fixedCfg = NULL; // default
Expand Down
358 changes: 273 additions & 85 deletions pcm-memory.cpp

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions pcm-sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ int main()
for (uint32 a = 0; a < counters.getNumSockets(); ++a) {
cout << "Socket" << a << "/BytesReadFromMC\tfloat" << endl;
cout << "Socket" << a << "/BytesWrittenToMC\tfloat" << endl;
cout << "Socket" << a << "/BytesReadFromPMM\tfloat" << endl;
cout << "Socket" << a << "/BytesWrittenToPMM\tfloat" << endl;
cout << "Socket" << a << "/Frequency\tfloat" << endl;
cout << "Socket" << a << "/IPC\tfloat" << endl;
cout << "Socket" << a << "/L2CacheHitRatio\tfloat" << endl;
Expand Down Expand Up @@ -258,6 +260,13 @@ int main()
cout << "read from MC Socket" << i << "\t0\t\tGB" << endl;
}
}
for (uint32 i = 0; i < counters.getNumSockets(); ++i) {
stringstream c;
c << "Socket" << i << "/BytesReadFromPMM?";
if (s == c.str()) {
cout << "read from PMM memory on Socket" << i << "\t0\t\tGB" << endl;
}
}
for (uint32 i = 0; i < counters.getNumSockets(); ++i) {
stringstream c;
c << "Socket" << i << "/DRAMEnergy?";
Expand Down Expand Up @@ -337,9 +346,9 @@ int main()
}
for (uint32 i = 0; i < counters.getNumSockets(); ++i) {
stringstream c;
c << "Socket" << i << "/BytesWrittenToMC?";
c << "Socket" << i << "/BytesWrittenToPMM?";
if (s == c.str()) {
cout << "written to MC Socket" << i << "\t0\t\tGB" << endl;
cout << "written to PMM memory on Socket" << i << "\t0\t\tGB" << endl;
//cout << "CPU" << i << "\tBytes written to memory channel\t0\t1\t GB" << endl;
}
}
Expand Down Expand Up @@ -613,6 +622,8 @@ int main()
OUTPUT_SOCKET_METRIC("/ThermalHeadroom", (counters.getSocket<int32, ::getThermalHeadroom>(i)))
OUTPUT_SOCKET_METRIC("/BytesReadFromMC", (double(counters.getSocket<uint64, ::getBytesReadFromMC>(i)) / 1024 / 1024 / 1024))
OUTPUT_SOCKET_METRIC("/BytesWrittenToMC", (double(counters.getSocket<uint64, ::getBytesWrittenToMC>(i)) / 1024 / 1024 / 1024))
OUTPUT_SOCKET_METRIC("/BytesReadFromPMM", (double(counters.getSocket<uint64, ::getBytesReadFromPMM>(i)) / 1024 / 1024 / 1024))
OUTPUT_SOCKET_METRIC("/BytesWrittenToPMM", (double(counters.getSocket<uint64, ::getBytesWrittenToPMM>(i)) / 1024 / 1024 / 1024))
OUTPUT_SOCKET_METRIC("/Frequency", (counters.getSocket<double, ::getAverageFrequency>(i) / 1000000))
OUTPUT_SOCKET_METRIC("/IPC", (counters.getSocket<double, ::getIPC>(i)))
OUTPUT_SOCKET_METRIC("/L2CacheHitRatio", (counters.getSocket<double, ::getL2CacheHitRatio>(i)))
Expand Down
28 changes: 27 additions & 1 deletion pcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ void print_output(PCM * m,
if (m->memoryTrafficMetricsAvailable()) cout << " READ : bytes read from main memory controller (in GBytes)" << "\n";
if (m->memoryTrafficMetricsAvailable()) cout << " WRITE : bytes written to main memory controller (in GBytes)" << "\n";
if (m->LLCReadMissLatencyMetricsAvailable()) cout << "LLCRDMISSLAT: average latency of last level cache miss for reads and prefetches (in ns)";
if (m->PMMTrafficMetricsAvailable()) cout << " PMM RD : bytes read from PMM memory (in GBytes)" << "\n";
if (m->PMMTrafficMetricsAvailable()) cout << " PMM WR : bytes written to PMM memory (in GBytes)" << "\n";
if (m->MCDRAMmemoryTrafficMetricsAvailable()) cout << " MCDRAM READ : bytes read from MCDRAM controller (in GBytes)" << "\n";
if (m->MCDRAMmemoryTrafficMetricsAvailable()) cout << " MCDRAM WRITE : bytes written to MCDRAM controller (in GBytes)" << "\n";
if (m->memoryIOTrafficMetricAvailable()) cout << " IO : bytes read/written due to IO requests to memory controller (in GBytes); this may be an over estimate due to same-cache-line partial requests" << "\n";
Expand Down Expand Up @@ -345,7 +347,6 @@ void print_output(PCM * m,
{
cout << "\n" << "Intel(r) "<< m->xPI() <<" traffic estimation in bytes (data and non-data traffic outgoing from CPU/socket through "<< m->xPI() <<" links):" << "\n" << "\n";


const uint32 qpiLinks = (uint32)m->getQPILinksPerSocket();

cout << " ";
Expand Down Expand Up @@ -381,6 +382,8 @@ void print_output(PCM * m,
cout << "MEM (GB)->|";
if (m->memoryTrafficMetricsAvailable())
cout << " READ | WRITE |";
if (m->PMMTrafficMetricsAvailable())
cout << " PMM RD | PMM WR |";
if (m->MCDRAMmemoryTrafficMetricsAvailable())
cout << " MCDRAM READ | MCDRAM WRITE |";
if (m->memoryIOTrafficMetricAvailable())
Expand All @@ -399,6 +402,9 @@ void print_output(PCM * m,
if (m->memoryTrafficMetricsAvailable())
cout << " " << setw(5) << getBytesReadFromMC(sktstate1[i], sktstate2[i]) / double(1e9) <<
" " << setw(5) << getBytesWrittenToMC(sktstate1[i], sktstate2[i]) / double(1e9);
if (m->PMMTrafficMetricsAvailable())
cout << " " << setw(5) << getBytesReadFromPMM(sktstate1[i], sktstate2[i]) / double(1e9) <<
" " << setw(5) << getBytesWrittenToPMM(sktstate1[i], sktstate2[i]) / double(1e9);
if (m->MCDRAMmemoryTrafficMetricsAvailable())
cout << " " << setw(11) << getBytesReadFromEDC(sktstate1[i], sktstate2[i]) / double(1e9) <<
" " << setw(11) << getBytesWrittenToEDC(sktstate1[i], sktstate2[i]) / double(1e9);
Expand All @@ -424,6 +430,9 @@ void print_output(PCM * m,
if (m->memoryTrafficMetricsAvailable())
cout << " " << setw(5) << getBytesReadFromMC(sstate1, sstate2) / double(1e9) <<
" " << setw(5) << getBytesWrittenToMC(sstate1, sstate2) / double(1e9);
if (m->PMMTrafficMetricsAvailable())
cout << " " << setw(5) << getBytesReadFromPMM(sstate1, sstate2) / double(1e9) <<
" " << setw(5) << getBytesWrittenToPMM(sstate1, sstate2) / double(1e9);
if (m->memoryIOTrafficMetricAvailable())
cout << " " << setw(5) << getIORequestBytesFromMC(sstate1, sstate2) / double(1e9);
cout << " ";
Expand Down Expand Up @@ -499,6 +508,9 @@ void print_csv_header(PCM * m,
if (m->memoryTrafficMetricsAvailable())
cout << ";;";

if (m->PMMTrafficMetricsAvailable())
cout << ";;";

if (m->MCDRAMmemoryTrafficMetricsAvailable())
cout << ";;";

Expand Down Expand Up @@ -540,6 +552,8 @@ void print_csv_header(PCM * m,
cout << ";";
if (m->memoryTrafficMetricsAvailable())
cout << ";;";
if (m->PMMTrafficMetricsAvailable())
cout << ";;";
if (m->MCDRAMmemoryTrafficMetricsAvailable())
cout << ";;";
}
Expand Down Expand Up @@ -639,6 +653,9 @@ void print_csv_header(PCM * m,
if (m->memoryTrafficMetricsAvailable())
cout << "READ;WRITE;";

if (m->PMMTrafficMetricsAvailable())
cout << "PMM_RD;PMM_WR;";

if (m->MCDRAMmemoryTrafficMetricsAvailable())
cout << "MCDRAM_READ;MCDRAM_WRITE;";

Expand Down Expand Up @@ -680,6 +697,8 @@ void print_csv_header(PCM * m,
cout << "RMB;";
if (m->memoryTrafficMetricsAvailable())
cout << "READ;WRITE;";
if (m->PMMTrafficMetricsAvailable())
cout << "PMM_RD;PMM_WR;";
if (m->MCDRAMmemoryTrafficMetricsAvailable())
cout << "MCDRAM_READ;MCDRAM_WRITE;";
cout << "TEMP;";
Expand Down Expand Up @@ -835,6 +854,10 @@ void print_csv(PCM * m,
cout << getBytesReadFromMC(sstate1, sstate2) / double(1e9) <<
';' << getBytesWrittenToMC(sstate1, sstate2) / double(1e9) << ';';

if (m->PMMTrafficMetricsAvailable())
cout << getBytesReadFromPMM(sstate1, sstate2) / double(1e9) <<
';' << getBytesWrittenToPMM(sstate1, sstate2) / double(1e9) << ';';

if (m->MCDRAMmemoryTrafficMetricsAvailable())
cout << getBytesReadFromEDC(sstate1, sstate2) / double(1e9) <<
';' << getBytesWrittenToEDC(sstate1, sstate2) / double(1e9) << ';';
Expand Down Expand Up @@ -880,6 +903,9 @@ void print_csv(PCM * m,
if (m->memoryTrafficMetricsAvailable())
cout << ';' << getBytesReadFromMC(sktstate1[i], sktstate2[i]) / double(1e9) <<
';' << getBytesWrittenToMC(sktstate1[i], sktstate2[i]) / double(1e9);
if (m->PMMTrafficMetricsAvailable())
cout << ';' << getBytesReadFromPMM(sktstate1[i], sktstate2[i]) / double(1e9) <<
';' << getBytesWrittenToPMM(sktstate1[i], sktstate2[i]) / double(1e9);
if (m->MCDRAMmemoryTrafficMetricsAvailable())
cout << ';' << getBytesReadFromEDC(sktstate1[i], sktstate2[i]) / double(1e9) <<
';' << getBytesWrittenToEDC(sktstate1[i], sktstate2[i]) / double(1e9);
Expand Down
30 changes: 29 additions & 1 deletion types.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ struct BecktonUncorePMUCNTCTLRegister
#define KNL_EDC7_ECLK_REGISTER_DEV_ADDR (31)
#define KNL_EDC7_ECLK_REGISTER_FUNC_ADDR (2)


/**
* XPF_ for Xeons: SNB, IVT, HSX, BDW, etc.
* KNX_ for Xeon Phi (Knights *) processors
Expand Down Expand Up @@ -651,6 +650,26 @@ struct BecktonUncorePMUCNTCTLRegister
#define QPI_PORT1_MISC_REGISTER_FUNC_ADDR (0)
#define QPI_PORT2_MISC_REGISTER_FUNC_ADDR (0)

#define SKX_M2M_0_REGISTER_DEV_ADDR (8)
#define SKX_M2M_0_REGISTER_FUNC_ADDR (0)
#define SKX_M2M_1_REGISTER_DEV_ADDR (9)
#define SKX_M2M_1_REGISTER_FUNC_ADDR (0)

#define M2M_PCI_PMON_BOX_CTL_ADDR (0x258)

#define M2M_PCI_PMON_CTL0_ADDR (0x228)
#define M2M_PCI_PMON_CTL1_ADDR (0x230)
#define M2M_PCI_PMON_CTL2_ADDR (0x238)
#define M2M_PCI_PMON_CTL3_ADDR (0x240)

#define M2M_PCI_PMON_CTR0_ADDR (0x200)
#define M2M_PCI_PMON_CTR1_ADDR (0x208)
#define M2M_PCI_PMON_CTR2_ADDR (0x210)
#define M2M_PCI_PMON_CTR3_ADDR (0x218)

#define PCM_INVALID_DEV_ADDR (~(uint32)0UL)
#define PCM_INVALID_FUNC_ADDR (~(uint32)0UL)

#define Q_P_PCI_PMON_BOX_CTL_ADDR (0x0F4)

#define Q_P_PCI_PMON_CTL3_ADDR (0x0E4)
Expand Down Expand Up @@ -847,6 +866,15 @@ struct BecktonUncorePMUCNTCTLRegister
#define IIO_MSR_PMON_CTL_CH_MASK(x) ((x) << 36ULL)
#define IIO_MSR_PMON_CTL_FC_MASK(x) ((x) << 44ULL)

#define M2M_PCI_PMON_CTL_EVENT(x) ((x) << 0)
#define M2M_PCI_PMON_CTL_UMASK(x) ((x) << 8)
#define M2M_PCI_PMON_CTL_RST (1 << 17)
#define M2M_PCI_PMON_CTL_EDGE_DET (1 << 18)
#define M2M_PCI_PMON_CTL_OV_EN (1 << 20)
#define M2M_PCI_PMON_CTL_EN (1 << 22)
#define M2M_PCI_PMON_CTL_INVERT (1 << 23)
#define M2M_PCI_PMON_CTL_THRESH(x) ((x) << 24ULL)

#define UCLK_FIXED_CTL_OV_EN (1 << 20)
#define UCLK_FIXED_CTL_EN (1 << 22)

Expand Down