summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2018-03-16 08:53:34 -0700
committerMark Salyzyn <salyzyn@google.com>2018-03-16 10:36:53 -0700
commit2b820536e6e3a0a939ffa34a2ed63523e87166d6 (patch)
treea049429b9d2caea1a99cd5877abb84fda5941a5d
parent853bb80e58fa8f6cea6bead5cc36370a3fe8901e (diff)
downloadsystem_core-2b820536e6e3a0a939ffa34a2ed63523e87166d6.tar.gz
system_core-2b820536e6e3a0a939ffa34a2ed63523e87166d6.tar.bz2
system_core-2b820536e6e3a0a939ffa34a2ed63523e87166d6.zip
bootstat: comment out duplicate entries in kBootReasonMap
Two entries can be reused. The third "unknown" entry is not really a duplicate since the kUnknownBootReason is not checked. Duplicate entries reused in the future, should have analysis/uma/configs/clearcut/TRON/histograms.xml updated first. Test: boot_reason_test.sh Change-Id: If2071a18160dc2c93e851fecc6b8c11fc76c9845
-rw-r--r--bootstat/bootstat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/bootstat/bootstat.cpp b/bootstat/bootstat.cpp
index dfc46ea61..74ba188c7 100644
--- a/bootstat/bootstat.cpp
+++ b/bootstat/bootstat.cpp
@@ -139,7 +139,7 @@ constexpr int32_t kUnknownBootReason = 1;
// values.
const std::map<std::string, int32_t> kBootReasonMap = {
{"empty", kEmptyBootReason},
- {"unknown", kUnknownBootReason},
+ {"__BOOTSTAT_UNKNOWN__", kUnknownBootReason},
{"normal", 2},
{"recovery", 3},
{"reboot", 4},
@@ -199,7 +199,7 @@ const std::map<std::string, int32_t> kBootReasonMap = {
{"cold", 56},
{"hard", 57},
{"warm", 58},
- {"recovery", 59},
+ // {"recovery", 59}, // Duplicate of enum 3 above. Immediate reuse possible.
{"thermal-shutdown", 60},
{"shutdown,thermal", 61},
{"shutdown,battery", 62},
@@ -230,7 +230,7 @@ const std::map<std::string, int32_t> kBootReasonMap = {
{"shutdown,thermal,battery", 87},
{"reboot,its_just_so_hard", 88}, // produced by boot_reason_test
{"reboot,Its Just So Hard", 89}, // produced by boot_reason_test
- {"usb", 90},
+ // {"usb", 90}, // Duplicate of enum 80 above. Immediate reuse possible.
{"charge", 91},
{"oem_tz_crash", 92},
{"uvlo", 93},