mirror of
https://github.com/Evolution-X-Devices/device_google_gs201
synced 2026-01-27 14:29:33 +00:00
powerstats: add AoC restart count stats
Bug: 226173008 Test: dump power stats and verify restart count increased Change-Id: I8fabb1ccf853ad26c4f455129f6d337e8eb37e2c Signed-off-by: Darren Hsu <darrenhsu@google.com>
This commit is contained in:
committed by
TreeHugger Robot
parent
552c403223
commit
6bfa5980f9
@@ -136,6 +136,23 @@ void addAoC(std::shared_ptr<PowerStats> p) {
|
||||
};
|
||||
p->addStateResidencyDataProvider(
|
||||
std::make_unique<AocStateResidencyDataProvider>(monitorIds, monitorStates));
|
||||
|
||||
// Add AoC restart count
|
||||
const GenericStateResidencyDataProvider::StateResidencyConfig restartCountConfig = {
|
||||
.entryCountSupported = true,
|
||||
.entryCountPrefix = "",
|
||||
.totalTimeSupported = false,
|
||||
.lastEntrySupported = false,
|
||||
};
|
||||
const std::vector<std::pair<std::string, std::string>> restartCountHeaders = {
|
||||
std::make_pair("RESTART", ""),
|
||||
};
|
||||
std::vector<GenericStateResidencyDataProvider::PowerEntityConfig> cfgs;
|
||||
cfgs.emplace_back(
|
||||
generateGenericStateResidencyConfigs(restartCountConfig, restartCountHeaders),
|
||||
"AoC-Count", "");
|
||||
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
|
||||
"/sys/devices/platform/19000000.aoc/restart_count", cfgs));
|
||||
}
|
||||
|
||||
void addDvfsStats(std::shared_ptr<PowerStats> p) {
|
||||
|
||||
Reference in New Issue
Block a user