Skip to content

Commit

Permalink
8316179: Use consistent naming for lightweight locking in MacroAssembler
Browse files Browse the repository at this point in the history
Backport-of: 639ba13c4b0ada1c2ae0a46e99ed707c219b3e53
  • Loading branch information
shipilev committed Oct 10, 2023
1 parent 7e1755d commit cbde98c
Show file tree
Hide file tree
Showing 29 changed files with 78 additions and 78 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -3868,7 +3868,7 @@ encode %{
__ b(cont);
} else {
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
__ fast_lock(oop, disp_hdr, tmp, rscratch1, no_count);
__ lightweight_lock(oop, disp_hdr, tmp, rscratch1, no_count);
__ b(count);
}

Expand Down Expand Up @@ -3949,7 +3949,7 @@ encode %{
__ b(cont);
} else {
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
__ fast_unlock(oop, tmp, box, disp_hdr, no_count);
__ lightweight_unlock(oop, tmp, box, disp_hdr, no_count);
__ b(count);
}

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
// Load object header
ldr(hdr, Address(obj, hdr_offset));
if (LockingMode == LM_LIGHTWEIGHT) {
fast_lock(obj, hdr, rscratch1, rscratch2, slow_case);
lightweight_lock(obj, hdr, rscratch1, rscratch2, slow_case);
} else if (LockingMode == LM_LEGACY) {
Label done;
// and mark it as unlocked
Expand Down Expand Up @@ -149,7 +149,7 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
// be encoded.
tst(hdr, markWord::monitor_value);
br(Assembler::NE, slow_case);
fast_unlock(obj, hdr, rscratch1, rscratch2, slow_case);
lightweight_unlock(obj, hdr, rscratch1, rscratch2, slow_case);
} else if (LockingMode == LM_LEGACY) {
// test if object header is pointing to the displaced header, and if so, restore
// the displaced header in the object - if the object header is not pointing to
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)

if (LockingMode == LM_LIGHTWEIGHT) {
ldr(tmp, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
fast_lock(obj_reg, tmp, rscratch1, rscratch2, slow_case);
lightweight_lock(obj_reg, tmp, rscratch1, rscratch2, slow_case);
b(count);
} else if (LockingMode == LM_LEGACY) {
// Load (object->mark() | 1) into swap_reg
Expand Down Expand Up @@ -891,7 +891,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)

ldr(header_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
tbnz(header_reg, exact_log2(markWord::monitor_value), slow_case);
fast_unlock(obj_reg, header_reg, swap_reg, rscratch1, slow_case);
lightweight_unlock(obj_reg, header_reg, swap_reg, rscratch1, slow_case);
b(count);
bind(slow_case);
} else if (LockingMode == LM_LEGACY) {
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6212,14 +6212,14 @@ void MacroAssembler::double_move(VMRegPair src, VMRegPair dst, Register tmp) {
}
}

// Implements fast-locking.
// Implements lightweight-locking.
// Branches to slow upon failure to lock the object, with ZF cleared.
// Falls through upon success with ZF set.
//
// - obj: the object to be locked
// - hdr: the header, already loaded from obj, will be destroyed
// - t1, t2: temporary registers, will be destroyed
void MacroAssembler::fast_lock(Register obj, Register hdr, Register t1, Register t2, Label& slow) {
void MacroAssembler::lightweight_lock(Register obj, Register hdr, Register t1, Register t2, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
assert_different_registers(obj, hdr, t1, t2);

Expand All @@ -6244,14 +6244,14 @@ void MacroAssembler::fast_lock(Register obj, Register hdr, Register t1, Register
strw(t1, Address(rthread, JavaThread::lock_stack_top_offset()));
}

// Implements fast-unlocking.
// Implements lightweight-unlocking.
// Branches to slow upon failure, with ZF cleared.
// Falls through upon success, with ZF set.
//
// - obj: the object to be unlocked
// - hdr: the (pre-loaded) header of the object
// - t1, t2: temporary registers
void MacroAssembler::fast_unlock(Register obj, Register hdr, Register t1, Register t2, Label& slow) {
void MacroAssembler::lightweight_unlock(Register obj, Register hdr, Register t1, Register t2, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
assert_different_registers(obj, hdr, t1, t2);

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1582,8 +1582,8 @@ class MacroAssembler: public Assembler {
// Code for java.lang.Thread::onSpinWait() intrinsic.
void spin_wait();

void fast_lock(Register obj, Register hdr, Register t1, Register t2, Label& slow);
void fast_unlock(Register obj, Register hdr, Register t1, Register t2, Label& slow);
void lightweight_lock(Register obj, Register hdr, Register t1, Register t2, Label& slow);
void lightweight_unlock(Register obj, Register hdr, Register t1, Register t2, Label& slow);

private:
// Check the current thread doesn't need a cross modify fence.
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
} else {
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
__ ldr(swap_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
__ fast_lock(obj_reg, swap_reg, tmp, rscratch1, slow_path_lock);
__ lightweight_lock(obj_reg, swap_reg, tmp, rscratch1, slow_path_lock);
}
__ bind(count);
__ increment(Address(rthread, JavaThread::held_monitor_count_offset()));
Expand Down Expand Up @@ -1953,7 +1953,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
assert(LockingMode == LM_LIGHTWEIGHT, "");
__ ldr(old_hdr, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
__ tbnz(old_hdr, exact_log2(markWord::monitor_value), slow_path_unlock);
__ fast_unlock(obj_reg, old_hdr, swap_reg, rscratch1, slow_path_unlock);
__ lightweight_unlock(obj_reg, old_hdr, swap_reg, rscratch1, slow_path_unlock);
__ decrement(Address(rthread, JavaThread::held_monitor_count_offset()));
}

Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
Register t2 = hdr; // blow
Register t3 = Rtemp; // blow

fast_lock_2(obj /* obj */, t1, t2, t3, 1 /* savemask - save t1 */, slow_case);
lightweight_lock(obj /* obj */, t1, t2, t3, 1 /* savemask - save t1 */, slow_case);
// Success: fall through

} else if (LockingMode == LM_LEGACY) {
Expand Down Expand Up @@ -282,8 +282,8 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
Register t2 = hdr; // blow
Register t3 = Rtemp; // blow

fast_unlock_2(obj /* object */, t1, t2, t3, 1 /* savemask (save t1) */,
slow_case);
lightweight_unlock(obj /* object */, t1, t2, t3, 1 /* savemask (save t1) */,
slow_case);
// Success: Fall through

} else if (LockingMode == LM_LEGACY) {
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/arm/c2_MacroAssembler_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ void C2_MacroAssembler::fast_lock(Register Roop, Register Rbox, Register Rscratc

if (LockingMode == LM_LIGHTWEIGHT) {

fast_lock_2(Roop /* obj */, Rbox /* t1 */, Rscratch /* t2 */, Rscratch2 /* t3 */,
1 /* savemask (save t1) */, done);
lightweight_lock(Roop /* obj */, Rbox /* t1 */, Rscratch /* t2 */, Rscratch2 /* t3 */,
1 /* savemask (save t1) */, done);

// Success: set Z
cmp(Roop, Roop);
Expand Down Expand Up @@ -143,8 +143,8 @@ void C2_MacroAssembler::fast_unlock(Register Roop, Register Rbox, Register Rscra

if (LockingMode == LM_LIGHTWEIGHT) {

fast_unlock_2(Roop /* obj */, Rbox /* t1 */, Rscratch /* t2 */, Rscratch2 /* t3 */,
1 /* savemask (save t1) */, done);
lightweight_unlock(Roop /* obj */, Rbox /* t1 */, Rscratch /* t2 */, Rscratch2 /* t3 */,
1 /* savemask (save t1) */, done);

cmp(Roop, Roop); // Success: Set Z
// Fall through
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/cpu/arm/interp_masm_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ void InterpreterMacroAssembler::lock_object(Register Rlock) {
}

if (LockingMode == LM_LIGHTWEIGHT) {
fast_lock_2(Robj, R0 /* t1 */, Rmark /* t2 */, Rtemp /* t3 */, 0 /* savemask */, slow_case);
lightweight_lock(Robj, R0 /* t1 */, Rmark /* t2 */, Rtemp /* t3 */, 0 /* savemask */, slow_case);
b(done);
} else if (LockingMode == LM_LEGACY) {
// On MP platforms the next load could return a 'stale' value if the memory location has been modified by another thread.
Expand Down Expand Up @@ -1033,8 +1033,8 @@ void InterpreterMacroAssembler::unlock_object(Register Rlock) {
cmpoop(Rtemp, Robj);
b(slow_case, ne);

fast_unlock_2(Robj /* obj */, Rlock /* t1 */, Rmark /* t2 */, Rtemp /* t3 */,
1 /* savemask (save t1) */, slow_case);
lightweight_unlock(Robj /* obj */, Rlock /* t1 */, Rmark /* t2 */, Rtemp /* t3 */,
1 /* savemask (save t1) */, slow_case);

b(done);

Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/arm/macroAssembler_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1748,14 +1748,14 @@ void MacroAssembler::read_polling_page(Register dest, relocInfo::relocType rtype
POISON_REG(mask, 1, R2, poison) \
POISON_REG(mask, 2, R3, poison)

// Attempt to fast-lock an object
// Attempt to lightweight-lock an object
// Registers:
// - obj: the object to be locked
// - t1, t2, t3: temp registers. If corresponding bit in savemask is set, they get saved, otherwise blown.
// Result:
// - Success: fallthrough
// - Error: break to slow, Z cleared.
void MacroAssembler::fast_lock_2(Register obj, Register t1, Register t2, Register t3, unsigned savemask, Label& slow) {
void MacroAssembler::lightweight_lock(Register obj, Register t1, Register t2, Register t3, unsigned savemask, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
assert_different_registers(obj, t1, t2, t3);

Expand Down Expand Up @@ -1806,14 +1806,14 @@ void MacroAssembler::fast_lock_2(Register obj, Register t1, Register t2, Registe
// Success: fall through
}

// Attempt to fast-unlock an object
// Attempt to lightweight-unlock an object
// Registers:
// - obj: the object to be unlocked
// - t1, t2, t3: temp registers. If corresponding bit in savemask is set, they get saved, otherwise blown.
// Result:
// - Success: fallthrough
// - Error: break to slow, Z cleared.
void MacroAssembler::fast_unlock_2(Register obj, Register t1, Register t2, Register t3, unsigned savemask, Label& slow) {
void MacroAssembler::lightweight_unlock(Register obj, Register t1, Register t2, Register t3, unsigned savemask, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
assert_different_registers(obj, t1, t2, t3);

Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/arm/macroAssembler_arm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,23 +1009,23 @@ class MacroAssembler: public Assembler {
void cas_for_lock_acquire(Register oldval, Register newval, Register base, Register tmp, Label &slow_case, bool allow_fallthrough_on_failure = false, bool one_shot = false);
void cas_for_lock_release(Register oldval, Register newval, Register base, Register tmp, Label &slow_case, bool allow_fallthrough_on_failure = false, bool one_shot = false);

// Attempt to fast-lock an object
// Attempt to lightweight-lock an object
// Registers:
// - obj: the object to be locked
// - t1, t2, t3: temp registers. If corresponding bit in savemask is set, they get saved, otherwise blown.
// Result:
// - Success: fallthrough
// - Error: break to slow, Z cleared.
void fast_lock_2(Register obj, Register t1, Register t2, Register t3, unsigned savemask, Label& slow);
void lightweight_lock(Register obj, Register t1, Register t2, Register t3, unsigned savemask, Label& slow);

// Attempt to fast-unlock an object
// Attempt to lightweight-unlock an object
// Registers:
// - obj: the object to be unlocked
// - t1, t2, t3: temp registers. If corresponding bit in savemask is set, they get saved, otherwise blown.
// Result:
// - Success: fallthrough
// - Error: break to slow, Z cleared.
void fast_unlock_2(Register obj, Register t1, Register t2, Register t3, unsigned savemask, Label& slow);
void lightweight_unlock(Register obj, Register t1, Register t2, Register t3, unsigned savemask, Label& slow);

#ifndef PRODUCT
// Preserves flags and all registers.
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/arm/sharedRuntime_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,8 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,

if (LockingMode == LM_LIGHTWEIGHT) {
log_trace(fastlock)("SharedRuntime lock fast");
__ fast_lock_2(sync_obj /* object */, disp_hdr /* t1 */, tmp /* t2 */, Rtemp /* t3 */,
0x7 /* savemask */, slow_lock);
__ lightweight_lock(sync_obj /* object */, disp_hdr /* t1 */, tmp /* t2 */, Rtemp /* t3 */,
0x7 /* savemask */, slow_lock);
// Fall through to lock_done
} else if (LockingMode == LM_LEGACY) {
const Register mark = tmp;
Expand Down Expand Up @@ -1242,8 +1242,8 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
if (method->is_synchronized()) {
if (LockingMode == LM_LIGHTWEIGHT) {
log_trace(fastlock)("SharedRuntime unlock fast");
__ fast_unlock_2(sync_obj, R2 /* t1 */, tmp /* t2 */, Rtemp /* t3 */,
7 /* savemask */, slow_unlock);
__ lightweight_unlock(sync_obj, R2 /* t1 */, tmp /* t2 */, Rtemp /* t3 */,
7 /* savemask */, slow_unlock);
// Fall through
} else if (LockingMode == LM_LEGACY) {
// See C1_MacroAssembler::unlock_object() for more comments
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox
}

if (LockingMode == LM_LIGHTWEIGHT) {
fast_lock(Roop, Rmark, Rscratch, slow_int);
lightweight_lock(Roop, Rmark, Rscratch, slow_int);
} else if (LockingMode == LM_LEGACY) {
// ... and mark it unlocked.
ori(Rmark, Rmark, markWord::unlocked_value);
Expand Down Expand Up @@ -181,7 +181,7 @@ void C1_MacroAssembler::unlock_object(Register Rmark, Register Roop, Register Rb
ld(Rmark, oopDesc::mark_offset_in_bytes(), Roop);
andi_(R0, Rmark, markWord::monitor_value);
bne(CCR0, slow_int);
fast_unlock(Roop, Rmark, slow_int);
lightweight_unlock(Roop, Rmark, slow_int);
} else if (LockingMode == LM_LEGACY) {
// Check if it is still a light weight lock, this is is true if we see
// the stack address of the basicLock in the markWord of the object.
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
}

if (LockingMode == LM_LIGHTWEIGHT) {
fast_lock(object, /* mark word */ header, tmp, slow_case);
lightweight_lock(object, /* mark word */ header, tmp, slow_case);
b(count_locking);
} else if (LockingMode == LM_LEGACY) {

Expand Down Expand Up @@ -1111,7 +1111,7 @@ void InterpreterMacroAssembler::unlock_object(Register monitor) {
ld(header, oopDesc::mark_offset_in_bytes(), object);
andi_(R0, header, markWord::monitor_value);
bne(CCR0, slow_case);
fast_unlock(object, header, slow_case);
lightweight_unlock(object, header, slow_case);
} else {
addi(object_mark_addr, object, oopDesc::mark_offset_in_bytes());

Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2707,7 +2707,7 @@ void MacroAssembler::compiler_fast_lock_object(ConditionRegister flag, Register
b(failure);
} else {
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
fast_lock(oop, displaced_header, temp, failure);
lightweight_lock(oop, displaced_header, temp, failure);
b(success);
}

Expand Down Expand Up @@ -2819,7 +2819,7 @@ void MacroAssembler::compiler_fast_unlock_object(ConditionRegister flag, Registe
b(success);
} else {
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
fast_unlock(oop, current_header, failure);
lightweight_unlock(oop, current_header, failure);
b(success);
}

Expand Down Expand Up @@ -4491,14 +4491,14 @@ void MacroAssembler::atomically_flip_locked_state(bool is_unlock, Register obj,
}
}

// Implements fast-locking.
// Implements lightweight-locking.
// Branches to slow upon failure to lock the object, with CCR0 NE.
// Falls through upon success with CCR0 EQ.
//
// - obj: the object to be locked
// - hdr: the header, already loaded from obj, will be destroyed
// - t1: temporary register
void MacroAssembler::fast_lock(Register obj, Register hdr, Register t1, Label& slow) {
void MacroAssembler::lightweight_lock(Register obj, Register hdr, Register t1, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
assert_different_registers(obj, hdr, t1);

Expand All @@ -4524,13 +4524,13 @@ void MacroAssembler::fast_lock(Register obj, Register hdr, Register t1, Label& s
stw(t1, in_bytes(JavaThread::lock_stack_top_offset()), R16_thread);
}

// Implements fast-unlocking.
// Implements lightweight-unlocking.
// Branches to slow upon failure, with CCR0 NE.
// Falls through upon success, with CCR0 EQ.
//
// - obj: the object to be unlocked
// - hdr: the (pre-loaded) header of the object, will be destroyed
void MacroAssembler::fast_unlock(Register obj, Register hdr, Label& slow) {
void MacroAssembler::lightweight_unlock(Register obj, Register hdr, Label& slow) {
assert(LockingMode == LM_LIGHTWEIGHT, "only used with new lightweight locking");
assert_different_registers(obj, hdr);

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,8 @@ class MacroAssembler: public Assembler {
void inc_held_monitor_count(Register tmp);
void dec_held_monitor_count(Register tmp);
void atomically_flip_locked_state(bool is_unlock, Register obj, Register tmp, Label& failed, int semantics);
void fast_lock(Register obj, Register hdr, Register t1, Label& slow);
void fast_unlock(Register obj, Register hdr, Label& slow);
void lightweight_lock(Register obj, Register hdr, Register t1, Label& slow);
void lightweight_unlock(Register obj, Register hdr, Label& slow);

// allocation (for C1)
void tlab_allocate(
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
ld(hdr, Address(obj, hdr_offset));

if (LockingMode == LM_LIGHTWEIGHT) {
fast_lock(obj, hdr, t0, t1, slow_case);
lightweight_lock(obj, hdr, t0, t1, slow_case);
} else if (LockingMode == LM_LEGACY) {
Label done;
// and mark it as unlocked
Expand Down Expand Up @@ -137,7 +137,7 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
ld(hdr, Address(obj, oopDesc::mark_offset_in_bytes()));
test_bit(t0, hdr, exact_log2(markWord::monitor_value));
bnez(t0, slow_case, /* is_far */ true);
fast_unlock(obj, hdr, t0, t1, slow_case);
lightweight_unlock(obj, hdr, t0, t1, slow_case);
} else if (LockingMode == LM_LEGACY) {
// test if object header is pointing to the displaced header, and if so, restore
// the displaced header in the object - if the object header is not pointing to
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/riscv/interp_masm_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)

if (LockingMode == LM_LIGHTWEIGHT) {
ld(tmp, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
fast_lock(obj_reg, tmp, t0, t1, slow_case);
lightweight_lock(obj_reg, tmp, t0, t1, slow_case);
j(count);
} else if (LockingMode == LM_LEGACY) {
// Load (object->mark() | 1) into swap_reg
Expand Down Expand Up @@ -942,7 +942,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
ld(header_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
test_bit(t0, header_reg, exact_log2(markWord::monitor_value));
bnez(t0, slow_case);
fast_unlock(obj_reg, header_reg, swap_reg, t0, slow_case);
lightweight_unlock(obj_reg, header_reg, swap_reg, t0, slow_case);
j(count);

bind(slow_case);
Expand Down

1 comment on commit cbde98c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.