summaryrefslogtreecommitdiffstats
path: root/libart
diff options
context:
space:
mode:
authorAnwar Ghuloum <anwarg@google.com>2014-09-24 16:39:35 +0000
committerAnwar Ghuloum <anwarg@google.com>2014-09-24 16:39:35 +0000
commit5467456d499d7f99c68252a7d72858d65608a190 (patch)
treef5025ea8e7a20db4feac5755177277e17236b1f6 /libart
parent6d688b8bb051942cd3cdd5fc1e19f42c3049f8a1 (diff)
downloadlibcore-5467456d499d7f99c68252a7d72858d65608a190.tar.gz
libcore-5467456d499d7f99c68252a7d72858d65608a190.tar.bz2
libcore-5467456d499d7f99c68252a7d72858d65608a190.zip
Revert "Timing hacks DO NOT MERGE"
This reverts commit 6d688b8bb051942cd3cdd5fc1e19f42c3049f8a1. Change-Id: Ia4e1ebd0849f4c6b9958d7d78edcedd096042926
Diffstat (limited to 'libart')
-rw-r--r--libart/src/main/java/java/lang/Daemons.java27
1 files changed, 0 insertions, 27 deletions
diff --git a/libart/src/main/java/java/lang/Daemons.java b/libart/src/main/java/java/lang/Daemons.java
index 6f94f7f93..1422c1397 100644
--- a/libart/src/main/java/java/lang/Daemons.java
+++ b/libart/src/main/java/java/lang/Daemons.java
@@ -35,47 +35,20 @@ public final class Daemons {
private static final int NANOS_PER_SECOND = NANOS_PER_MILLI * 1000;
private static final long MAX_FINALIZE_NANOS = 10L * NANOS_PER_SECOND;
- /**
- * Temporary hack: check time since start time and log if over a fixed threshold.
- *
- * @return void
- */
- private static void checkTime(long startTime, String where) {
- long now = System.nanoTime();
- long msDuration = (now - startTime) / (1000 * 1000);
- if (msDuration > 1000) {
- // If we are taking more than a second, log about it.
- System.logW("Slow operation: " + msDuration + "ms so far, now at " + where);
- }
- }
-
-
public static void start() {
- long startTime = System.nanoTime();
ReferenceQueueDaemon.INSTANCE.start();
- checkTime(startTime, "Daemons.ReferenceQueueDaemonStart");
FinalizerDaemon.INSTANCE.start();
- checkTime(startTime, "Daemons.FinalizerQueueDaemonStart");
FinalizerWatchdogDaemon.INSTANCE.start();
- checkTime(startTime, "Daemons.FinalizerWatchdogQueueDaemonStart");
HeapTrimmerDaemon.INSTANCE.start();
- checkTime(startTime, "Daemons.HeapTrimmerDaemonStart");
GCDaemon.INSTANCE.start();
- checkTime(startTime, "Daemons.GCDaemonStart");
}
public static void stop() {
- long startTime = System.nanoTime();
ReferenceQueueDaemon.INSTANCE.stop();
- checkTime(startTime, "Daemons.ReferenceQueueDaemonStop");
FinalizerDaemon.INSTANCE.stop();
- checkTime(startTime, "Daemons.FinalizerDaemonStop");
FinalizerWatchdogDaemon.INSTANCE.stop();
- checkTime(startTime, "Daemons.FinalizerWatchdogDaemonStop");
HeapTrimmerDaemon.INSTANCE.stop();
- checkTime(startTime, "Daemons.HeapTrimmerDaemonStop");
GCDaemon.INSTANCE.stop();
- checkTime(startTime, "Daemons.GCDaemonStop");
}
/**