Skip to content

Commit 495b07f

Browse files
committed
Change shenandoah nmethod entry barrier fence for RISC-V
1 parent 62da55f commit 495b07f

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,6 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo
241241
__ lwu(t0, *guard);
242242

243243
switch (patching_type) {
244-
case NMethodPatchingType::conc_data_patch:
245-
// Subsequent loads of oops must occur after load of guard value.
246-
// BarrierSetNMethod::disarm sets guard with release semantics.
247-
__ membar(MacroAssembler::LoadLoad); // fall through to stw_instruction_and_data_patch
248244
case NMethodPatchingType::stw_instruction_and_data_patch:
249245
{
250246
// With STW patching, no data or instructions are updated concurrently,

src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ class Node;
4040

4141
enum class NMethodPatchingType {
4242
stw_instruction_and_data_patch,
43-
conc_instruction_and_data_patch,
44-
conc_data_patch
43+
conc_instruction_and_data_patch
4544
};
4645

4746
class BarrierSetAssembler: public CHeapObj<mtGC> {

src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ static int entry_barrier_offset(nmethod* nm) {
5050
switch (bs_asm->nmethod_patching_type()) {
5151
case NMethodPatchingType::stw_instruction_and_data_patch:
5252
return -4 * (4 + slow_path_size(nm));
53-
case NMethodPatchingType::conc_data_patch:
54-
return -4 * (5 + slow_path_size(nm));
5553
case NMethodPatchingType::conc_instruction_and_data_patch:
5654
return -4 * (15 + slow_path_size(nm));
5755
}

src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {
6969

7070
public:
7171

72-
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; }
72+
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_instruction_and_data_patch; }
7373

7474
#ifdef COMPILER1
7575
void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);

0 commit comments

Comments
 (0)