aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-06 01:08:04 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-06 01:08:04 +0000
commiteee32f447bffea9f98a3da9253d4017fc3db9c17 (patch)
tree230866a275554980e007472dc7d9fc5c5ca89e49
parentabc2f373c7c725b64f275cfcf36ee7e98cf3072c (diff)
parentaab736431ddc8da817859903cc4a9a793932aa74 (diff)
downloadlibcore-android-s-beta-4.tar.gz
Snap for 7524638 from aab736431ddc8da817859903cc4a9a793932aa74 to sc-releaseandroid-s-beta-4android12-beta4-releaseandroid-s-beta-4
Change-Id: I3a13d64e18ee1d7e925496f0e1f25833877ef4af
-rw-r--r--dalvik/src/main/java/dalvik/system/ZygoteHooks.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
index 5e0c14010ad..a17a2574f7b 100644
--- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
+++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
@@ -206,7 +206,7 @@ public final class ZygoteHooks {
/**
* 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 @@ public final class ZygoteHooks {
@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 @@ public final class ZygoteHooks {
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