From 66f3f5b10eaa08d9b3d3b516cff1b2b72dffa885 Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Thu, 2 Dec 2021 11:01:37 +0800 Subject: [PATCH] dumpstate: add more cooling device debug info Bug: 221369360 Test: check dumpstate_board.txt Change-Id: Ice04536c321d35553a948cdea2e6a1add207c2c7 (cherry picked from commit 125d1d5833a8153eabddf5f1bc608efaa7605bd2) --- dumpstate/DumpstateDevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 7b98f75b..711b9e82 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -487,6 +487,10 @@ 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\" ; "