diff options
author | Jesse Wilson <jessewilson@google.com> | 2011-06-20 15:08:30 -0700 |
---|---|---|
committer | Jesse Wilson <jessewilson@google.com> | 2011-06-20 19:53:48 -0700 |
commit | 64c6c367497c7fcf88e7527022234043e4460758 (patch) | |
tree | 2bb4f54e976aeb6b2f0ed91cccb0f8fb2f97691e /dalvik | |
parent | 4c94a6128d1fcfaa75539b36c9f50d0c75df6144 (diff) | |
download | libcore-64c6c367497c7fcf88e7527022234043e4460758.zip libcore-64c6c367497c7fcf88e7527022234043e4460758.tar.gz libcore-64c6c367497c7fcf88e7527022234043e4460758.tar.bz2 |
Implement the finalizer watchdog.
Change-Id: Ia4aaf5f0ef5a2f5f7e6ec3e8b4c4e300c9e1b2ee
http://b/4144865
Diffstat (limited to 'dalvik')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/VMRuntime.java | 5 | ||||
-rw-r--r-- | dalvik/src/main/java/dalvik/system/Zygote.java | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/dalvik/src/main/java/dalvik/system/VMRuntime.java b/dalvik/src/main/java/dalvik/system/VMRuntime.java index 3e35ecf..1a19d0e 100644 --- a/dalvik/src/main/java/dalvik/system/VMRuntime.java +++ b/dalvik/src/main/java/dalvik/system/VMRuntime.java @@ -203,4 +203,9 @@ public final class VMRuntime { * up to the maximum heap size. */ public native void clearGrowthLimit(); + + /** + * Returns true if either a Java debugger or native debugger is active. + */ + public native boolean isDebuggerActive(); } diff --git a/dalvik/src/main/java/dalvik/system/Zygote.java b/dalvik/src/main/java/dalvik/system/Zygote.java index 336a6d6..fe432a9 100644 --- a/dalvik/src/main/java/dalvik/system/Zygote.java +++ b/dalvik/src/main/java/dalvik/system/Zygote.java @@ -17,8 +17,6 @@ package dalvik.system; import java.io.File; -import java.lang.FinalizerThread; -import java.lang.ref.ReferenceQueueThread; /** * Provides access to the Dalvik "zygote" feature, which allows a VM instance to @@ -50,8 +48,7 @@ public class Zygote { private Zygote() {} private static void preFork() { - ReferenceQueueThread.stopReferenceQueue(); - FinalizerThread.stopFinalizer(); + Daemons.stop(); waitUntilAllThreadsStopped(); } @@ -72,8 +69,7 @@ public class Zygote { } private static void postFork() { - ReferenceQueueThread.startReferenceQueue(); - FinalizerThread.startFinalizer(); + Daemons.start(); } /** |