Skip to content

Commit ea9fd12

Browse files
committed
do not try to program cha pmu if not available
1 parent 1469e02 commit ea9fd12

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cpucounters.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7745,9 +7745,8 @@ void PCM::programCbo(const uint64 * events, const uint32 opCode, const uint32 nc
77457745
uint32 refCore = socketRefCore[i];
77467746
TemporalThreadAffinity tempThreadAffinity(refCore); // speedup trick for Linux
77477747

7748-
for(uint32 cbo = 0; cbo < getMaxNumOfCBoxes(); ++cbo)
7748+
for(uint32 cbo = 0; cbo < getMaxNumOfCBoxes() && cbo < cboPMUs[i].size(); ++cbo)
77497749
{
7750-
assert(cbo < cboPMUs[i].size());
77517750
cboPMUs[i][cbo].initFreeze(UNC_PMON_UNIT_CTL_FRZ_EN);
77527751

77537752
if (ICX != cpu_model && SNOWRIDGE != cpu_model)

0 commit comments

Comments
 (0)