hotspot/src/share/vm/runtime/objectMonitor.cpp
changeset 46765 07298ebd9367
parent 46630 75aa3e39d02c
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp	Mon Aug 07 13:52:05 2017 -0400
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp	Mon Aug 07 12:34:21 2017 -0700
@@ -307,6 +307,8 @@
   { // Change java thread status to indicate blocked on monitor enter.
     JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this);
 
+    Self->set_current_pending_monitor(this);
+
     DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt);
     if (JvmtiExport::should_post_monitor_contended_enter()) {
       JvmtiExport::post_monitor_contended_enter(jt, this);
@@ -321,8 +323,6 @@
     OSThreadContendState osts(Self->osthread());
     ThreadBlockInVM tbivm(jt);
 
-    Self->set_current_pending_monitor(this);
-
     // TODO-FIXME: change the following for(;;) loop to straight-line code.
     for (;;) {
       jt->set_suspend_equivalent();