From 2107135c90696d1634c474fd67db487faafd47df Mon Sep 17 00:00:00 2001 From: George Lee Date: Wed, 4 Aug 2021 11:19:23 -0700 Subject: [PATCH] bcl: Enable Instruction print in bugreport MPMM/PPM readings, OFFSRC and PWRONSRC will be printed out. Bug: 195455000 Test: Local Test and confirm its printed. ------ Instruction ... ------ enable_mitigation=1 mpmm_settings=0x1a offsrc=0x0 ppm_settings=0x0 pwronsrc=0x4 Signed-off-by: George Lee Change-Id: I1f3e10edc416966f0eba18e0ba94fb56a487eaee --- dumpstate/DumpstateDevice.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index bac539b3..418dcc53 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -458,6 +458,11 @@ void DumpstateDevice::dumpPowerSection(int fd) { "do lvl=`cat $f`; " "a=${f/\\/sys\\/devices\\/virtual\\/pmic\\/mitigation\\/triggered_lvl\\//}; " "echo \"${a/_lvl/} \\t$lvl\" ; done"}); + RunCommandToFd(fd, "Instruction", {"/vendor/bin/sh", "-c", + "for f in `ls /sys/devices/virtual/pmic/mitigation/instruction/*` ; " + "do val=`cat $f` ; " + "a=${f/\\/sys\\/devices\\/virtual\\/pmic\\/mitigation\\/instruction\\//}; " + "echo \"$a=$val\" ; done"}); }