OSDN Git Service

Atom: BootSequenceReported
authorTej Singh <singhtejinder@google.com>
Fri, 26 Jan 2018 01:45:49 +0000 (17:45 -0800)
committerTej Singh <singhtejinder@google.com>
Tue, 30 Jan 2018 03:26:57 +0000 (19:26 -0800)
Update to atoms.proto to include boot sequence reported

Test: manual
Change-Id: Ie6b7021528ef81b95969ae90f130f5f0ad0eb9a5

cmds/statsd/src/atoms.proto

index ba4f480..fae73c2 100644 (file)
@@ -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: "<EMPTY>" if not available.
+    optional string bootloader_reason = 1;
+
+    // Reason for system boot. Eg. bootloader, reboot,userrequested
+    // Default: "<EMPTY>" 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.
  *