dumpstate: add more cooling device debug info

Bug: 202813409
Test: check dumpstate_board.txt
Change-Id: Ice04536c321d35553a948cdea2e6a1add207c2c7
This commit is contained in:
TeYuan Wang 2021-12-02 11:01:37 +08:00 committed by TreeHugger Robot
parent 4cdfc08f1b
commit 404a90ef54

View file

@ -492,6 +492,14 @@ void DumpstateDevice::dumpThermalSection(int fd) {
"for f in /sys/class/thermal/cooling* ; do "
"type=`cat $f/type` ; temp=`cat $f/cur_state` ; echo \"$type: $temp\" ; "
"done"});
RunCommandToFd(fd, "Cooling Device Time in State", {"/vendor/bin/sh", "-c", "for f in /sys/class/thermal/cooling* ; "
"do type=`cat $f/type` ; temp=`cat $f/stats/time_in_state_ms` ; echo \"$type:\n$temp\" ; done"});
RunCommandToFd(fd, "Cooling Device Trans Table", {"/vendor/bin/sh", "-c", "for f in /sys/class/thermal/cooling* ; "
"do type=`cat $f/type` ; temp=`cat $f/stats/trans_table` ; echo \"$type:\n$temp\" ; done"});
RunCommandToFd(fd, "Cooling Device State2Power Table", {"/vendor/bin/sh", "-c",
"for f in /sys/class/thermal/cooling* ; do "
"type=`cat $f/type` ; state2power_table=`cat $f/state2power_table` ; echo \"$type: $state2power_table\" ; "
"done"});
}
// Dump items related to touch