summaryrefslogtreecommitdiff
path: root/runtime/native/java_lang_String.cc
diff options
context:
space:
mode:
author Sebastien Hertz <shertz@google.com> 2014-02-19 18:00:17 +0100
committer Sebastien Hertz <shertz@google.com> 2014-02-20 15:23:01 +0100
commit11d40c250ec86c784cf76b8c31e1cf9285d555dc (patch)
treea0c03a28963cf6683b3832cf4548b4bf8961b912 /runtime/native/java_lang_String.cc
parent3188d117d6f1ba5f3a30d0ff231d816ebb59a7f7 (diff)
Fix deoptimization deadlock
Fixes a deadlock occuring during undeoptimization on debugging session end. Before disconnecting debugger, we must unregister all requested events. We take the event list lock to browse all these events. Some of them (as METHOD_EXIT) may have activated deoptimization so we need to undeoptimize. During this process, we restore all original entrypoints of every method in the stack and notify method exit events to the instrumentation listener (see method InstrumentationLister::MethodExited). In our case, the instrumentation listener is the debugger. It takes the event list lock (to browse the event list and see if this event must be posted) but hangs waiting for it. Since it's already holding the event list lock (which is not recursive), it ends up in a deadlock situation. This CL fixes the way we prevent from posting method enter/exit events during the process of deoptimization/undeoptimization. We now explicitly set a flag indicating if deoptimization is enabled (by the debugger). Also removes unused field in InstallStackVisitor class and remove debugger as listener before disabling deoptimization to ensure it does not receive any event when disconnecting. Change-Id: I49a2ae43e86cf29094f4b462bfa754d7740d3e97
Diffstat (limited to 'runtime/native/java_lang_String.cc')
0 files changed, 0 insertions, 0 deletions