aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/CodegenDriver.c
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2010-08-06 15:17:46 -0700
committerCarl Shapiro <cshapiro@google.com>2010-08-09 16:13:20 -0700
commitd012d06b0673c3da9d23b1816ff5a325576eb9b3 (patch)
treef4ff7e4396fff38a87710488d3a910c506de83cc /vm/compiler/codegen/arm/CodegenDriver.c
parent34bfe020eccbe4034322c5952012612b0540acb3 (diff)
Fix the ordering of lock acquisition in the heap worker.
A feature of the concurrent GC is that gcHeapLock is released while roots are traced through. This complicates the heap worker thread as it assumes that when the gcHeapLock can be acquired no threads are contending for the heapWorkerLock. However, the concurrent GC holds heapWorkerLock for the duration of a GC. If the heap worker thread becomes active while the GC temporarily release gcHeapLock it may deadlock the GC by acquring the gcHeapLock, needed by the GC during its final pause, and wait for the heapWorkerLock held by the GC. This change attempts to resolve this issue by checking to see if after a transition into running whether the GC has become active. If so, it releases gcHeapLock and reacquires it after the GC has signaled completion. This must be done in a loop as there is no guarantee that the GC has not become active when heap worker is rescheduled.
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenDriver.c')
0 files changed, 0 insertions, 0 deletions