summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nikita Ioffe <ioffe@google.com> 2020-01-10 16:05:08 +0000
committer Nikita Ioffe <ioffe@google.com> 2020-02-03 23:40:56 +0000
commit69c565b972a6533a1e70df4e04be370e22a0438f (patch)
treeea7e15948569807f2c270f4668427ff8ac4fbd96
parent99c83943aa868470a7d0718ce81802c2ef820374 (diff)
Add new atom to log userspace reboot performance
A first stab at the atom to log. Actual logic to log will be in the follow up CL. Test: builds Bug: 148767783 Change-Id: Id3f81ced73ea708f1dcfbcfd66f554e8daed8ccc Merged-In: Id3f81ced73ea708f1dcfbcfd66f554e8daed8ccc (cherry picked from commit 41dd57ee229d808bb401c19cb8533539f0eb42a3)
-rw-r--r--cmds/statsd/src/atoms.proto41
1 files changed, 41 insertions, 0 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 777bea040944..d1fb2db67c9f 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -351,6 +351,7 @@ message Atom {
228 [(allow_from_any_uid) = true];
PerfettoUploaded perfetto_uploaded =
229 [(log_from_module) = "perfetto"];
+ UserspaceRebootReported userspace_reboot_reported = 243;
}
// Pulled events will start at field 10000.
@@ -6987,3 +6988,43 @@ message UpdateEngineSuccessfulUpdateReported {
// The number of reboot of the device during a successful update.
optional int32 reboot_count = 7;
}
+
+/*
+ * Logs userspace reboot outcome and duration.
+ *
+ * Logged from:
+ * frameworks/base/core/java/com/android/server/BootReceiver.java
+ */
+message UserspaceRebootReported {
+ // Possible outcomes of userspace reboot.
+ enum Outcome {
+ // Default value in case platform failed to determine the outcome.
+ OUTCOME_UNKNOWN = 0;
+ // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot).
+ SUCCESS = 1;
+ // Userspace reboot shutdown sequence was aborted.
+ FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2;
+ // Remounting userdata into checkpointing mode failed.
+ FAILED_USERDATA_REMOUNT = 3;
+ // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard
+ // reboot.
+ FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4;
+ }
+ // Outcome of userspace reboot. Always set.
+ optional Outcome outcome = 1;
+ // Duration of userspace reboot in case it has a successful outcome.
+ // Duration is measured as time between userspace reboot was initiated and until boot completed
+ // (e.g. sys.boot_completed=1).
+ optional int64 duration_millis = 2;
+ // State of primary user's (user0) credential encryption storage.
+ enum UserEncryptionState {
+ // Default value.
+ USER_ENCRYPTION_STATE_UNKNOWN = 0;
+ // Credential encrypted storage is unlocked.
+ UNLOCKED = 1;
+ // Credential encrypted storage is locked.
+ LOCKED = 2;
+ }
+ // State of primary user's encryption storage at the moment boot completed. Always set.
+ optional UserEncryptionState user_encryption_state = 3;
+}