Skip to content

Commit 0f7ba13

Browse files
committed
fix crash on BDX when trying to program IRP or IIO PMU
Change-Id: Icc9b6fdc4d32618eecc0e5e3e3e8a62184983c58
1 parent efc2e32 commit 0f7ba13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cpucounters.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,9 +2430,9 @@ void PCM::initUncorePMUsDirect()
24302430
IRP_UNIT_CTL = SPR_IRP_UNIT_CTL;
24312431
break;
24322432
}
2433+
irpPMUs.resize(num_sockets);
24332434
if (IRP_UNIT_CTL)
24342435
{
2435-
irpPMUs.resize(num_sockets);
24362436
for (uint32 s = 0; s < (uint32)num_sockets; ++s)
24372437
{
24382438
auto& handle = MSR[socketRefCore[s]];
@@ -9270,6 +9270,7 @@ uint32 PCM::getMaxNumOfIIOStacks() const
92709270
{
92719271
if (iioPMUs.size() > 0)
92729272
{
9273+
assert(irpPMUs.size());
92739274
assert(iioPMUs[0].size() == irpPMUs[0].size());
92749275
return (uint32)iioPMUs[0].size();
92759276
}

0 commit comments

Comments
 (0)