Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/hotspot/cpu/zero/zeroInterpreter_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,13 @@ int ZeroInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
monitor = (BasicObjectLock*) istate->stack_base();
oop lockee = monitor->obj();
markWord disp = lockee->mark().set_unlocked();

monitor->lock()->set_displaced_header(disp);
if (lockee->cas_set_mark(markWord::from_pointer(monitor), disp) != disp) {
if (thread->is_lock_owned((address) disp.clear_lock_bits().to_pointer())) {
bool call_vm = UseHeavyMonitors;
if (call_vm || lockee->cas_set_mark(markWord::from_pointer(monitor), disp) != disp) {
// Is it simple recursive case?
if (!call_vm && thread->is_lock_owned((address) disp.clear_lock_bits().to_pointer())) {
monitor->lock()->set_displaced_header(markWord::from_pointer(NULL));
}
else {
} else {
CALL_VM_NOCHECK(InterpreterRuntime::monitorenter(thread, monitor));
if (HAS_PENDING_EXCEPTION)
goto unwind_and_return;
Expand Down