Skip to content

Commit 3270122

Browse files
committed
pcm-pcie: check if the required CHA PMUs are available
Change-Id: I0abf74105788c3d47d0e08a9e256bd480e553dbe
1 parent 05a741c commit 3270122

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pcm-pcie.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ void IPlatform::init()
7070
{
7171
print_cpu_details();
7272

73+
if (m_pcm->getMaxNumOfUncorePMUs(PCM::CBO_PMU_ID) == 0) // CHAs (CBoxes) PMUs are not available
74+
{
75+
cerr << "Your processor/system does not support CHA PCIe performance counters. Program aborted\n";
76+
exit(EXIT_FAILURE);
77+
}
78+
7379
if (m_pcm->isMaxNumOfCBoxesBasedOnCoreCount() && m_pcm->isSomeCoreOfflined())
7480
{
7581
/*

0 commit comments

Comments
 (0)