diff options
author | Carl Shapiro <cshapiro@google.com> | 2011-03-30 19:35:34 -0700 |
---|---|---|
committer | Carl Shapiro <cshapiro@google.com> | 2011-03-30 19:53:34 -0700 |
commit | ce87bfed41bbe4248b2770fb1a90f34b2518f6fa (patch) | |
tree | 8a2ca573187d322f7202df68d36a1101294f5ee5 /vm/Thread.c | |
parent | 6920d2c5b83f8ff0cdc8f33770cd658969dbd262 (diff) | |
download | android_dalvik-ce87bfed41bbe4248b2770fb1a90f34b2518f6fa.tar.gz android_dalvik-ce87bfed41bbe4248b2770fb1a90f34b2518f6fa.tar.bz2 android_dalvik-ce87bfed41bbe4248b2770fb1a90f34b2518f6fa.zip |
Delegate the queuing of cleared references to managed code.
Previously, the garbage collector would pass each cleared reference to
the heap worker thread for queuing. The heap worker thread would then
perform a callback into managed code for each cleared reference which
assigned the reference to its reference queue.
With this change, the garbage collector instead links together all of
the cleared references and calls back into managed code exactly once
to hand off the references for processing. This change makes the heap
worker thread and its data structures obsolete.
Change-Id: I28e02638f0877a7fd2ac96b9c3f5597a38541ebb
Diffstat (limited to 'vm/Thread.c')
-rw-r--r-- | vm/Thread.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vm/Thread.c b/vm/Thread.c index cdf49bc2d..087c2e0d3 100644 --- a/vm/Thread.c +++ b/vm/Thread.c @@ -3467,13 +3467,11 @@ void dvmDumpAllThreadsEx(const DebugOutputTarget* target, bool grabLock) #ifdef HAVE_ANDROID_OS dvmPrintDebugMessage(target, - "(mutexes: tll=%x tsl=%x tscl=%x ghl=%x hwl=%x hwll=%x)\n", + "(mutexes: tll=%x tsl=%x tscl=%x ghl=%x)\n", gDvm.threadListLock.value, gDvm._threadSuspendLock.value, gDvm.threadSuspendCountLock.value, - gDvm.gcHeapLock.value, - gDvm.heapWorkerLock.value, - gDvm.heapWorkerListLock.value); + gDvm.gcHeapLock.value); #endif if (grabLock) |