powerstats: add AoC restart count stats am: 6bfa5980f9

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs201/+/17351231

Change-Id: I36a970668b8855dfc38dc9f99c0e759e7ebbe16d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Darren Hsu 2022-03-25 07:19:16 +00:00 committed by Automerger Merge Worker
commit bd2d419adb

View file

@ -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) {