powerstats: add AoC restart count stats
Bug: 226173008 Test: dump power stats and verify restart count increased Change-Id: Ia0cfcd9f9dae68dc21c33074147e8b6db547ebc9 Signed-off-by: Darren Hsu <darrenhsu@google.com>
This commit is contained in:
parent
264b325dd1
commit
cce5e9f8b0
1 changed files with 17 additions and 0 deletions
|
@ -79,6 +79,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