summaryrefslogtreecommitdiffstats
path: root/libart
diff options
context:
space:
mode:
authorAnwar Ghuloum <anwarg@google.com>2014-09-24 16:39:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-24 16:39:51 +0000
commitd73625d5e0d1fd70966264cbc518c9177d4af848 (patch)
tree29f9b852fd03465834bd89e729bfda8b43d7cacc /libart
parent9252ce2bef667745ad23601d5ac25b435e6e77f5 (diff)
parent5467456d499d7f99c68252a7d72858d65608a190 (diff)
downloadlibcore-d73625d5e0d1fd70966264cbc518c9177d4af848.tar.gz
libcore-d73625d5e0d1fd70966264cbc518c9177d4af848.tar.bz2
libcore-d73625d5e0d1fd70966264cbc518c9177d4af848.zip
Merge "Revert "Timing hacks DO NOT MERGE"" into lmp-dev
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 21c69df70..71a8d8651 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");
}
/**