From 8ad6e673324170ea07a2f82d64669e2560311cbc Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Fri, 1 Jun 2018 08:59:05 -0700 Subject: [PATCH] bootstat: Add kernel_panic,modem + related others Found a kernel modem driver report: Kernel panic - not syncing: subsys-restart: Resetting the SoC - modem crashed. Which translates to the canonical boot reason, a wordy: kernel_panic,subsys-restart:_resetting_the_soc_-_modem_crashed. Shortening and ber matching the string, plus others that are possible, to be more succinct, so added kernel_panic,{modem|adsp|dsps|wcnss}. Test: build Bug: 80553005 Change-Id: I969e1da896cd15b82e2fe11ceb77a5f54dfcfbc8 --- bootstat/bootstat.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bootstat/bootstat.cpp b/bootstat/bootstat.cpp index 1b13b2126..3250b3e34 100644 --- a/bootstat/bootstat.cpp +++ b/bootstat/bootstat.cpp @@ -306,6 +306,10 @@ const std::map kBootReasonMap = { {"kernel_panic,sysrq,livelock,alarm", 161}, // llkd {"kernel_panic,sysrq,livelock,driver", 162}, // llkd {"kernel_panic,sysrq,livelock,zombie", 163}, // llkd + {"kernel_panic,modem", 164}, + {"kernel_panic,adsp", 165}, + {"kernel_panic,dsps", 166}, + {"kernel_panic,wcnss", 167}, }; // Converts a string value representing the reason the system booted to an @@ -702,6 +706,10 @@ bool addKernelPanicSubReason(const pstoreConsole& console, std::string& ret) { {"Corrupt kernel stack", "stack"}, {"low stack detected", "stack"}, {"corrupted stack end", "stack"}, + {"subsys-restart: Resetting the SoC - modem crashed.", "modem"}, + {"subsys-restart: Resetting the SoC - adsp crashed.", "adsp"}, + {"subsys-restart: Resetting the SoC - dsps crashed.", "dsps"}, + {"subsys-restart: Resetting the SoC - wcnss crashed.", "wcnss"}, }; ret = "kernel_panic";