From e697a4fc648f5c66a96f6f9450a9e79ba8952101 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 9 Oct 2018 10:40:52 -0700 Subject: [PATCH] Frameworks: Add VMRuntime.hasBootImageSpaces check Log a wtf in the system server when the runtime does not use a boot image. Test: m Test: system boots Change-Id: I087c269dd1e95eeeab5db4250133f9c61e9399c7 --- services/java/com/android/server/SystemServer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 82a28954a8c6..439f313e0f0a 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -459,6 +459,12 @@ public final class SystemServer { } } + // Diagnostic to ensure that the system is in a base healthy state. Done here as a common + // non-zygote process. + if (!VMRuntime.hasBootImageSpaces()) { + Slog.wtf(TAG, "Runtime is not running with a boot image!"); + } + // Loop forever. Looper.loop(); throw new RuntimeException("Main thread loop unexpectedly exited"); -- 2.11.0