Skip to content

Commit

Permalink
catch exception in getMaxNumOfCBoxes to allow the fall-back perf API …
Browse files Browse the repository at this point in the history
…method to be called

Change-Id: I9ae1a831c16576ebae9606991ebb1650b5e39cd8
  • Loading branch information
rdementi authored and opcm committed Sep 24, 2023
1 parent 59ddabc commit 680166f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cpucounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9016,7 +9016,7 @@ uint32 PCM::getMaxNumOfCBoxes() const
switch (cpu_model)
{
case SPR:
{
try {
PciHandleType * h = getDeviceHandle(PCM_INTEL_PCI_VENDOR_ID, 0x325b);
if (h)
{
Expand All @@ -9028,6 +9028,10 @@ uint32 PCM::getMaxNumOfCBoxes() const
delete h;
}
}
catch (std::exception& e)
{
std::cerr << "Warning: reading the number of CHA from PCICFG register has failed: " << e.what() << "\n";
}
break;
case KNL:
case SKX:
Expand Down

0 comments on commit 680166f

Please sign in to comment.