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: I3b7b0d573bfd5f7e5e9f05c333b5a38940f3d8d6
Signed-off-by: Vishvam Mazumdar <vmazumdar@google.com>
This commit is contained in:
Vishvam Mazumdar 2024-06-04 18:02:35 +00:00
parent e252dc733c
commit cae96e4e50

View file

@ -1028,9 +1028,21 @@ void dumpEvtCounter() {
}
}
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() {
dumpPowerStatsTimes();
dumpAcpmStats();
dumpCpuIdleHistogramStats();
dumpPowerSupplyStats();
dumpMaxFg();
dumpPowerSupplyDock();