summaryrefslogtreecommitdiffstats
path: root/vm/Thread.c
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2009-12-02 17:03:41 -0800
committerAndy McFadden <fadden@android.com>2009-12-03 12:47:11 -0800
commit1ede83b7ab24a7e14f37e330eb841a075525c3e9 (patch)
tree5b9c57bacb0f21c4303f6eaad38edb6585fc14ae /vm/Thread.c
parent67e0451689234ce5c2daa83781841419f161efa8 (diff)
downloadandroid_dalvik-1ede83b7ab24a7e14f37e330eb841a075525c3e9.tar.gz
android_dalvik-1ede83b7ab24a7e14f37e330eb841a075525c3e9.tar.bz2
android_dalvik-1ede83b7ab24a7e14f37e330eb841a075525c3e9.zip
Reduce spin-on-suspend complaints.
The first complaint is popping up too quickly, and the pile of log messages it emits aren't helping the process do real work. This skips the complaining if we just finished the first (0.25 sec) sleep.
Diffstat (limited to 'vm/Thread.c')
-rw-r--r--vm/Thread.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/vm/Thread.c b/vm/Thread.c
index 71f63244e..67683b514 100644
--- a/vm/Thread.c
+++ b/vm/Thread.c
@@ -2563,15 +2563,17 @@ static void waitForThreadSuspend(Thread* self, Thread* thread)
#endif
/*
- * Sleep briefly. This returns false if we've exceeded the total
- * time limit for this round of sleeping.
+ * Sleep briefly. The iterative sleep call returns false if we've
+ * exceeded the total time limit for this round of sleeping.
*/
if (!dvmIterativeSleep(sleepIter++, spinSleepTime, startWhen)) {
- LOGW("threadid=%d: spin on suspend #%d threadid=%d (h=%d)\n",
- self->threadId, retryCount,
- thread->threadId, (int)thread->handle);
- dumpWedgedThread(thread);
- complained = true;
+ if (spinSleepTime != FIRST_SLEEP) {
+ LOGW("threadid=%d: spin on suspend #%d threadid=%d (h=%d)\n",
+ self->threadId, retryCount,
+ thread->threadId, (int)thread->handle);
+ dumpWedgedThread(thread);
+ complained = true;
+ }
// keep going; could be slow due to valgrind
sleepIter = 0;