Skip to content

Commit c4aba87

Browse files
author
Vladimir Kozlov
committed
8320272: Make method_entry_barrier address shared
Reviewed-by: dlong
1 parent 9311749 commit c4aba87

32 files changed

+36
-62
lines changed

src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int C2EntryBarrierStub::max_size() const {
5555

5656
void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
5757
__ bind(entry());
58-
__ movptr(rscratch1, (uintptr_t) StubRoutines::aarch64::method_entry_barrier());
58+
__ lea(rscratch1, RuntimeAddress(StubRoutines::method_entry_barrier()));
5959
__ blr(rscratch1);
6060
__ b(continuation());
6161

src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo
358358
__ br(condition, barrier_target);
359359

360360
if (slow_path == nullptr) {
361-
__ movptr(rscratch1, (uintptr_t) StubRoutines::aarch64::method_entry_barrier());
361+
__ lea(rscratch1, RuntimeAddress(StubRoutines::method_entry_barrier()));
362362
__ blr(rscratch1);
363363
__ b(skip_barrier);
364364

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8393,7 +8393,7 @@ class StubGenerator: public StubCodeGenerator {
83938393

83948394
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
83958395
if (bs_nm != nullptr) {
8396-
StubRoutines::aarch64::_method_entry_barrier = generate_method_entry_barrier();
8396+
StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
83978397
}
83988398

83998399
StubRoutines::aarch64::_spin_wait = generate_spin_wait();

src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ address StubRoutines::aarch64::_string_indexof_linear_ll = nullptr;
5656
address StubRoutines::aarch64::_string_indexof_linear_uu = nullptr;
5757
address StubRoutines::aarch64::_string_indexof_linear_ul = nullptr;
5858
address StubRoutines::aarch64::_large_byte_array_inflate = nullptr;
59-
address StubRoutines::aarch64::_method_entry_barrier = nullptr;
6059

6160
static void empty_spin_wait() { }
6261
address StubRoutines::aarch64::_spin_wait = CAST_FROM_FN_PTR(address, empty_spin_wait);

src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ class aarch64 {
7171
static address _string_indexof_linear_ul;
7272
static address _large_byte_array_inflate;
7373

74-
static address _method_entry_barrier;
75-
7674
static address _spin_wait;
7775

7876
static bool _completed;
@@ -179,10 +177,6 @@ class aarch64 {
179177
return _large_byte_array_inflate;
180178
}
181179

182-
static address method_entry_barrier() {
183-
return _method_entry_barrier;
184-
}
185-
186180
static address spin_wait() {
187181
return _spin_wait;
188182
}

src/hotspot/cpu/arm/gc/shared/barrierSetAssembler_arm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) {
227227
__ cmp(tmp0, tmp1);
228228
__ b(skip, eq);
229229

230-
__ mov_address(tmp0, StubRoutines::Arm::method_entry_barrier());
230+
__ mov_address(tmp0, StubRoutines::method_entry_barrier());
231231
__ call(tmp0);
232232
__ b(skip);
233233

src/hotspot/cpu/arm/stubGenerator_arm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3188,7 +3188,7 @@ class StubGenerator: public StubCodeGenerator {
31883188

31893189
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
31903190
if (bs_nm != nullptr) {
3191-
StubRoutines::Arm::_method_entry_barrier = generate_method_entry_barrier();
3191+
StubRoutines::_method_entry_barrier = generate_method_entry_barrier();
31923192
}
31933193

31943194
}

src/hotspot/cpu/arm/stubRoutines_arm.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,3 @@ address StubRoutines::Arm::_partial_subtype_check = nullptr;
3333

3434
address StubRoutines::_atomic_load_long_entry = nullptr;
3535
address StubRoutines::_atomic_store_long_entry = nullptr;
36-
37-
address StubRoutines::Arm::_method_entry_barrier = nullptr;

src/hotspot/cpu/arm/stubRoutines_arm.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,11 @@ class Arm {
4545

4646
static address _idiv_irem_entry;
4747
static address _partial_subtype_check;
48-
static address _method_entry_barrier;
4948

5049
public:
5150

5251
static address idiv_irem_entry() { return _idiv_irem_entry; }
5352
static address partial_subtype_check() { return _partial_subtype_check; }
54-
static address method_entry_barrier() { return _method_entry_barrier; }
5553
};
5654

5755
static bool returns_to_call_stub(address return_pc) {

src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Register t
188188
__ block_comment("nmethod_entry_barrier (nmethod_entry_barrier) {");
189189

190190
// Load stub address using toc (fixed instruction size, unlike load_const_optimized)
191-
__ calculate_address_from_global_toc(tmp, StubRoutines::ppc::nmethod_entry_barrier(),
191+
__ calculate_address_from_global_toc(tmp, StubRoutines::method_entry_barrier(),
192192
true, true, false); // 2 instructions
193193
__ mtctr(tmp);
194194

0 commit comments

Comments
 (0)