1.1 --- a/src/share/vm/runtime/objectMonitor.cpp Fri Aug 11 03:30:28 2017 -0400 1.2 +++ b/src/share/vm/runtime/objectMonitor.cpp Fri Aug 11 23:51:07 2017 -0400 1.3 @@ -381,6 +381,8 @@ 1.4 { // Change java thread status to indicate blocked on monitor enter. 1.5 JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this); 1.6 1.7 + Self->set_current_pending_monitor(this); 1.8 + 1.9 DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt); 1.10 if (JvmtiExport::should_post_monitor_contended_enter()) { 1.11 JvmtiExport::post_monitor_contended_enter(jt, this); 1.12 @@ -395,8 +397,6 @@ 1.13 OSThreadContendState osts(Self->osthread()); 1.14 ThreadBlockInVM tbivm(jt); 1.15 1.16 - Self->set_current_pending_monitor(this); 1.17 - 1.18 // TODO-FIXME: change the following for(;;) loop to straight-line code. 1.19 for (;;) { 1.20 jt->set_suspend_equivalent();