Add CPU Idle Histogram Stats to dumpstate board file.

This change is to allow the CPU Idle Histogram Stats to be dumped in
bugreports so that there is more insight into the idle behavior of
devices in the field.

Test: Build/Flash
Test: adb bugreport
Bug: 344908619
Flag: EXEMPT bugfix
Change-Id: I9c31b4fbaf8adb35df27f4d19a7bf87ac33b05d3
Signed-off-by: Vishvam Mazumdar <vmazumdar@google.com>
This commit is contained in:
Vishvam Mazumdar 2024-06-04 18:17:45 +00:00
parent 905072c846
commit 5a0aedaec9

View file

@ -941,9 +941,21 @@ void dumpIrqDurationCounts() {
} }
} }
void dumpCpuIdleHistogramStats() {
const char* cpuIdleHistogramTitle = "CPU Idle Histogram";
const char* cpuIdleHistogramFile = "/sys/kernel/metrics/cpuidle_histogram/"
"cpuidle_histogram";
const char* cpuClusterHistogramTitle = "CPU Cluster Histogram";
const char* cpuClusterHistogramFile = "/sys/kernel/metrics/"
"cpuidle_histogram/cpucluster_histogram";
dumpFileContent(cpuIdleHistogramTitle, cpuIdleHistogramFile);
dumpFileContent(cpuClusterHistogramTitle, cpuClusterHistogramFile);
}
int main() { int main() {
dumpPowerStatsTimes(); dumpPowerStatsTimes();
dumpAcpmStats(); dumpAcpmStats();
dumpCpuIdleHistogramStats();
dumpPowerSupplyStats(); dumpPowerSupplyStats();
dumpMaxFg(); dumpMaxFg();
dumpPowerSupplyDock(); dumpPowerSupplyDock();