Snap for 7524638 from aab736431ddc8da817859903cc4a9a793932aa74 to sc-release
Change-Id: I3a13d64e18ee1d7e925496f0e1f25833877ef4af
diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
index 5e0c140..a17a257 100644
--- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
+++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
@@ -206,7 +206,7 @@
/**
* Is it safe to keep all ART daemon threads stopped indefinitely in the zygote?
* The answer may change from false to true dynamically, but not in the other
- * direction.
+ * direction. Only called in Zygote.
*
* @return {@code true} if it's safe to keep all ART daemon threads stopped
* indefinitely in the zygote; and {@code false} otherwise
@@ -216,12 +216,7 @@
@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean isIndefiniteThreadSuspensionSafe() {
- // TODO: Make this return true if we're done with JIT compilation.
- //
- // We only care about JIT compilation that affects other processes.
- // The zygote itself doesn't run appreciable amounts of Java code when
- // running single-threaded.
- return !nativeZygoteJitEnabled();
+ return nativeZygoteLongSuspendOk();
}
// Hook for SystemServer specific early initialization post-forking.
@@ -235,7 +230,7 @@
boolean isSystemServer, boolean isZygote,
String instructionSet);
- private static native boolean nativeZygoteJitEnabled();
+ private static native boolean nativeZygoteLongSuspendOk();
/**
* We must not fork until we're single-threaded again. Wait until /proc shows we're