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:
parent
552c403223
commit
6bfa5980f9
1 changed files with 17 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue