Skip to content

Commit

Permalink
review: restored the set_current_pending_monitor(this) position
Browse files Browse the repository at this point in the history
  • Loading branch information
sspitsyn committed Jan 16, 2025
1 parent bb3054f commit 369c39b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/runtime/objectMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ void ObjectMonitor::enter_with_contention_mark(JavaThread *current, ObjectMonito

freeze_result result;

assert(current->current_pending_monitor() == nullptr, "invariant");
current->set_current_pending_monitor(this);

DTRACE_MONITOR_PROBE(contended__enter, this, object(), current);
if (JvmtiExport::should_post_monitor_contended_enter()) {
JvmtiExport::post_monitor_contended_enter(current, this);
Expand Down Expand Up @@ -531,9 +534,6 @@ void ObjectMonitor::enter_with_contention_mark(JavaThread *current, ObjectMonito
// Change java thread status to indicate blocked on monitor enter.
JavaThreadBlockedOnMonitorEnterState jtbmes(current, this);

assert(current->current_pending_monitor() == nullptr, "invariant");
current->set_current_pending_monitor(this);

OSThreadContendState osts(current->osthread());

assert(current->thread_state() == _thread_in_vm, "invariant");
Expand Down

0 comments on commit 369c39b

Please sign in to comment.