summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2015-01-09 18:44:05 +0100
committerSebastien Hertz <shertz@google.com>2015-02-06 17:46:58 +0100
commit2bf93f48bbb417b358c9e3c77911ea6ec7307c15 (patch)
tree4a3cbadecf70b370423418d80bd738fc326aa846 /compiler/optimizing/graph_visualizer.cc
parentb991d334e294cb9fb75bd1c36e2435171c084cd1 (diff)
JDWP: update thread synchronization
This CL ensures only one thread can do JDWP stuff at a time: either processing a command coming from the debugger (JDWP thread) or sending an event (breakpoint, class prepare, etc) to the debugger before suspending. The JDWP thread now uses AcquireJdwpTokenForCommand and ReleaseJdwpTokenForCommand, respectively acquiring and releasing the token used for synchronization. On the other hand, the event threads now use AcquireJdwpTokenForEvent and ReleaseJdwpTokenForEvent. During an invoke, the target thread needs to take the JDWP token to execute the method while it's already held by the JDWP handler thread waiting for the invocation to complete. To avoid both threads from waiting for each other (deadlock), the JDWP thread releases the token and acquires it again after the invocation is complete, so the target thread can run safely and prevents other threads from sending events. Bug: 19120467 Change-Id: Ie3208fb940a60573769d494128cf22f0fa30fa61
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions