Loading proto/src/criticalevents/critical_event_log.proto +3 −0 Original line number Diff line number Diff line Loading @@ -59,8 +59,11 @@ message CriticalEventProto { AppNotResponding anr = 4; JavaCrash java_crash = 5; NativeCrash native_crash = 6; SystemServerStarted system_server_started = 7; } message SystemServerStarted {} message Watchdog { // The watchdog subject. // Required. Loading services/core/java/com/android/server/criticalevents/CriticalEventLog.java +8 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import com.android.server.criticalevents.nano.CriticalEventProto.AppNotRespondin import com.android.server.criticalevents.nano.CriticalEventProto.HalfWatchdog; import com.android.server.criticalevents.nano.CriticalEventProto.JavaCrash; import com.android.server.criticalevents.nano.CriticalEventProto.NativeCrash; import com.android.server.criticalevents.nano.CriticalEventProto.SystemServerStarted; import com.android.server.criticalevents.nano.CriticalEventProto.Watchdog; import java.io.File; Loading Loading @@ -141,6 +142,13 @@ public class CriticalEventLog { return System.currentTimeMillis(); } /** Logs when system server started. */ public void logSystemServerStarted() { CriticalEventProto event = new CriticalEventProto(); event.setSystemServerStarted(new SystemServerStarted()); log(event); } /** Logs a watchdog. */ public void logWatchdog(String subject, UUID uuid) { Watchdog watchdog = new Watchdog(); Loading services/java/com/android/server/SystemServer.java +2 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ import com.android.server.connectivity.PacProxyService; import com.android.server.contentcapture.ContentCaptureManagerInternal; import com.android.server.coverage.CoverageService; import com.android.server.cpu.CpuMonitorService; import com.android.server.criticalevents.CriticalEventLog; import com.android.server.devicepolicy.DevicePolicyManagerService; import com.android.server.devicestate.DeviceStateManagerService; import com.android.server.display.DisplayManagerService; Loading Loading @@ -964,6 +965,7 @@ public final class SystemServer implements Dumpable { // Only update the timeout after starting all the services so that we use // the default timeout to start system server. updateWatchdogTimeout(t); CriticalEventLog.getInstance().logSystemServerStarted(); } catch (Throwable ex) { Slog.e("System", "******************************************"); Slog.e("System", "************ Failure starting system services", ex); Loading Loading
proto/src/criticalevents/critical_event_log.proto +3 −0 Original line number Diff line number Diff line Loading @@ -59,8 +59,11 @@ message CriticalEventProto { AppNotResponding anr = 4; JavaCrash java_crash = 5; NativeCrash native_crash = 6; SystemServerStarted system_server_started = 7; } message SystemServerStarted {} message Watchdog { // The watchdog subject. // Required. Loading
services/core/java/com/android/server/criticalevents/CriticalEventLog.java +8 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import com.android.server.criticalevents.nano.CriticalEventProto.AppNotRespondin import com.android.server.criticalevents.nano.CriticalEventProto.HalfWatchdog; import com.android.server.criticalevents.nano.CriticalEventProto.JavaCrash; import com.android.server.criticalevents.nano.CriticalEventProto.NativeCrash; import com.android.server.criticalevents.nano.CriticalEventProto.SystemServerStarted; import com.android.server.criticalevents.nano.CriticalEventProto.Watchdog; import java.io.File; Loading Loading @@ -141,6 +142,13 @@ public class CriticalEventLog { return System.currentTimeMillis(); } /** Logs when system server started. */ public void logSystemServerStarted() { CriticalEventProto event = new CriticalEventProto(); event.setSystemServerStarted(new SystemServerStarted()); log(event); } /** Logs a watchdog. */ public void logWatchdog(String subject, UUID uuid) { Watchdog watchdog = new Watchdog(); Loading
services/java/com/android/server/SystemServer.java +2 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ import com.android.server.connectivity.PacProxyService; import com.android.server.contentcapture.ContentCaptureManagerInternal; import com.android.server.coverage.CoverageService; import com.android.server.cpu.CpuMonitorService; import com.android.server.criticalevents.CriticalEventLog; import com.android.server.devicepolicy.DevicePolicyManagerService; import com.android.server.devicestate.DeviceStateManagerService; import com.android.server.display.DisplayManagerService; Loading Loading @@ -964,6 +965,7 @@ public final class SystemServer implements Dumpable { // Only update the timeout after starting all the services so that we use // the default timeout to start system server. updateWatchdogTimeout(t); CriticalEventLog.getInstance().logSystemServerStarted(); } catch (Throwable ex) { Slog.e("System", "******************************************"); Slog.e("System", "************ Failure starting system services", ex); Loading