summaryrefslogtreecommitdiff
path: root/compiler/optimizing/execution_subgraph.cc
diff options
context:
space:
mode:
authorLokesh Gidra <lokeshgidra@google.com>2021-08-17 15:55:40 -0700
committerNicolas Geoffray <ngeoffray@google.com>2021-09-04 13:18:32 +0000
commit8992f92aab381f0dc85cfd4003d935263f8451c8 (patch)
tree45eaf450516b47abfbcff12ed8b93ebd7e3dded3 /compiler/optimizing/execution_subgraph.cc
parentd4da905ba12bfcd9b967a47583f875bbcafeeda2 (diff)
Replace weak-ref access disable checkpoint with STW pause
Disabling weak-ref access in ConcurrentCopying collector can lead to deadlocks. For instance, if mutator M1 acquires W1 mutex and then participates in the checkpoint and then gets blocked in getReferent(), waiting for the gc-thread to finish reference processing. Mutator M2 waits for M1 to release W1 so that it can acquire the mutex before participating in the checkpoint. On the other hand, GC-thread waits for M2 to finish checkpoint. A STW pause avoids the deadlock by ensuring that mutators are not blocked on weak-ref access before the pause, and GC-thread can make progress after the pause in reference processing. Bug: 195336624 Bug: 195261575 Test: art/test/testrunner/testrunner.py Merged-In: I03d6bcd4d53f37ec84064edd8292951d30f48eaf Change-Id: I03d6bcd4d53f37ec84064edd8292951d30f48eaf (cherry picked from commit 555eefef9a27995ef341cdf44ed60c61953e2e3f) (cherry picked from commit 16f1ef2d09e82d419a2a51ac3d7f7fb7e9553dd1)
Diffstat (limited to 'compiler/optimizing/execution_subgraph.cc')
0 files changed, 0 insertions, 0 deletions