Skip to content

Commit

Permalink
8278479: RunThese test failure with +UseHeavyMonitors and +VerifyHeav…
Browse files Browse the repository at this point in the history
…yMonitors

Reviewed-by: kvn, dcubed, dlong
  • Loading branch information
coleenp committed Jul 6, 2022
1 parent cbaf6e8 commit 83a5d59
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2558,6 +2558,10 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register hdr = op->hdr_opr()->as_register();
Register lock = op->lock_opr()->as_register();
if (UseHeavyMonitors) {
if (op->info() != NULL) {
add_debug_info_for_null_check_here(op->info());
__ null_check(obj, -1);
}
__ b(*op->stub()->entry());
} else if (op->code() == lir_lock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2432,6 +2432,10 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register lock = op->lock_opr()->as_pointer_register();

if (UseHeavyMonitors) {
if (op->info() != NULL) {
add_debug_info_for_null_check_here(op->info());
__ null_check(obj);
}
__ b(*op->stub()->entry());
} else if (op->code() == lir_lock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2697,6 +2697,10 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
// simpler and requires less duplicated code - additionally, the
// slow locking code is the same in either case which simplifies
// debugging.
if (op->info() != NULL) {
add_debug_info_for_null_check_here(op->info());
__ null_check(obj);
}
__ b(*op->stub()->entry());
}
} else {
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,10 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register hdr = op->hdr_opr()->as_register();
Register lock = op->lock_opr()->as_register();
if (UseHeavyMonitors) {
if (op->info() != NULL) {
add_debug_info_for_null_check_here(op->info());
__ null_check(obj);
}
__ j(*op->stub()->entry());
} else if (op->code() == lir_lock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2721,6 +2721,10 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register hdr = op->hdr_opr()->as_register();
Register lock = op->lock_opr()->as_register();
if (UseHeavyMonitors) {
if (op->info() != NULL) {
add_debug_info_for_null_check_here(op->info());
__ null_check(obj);
}
__ branch_optimized(Assembler::bcondAlways, *op->stub()->entry());
} else if (op->code() == lir_lock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3495,6 +3495,10 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register hdr = op->hdr_opr()->as_register();
Register lock = op->lock_opr()->as_register();
if (UseHeavyMonitors) {
if (op->info() != NULL) {
add_debug_info_for_null_check_here(op->info());
__ null_check(obj);
}
__ jmp(*op->stub()->entry());
} else if (op->code() == lir_lock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
Expand Down

1 comment on commit 83a5d59

@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.