Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo
__ ldr(rscratch2, thread_disarmed_and_epoch_addr);
__ cmp(rscratch1, rscratch2);
} else {
assert(patching_type == NMethodPatchingType::conc_data_patch, "must be");
// Subsequent loads of oops must occur after load of guard value.
// BarrierSetNMethod::disarm sets guard with release semantics.
__ membar(__ LoadLoad);
Address thread_disarmed_addr(rthread, in_bytes(bs_nm->thread_disarmed_guard_value_offset()));
__ ldrw(rscratch2, thread_disarmed_addr);
__ cmpw(rscratch1, rscratch2);
ShouldNotReachHere();
}
__ br(condition, barrier_target);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ class Node;

enum class NMethodPatchingType {
stw_instruction_and_data_patch,
conc_instruction_and_data_patch,
conc_data_patch
conc_instruction_and_data_patch
};

class BarrierSetAssembler: public CHeapObj<mtGC> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ static int entry_barrier_offset(nmethod* nm) {
return -4 * (4 + slow_path_size(nm));
case NMethodPatchingType::conc_instruction_and_data_patch:
return -4 * (10 + slow_path_size(nm));
case NMethodPatchingType::conc_data_patch:
return -4 * (5 + slow_path_size(nm));
}
ShouldNotReachHere();
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {
Register scratch, RegSet saved_regs);

public:
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; }
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_instruction_and_data_patch; }

#ifdef COMPILER1
void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ class Node;

enum class NMethodPatchingType {
stw_instruction_and_data_patch,
conc_instruction_and_data_patch,
conc_data_patch
conc_instruction_and_data_patch
};

class BarrierSetAssembler: public CHeapObj<mtGC> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {
Register preserve);

public:
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; }
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_instruction_and_data_patch; }

/* ==== C1 stubs ==== */
#ifdef COMPILER1
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,6 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo
__ lwu(t0, *guard);

switch (patching_type) {
case NMethodPatchingType::conc_data_patch:
// Subsequent loads of oops must occur after load of guard value.
// BarrierSetNMethod::disarm sets guard with release semantics.
__ membar(MacroAssembler::LoadLoad); // fall through to stw_instruction_and_data_patch
case NMethodPatchingType::stw_instruction_and_data_patch:
{
// With STW patching, no data or instructions are updated concurrently,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ class Node;

enum class NMethodPatchingType {
stw_instruction_and_data_patch,
conc_instruction_and_data_patch,
conc_data_patch
conc_instruction_and_data_patch
};

class BarrierSetAssembler: public CHeapObj<mtGC> {
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ static int entry_barrier_offset(nmethod* nm) {
switch (bs_asm->nmethod_patching_type()) {
case NMethodPatchingType::stw_instruction_and_data_patch:
return -4 * (4 + slow_path_size(nm));
case NMethodPatchingType::conc_data_patch:
return -4 * (5 + slow_path_size(nm));
case NMethodPatchingType::conc_instruction_and_data_patch:
return -4 * (15 + slow_path_size(nm));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {

public:

virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; }
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_instruction_and_data_patch; }

#ifdef COMPILER1
void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/jvmci/vmStructs_jvmci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,6 @@
\
AARCH64_ONLY(declare_constant(NMethodPatchingType::stw_instruction_and_data_patch)) \
AARCH64_ONLY(declare_constant(NMethodPatchingType::conc_instruction_and_data_patch)) \
AARCH64_ONLY(declare_constant(NMethodPatchingType::conc_data_patch)) \
\
declare_constant(ObjectMonitor::NO_OWNER) \
declare_constant(ObjectMonitor::ANONYMOUS_OWNER) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ private Boolean initNmethodEntryBarrierConcurrentPatch(Architecture arch) {
// There currently only 2 variants in use that differ only by the presence of a
// dmb instruction
int stw = getConstant("NMethodPatchingType::stw_instruction_and_data_patch", Integer.class);
int conc1 = getConstant("NMethodPatchingType::conc_data_patch", Integer.class);
int conc2 = getConstant("NMethodPatchingType::conc_instruction_and_data_patch", Integer.class);
int conc = getConstant("NMethodPatchingType::conc_instruction_and_data_patch", Integer.class);
if (patchingType == stw) {
patchConcurrent = false;
} else if (patchingType == conc1 || patchingType == conc2) {
} else if (patchingType == conc) {
patchConcurrent = true;
} else {
throw new IllegalArgumentException("unsupported barrier sequence " + patchingType);
Expand Down