powerstats: add support of sleep duration in CPUPM data provider
Bug: 263276734 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: If873c5d50dd12a54addd14f56aebd48fdee91415 Signed-off-by: Darren Hsu <darrenhsu@google.com>
This commit is contained in:
parent
e3aae9ad7d
commit
a7dca1b9c1
1 changed files with 4 additions and 1 deletions
|
@ -387,8 +387,11 @@ void addCPUclusters(std::shared_ptr<PowerStats> p) {
|
|||
.states = {
|
||||
std::make_pair("DOWN", "[state1]")}};
|
||||
|
||||
CpupmStateResidencyDataProvider::SleepConfig sleepConfig = {"LPM:", "SLEEP", "total_time_ns:"};
|
||||
|
||||
p->addStateResidencyDataProvider(std::make_unique<CpupmStateResidencyDataProvider>(
|
||||
"/sys/devices/system/cpu/cpupm/cpupm/time_in_state", config));
|
||||
"/sys/devices/system/cpu/cpupm/cpupm/time_in_state", config,
|
||||
"/sys/devices/platform/acpm_stats/soc_stats", sleepConfig));
|
||||
|
||||
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer(p,
|
||||
EnergyConsumerType::CPU_CLUSTER, "CPUCL0", {"S4M_VDD_CPUCL0"}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue