summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2016-02-19 15:44:06 -0800
committerHiroshi Yamauchi <yamauchi@google.com>2016-02-22 11:41:18 -0800
commit20a0be0299183b54be9643820294e011d3358823 (patch)
treeb5f13c1362dc146675792d438ec7528a39c286a4 /compiler/optimizing/graph_visualizer.cc
parenteeb3b0bf5339e24b6f5e22c5a884910000c9bcfb (diff)
Fix CC collector thread flip and JNI critical section deadlocks.
There's a bug in the synchronization between the CC collector's thread flip and JNI critical sections where it incorrectly attempts to make the synchronization scheme to be writer (GC) preference to avoid starvation of GC in the presence of frequent JNI critical section enter/exit. This could cause a deadlock between them if a thread enters a nested JNI critical section after a thread flip occurs. This is reproduced in the added test. The fix is to use a thread local disable counter in addition to the global counter to detect a nested enter by the same thread and avoid waiting if nested. Bug: 19235243 Bug: 12687968 Change-Id: Idf7720a6906c9ea508219935af3727f76680d2d8
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions