< prev index next >

src/hotspot/share/interpreter/interpreterRuntime.cpp

Print this page
@@ -729,15 +729,16 @@
    current->last_frame().interpreter_frame_verify_monitor(elem);
  #endif
    Handle h_obj(current, elem->obj());
    assert(Universe::heap()->is_in_or_null(h_obj()),
           "must be null or an object");
+   ThreadOnMonitorEnter tme(current);
    ObjectSynchronizer::enter(h_obj, elem->lock(), current);
    assert(Universe::heap()->is_in_or_null(elem->obj()),
           "must be null or an object");
  #ifdef ASSERT
-   current->last_frame().interpreter_frame_verify_monitor(elem);
+   if (!current->preempting()) current->last_frame().interpreter_frame_verify_monitor(elem);
  #endif
  JRT_END
  
  JRT_LEAF(void, InterpreterRuntime::monitorexit(BasicObjectLock* elem))
    oop obj = elem->obj();
< prev index next >