From 0c831127990588dc43b3bdde1fe508bb9db5b6b4 Mon Sep 17 00:00:00 2001 From: "Dementiev, Roman" Date: Tue, 17 Dec 2024 10:49:49 +0100 Subject: [PATCH] populate sys energy field in additional SystemCounterState getters Change-Id: I90c43c50a1a6fe8bb2b7eb5b1b102d7339a121d1 --- src/cpucounters.cpp | 7 +++++++ src/cpucounters.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/cpucounters.cpp b/src/cpucounters.cpp index f683b380..169ff089 100644 --- a/src/cpucounters.cpp +++ b/src/cpucounters.cpp @@ -6370,6 +6370,7 @@ SystemCounterState PCM::getSystemCounterState() readAndAggregateCXLCMCounters(result); readQPICounters(result); + readSystemEnergyStatus(result); result.ThermalHeadroom = static_cast(PCM_INVALID_THERMAL_HEADROOM); // not available for system } @@ -6977,6 +6978,11 @@ void PCM::getAllCounterStates(SystemCounterState & systemState, std::vectorread(); @@ -7004,6 +7010,7 @@ void PCM::getUncoreCounterStates(SystemCounterState & systemState, std::vector void readMSRs(std::shared_ptr msr, const RawPMUConfig & msrConfig, CounterStateType & result); void readQPICounters(SystemCounterState & counterState); + void readSystemEnergyStatus(SystemCounterState & systemState); void readPCICFGRegisters(SystemCounterState& result); void readMMIORegisters(SystemCounterState& result); void readPMTRegisters(SystemCounterState& result);