src/share/vm/runtime/objectMonitor.cpp

changeset 8887
b55756ea22d8
parent 8729
402618d5afc9
child 9041
95a08233f46c
child 9858
b985cbb00e68
equal deleted inserted replaced
8886:fbb8f75498f4 8887:b55756ea22d8
379 EventJavaMonitorEnter event; 379 EventJavaMonitorEnter event;
380 380
381 { // Change java thread status to indicate blocked on monitor enter. 381 { // Change java thread status to indicate blocked on monitor enter.
382 JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this); 382 JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this);
383 383
384 Self->set_current_pending_monitor(this);
385
384 DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt); 386 DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt);
385 if (JvmtiExport::should_post_monitor_contended_enter()) { 387 if (JvmtiExport::should_post_monitor_contended_enter()) {
386 JvmtiExport::post_monitor_contended_enter(jt, this); 388 JvmtiExport::post_monitor_contended_enter(jt, this);
387 389
388 // The current thread does not yet own the monitor and does not 390 // The current thread does not yet own the monitor and does not
392 // ParkEvent associated with this ObjectMonitor. 394 // ParkEvent associated with this ObjectMonitor.
393 } 395 }
394 396
395 OSThreadContendState osts(Self->osthread()); 397 OSThreadContendState osts(Self->osthread());
396 ThreadBlockInVM tbivm(jt); 398 ThreadBlockInVM tbivm(jt);
397
398 Self->set_current_pending_monitor(this);
399 399
400 // TODO-FIXME: change the following for(;;) loop to straight-line code. 400 // TODO-FIXME: change the following for(;;) loop to straight-line code.
401 for (;;) { 401 for (;;) {
402 jt->set_suspend_equivalent(); 402 jt->set_suspend_equivalent();
403 // cleared by handle_special_suspend_equivalent_condition() 403 // cleared by handle_special_suspend_equivalent_condition()

mercurial