Log java crashes & native crashes in critical event log

Change-Id: I9efe1ff6c98dec47edbc95974d0959c343c7474f
Test: atest CriticalEventLogTest
Bug: 200263868
This commit is contained in:
Ben Miles
2021-11-09 11:17:49 +00:00
parent 75251249f2
commit dfec95bc84
4 changed files with 347 additions and 39 deletions

View File

@@ -57,6 +57,8 @@ message CriticalEventProto {
Watchdog watchdog = 2;
HalfWatchdog half_watchdog = 3;
AppNotResponding anr = 4;
JavaCrash java_crash = 5;
NativeCrash native_crash = 6;
}
message Watchdog {
@@ -99,6 +101,47 @@ message CriticalEventProto {
optional ProcessClass process_class = 5;
}
message JavaCrash {
// The crash exception class.
// Optional, may be redacted for privacy.
optional string exception_class = 1;
// Name of the crashed process.
// Optional, may be redacted for privacy.
optional string process = 2;
// PID of the crashed process.
// Required.
optional int32 pid = 3;
// UID of the crashed process.
// Required.
optional int32 uid = 4;
// Category of the crashed process (DATA_APP, SYSTEM_APP, etc).
// Required.
optional ProcessClass process_class = 5;
}
message NativeCrash {
// Name of the crashed process.
// Optional, may be redacted for privacy.
optional string process = 1;
// PID of the crashed process.
// Required.
optional int32 pid = 2;
// UID of the crashed process.
// Required.
optional int32 uid = 3;
// Category of the crashed process (DATA_APP, SYSTEM_APP, etc).
// Required.
optional ProcessClass process_class = 4;
}
// Mirrors definition & values in {@link android.server.ServerProtoEnums}.
enum ProcessClass {
PROCESS_CLASS_UNKNOWN = 0;