From 6483ea4e0a52a4cdae724344973b4f7b0927b02e Mon Sep 17 00:00:00 2001 From: Tej Singh Date: Thu, 25 Jan 2018 17:45:49 -0800 Subject: [PATCH] Atom: BootSequenceReported Update to atoms.proto to include boot sequence reported Test: manual Change-Id: Ie6b7021528ef81b95969ae90f130f5f0ad0eb9a5 --- cmds/statsd/src/atoms.proto | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index ba4f48008e7a7..fae73c2d60ff3 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -94,6 +94,7 @@ message Atom { LmkStateChanged lmk_state_changed = 54; AppStartMemoryStateCaptured app_start_memory_state_captured = 55; ShutdownSequenceReported shutdown_sequence_reported = 56; + BootSequenceReported boot_sequence_reported = 57; // TODO: Reorder the numbering so that the most frequent occur events occur in the first 15. } @@ -690,6 +691,35 @@ message ShutdownSequenceReported { optional int64 duration_ms = 4; } + +/** + * Logs boot reason and duration. + * + * Logged from: + * system/core/bootstat/bootstat.cpp + */ +message BootSequenceReported { + // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list + // Default: "" if not available. + optional string bootloader_reason = 1; + + // Reason for system boot. Eg. bootloader, reboot,userrequested + // Default: "" if not available. + optional string system_reason = 2; + + // End of boot time in ms from unix epoch using system wall clock. + optional int64 end_time_ms = 3; + + // Total boot duration in ms. + optional int64 total_duration_ms = 4; + + // Bootloader duration in ms. + optional int64 bootloader_duration_ms = 5; + + // Time since last boot in ms. Default: 0 if not available. + optional int64 time_since_last_boot = 6; +} + /** * Logs phone signal strength changes. *