aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/CompilerCodegen.h
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2011-01-19 14:48:52 -0800
committerAndy McFadden <fadden@android.com>2011-01-19 14:48:52 -0800
commit58aa611bb6f45eab669644b97e77165eb417458a (patch)
treedd021e733b27ed780d934acc2467412f45393138 /vm/compiler/codegen/CompilerCodegen.h
parentb2e15681cb52079d8e63a68a611036911b94d1fe (diff)
Change suspend order in GC
The GC currently does this: 1. acquire heapLock 2. suspend all threads 3. acquire heapWorkerLock When the HeapWorker thread is suspended in #2, it might be holding the lock we want in step #3, leading to VM deadlock. This change reverses the order of #2 and #3, which should allow the HeapWorker thread to progress to a point where it releases the lock before the GC requests the suspension. If futexes are being unfair, the GC might have to wait a bit longer while the HeapWorker does stuff (it might unlock, do work, and re-lock without the scheduler giving time to the GC thread; with the old scheme the HeapWorker would see the pending thread suspension immediately and stop). A better fix is planned. Bug 3340837 Change-Id: Ib9b37c130903a2800f8f28ae61540a428dbfc5be
Diffstat (limited to 'vm/compiler/codegen/CompilerCodegen.h')
0 files changed, 0 insertions, 0 deletions