Skip to content

Commit a3cd6a1

Browse files
author
David Holmes
committed
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
Reviewed-by: mikael, mdoerr, bulasevich, eosterlund
1 parent 5cfc3bb commit a3cd6a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+465
-774
lines changed

src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, 2018, Red Hat Inc. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -195,9 +195,7 @@ void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_
195195
void CompiledDirectStaticCall::verify() {
196196
// Verify call.
197197
_call->verify();
198-
if (os::is_MP()) {
199-
_call->verify_alignment();
200-
}
198+
_call->verify_alignment();
201199

202200
// Verify stub.
203201
address stub = find_stub(false /* is_aot */);

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,24 +1950,20 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
19501950
// didn't see any synchronization is progress, and escapes.
19511951
__ mov(rscratch1, _thread_in_native_trans);
19521952

1953-
if(os::is_MP()) {
1954-
if (UseMembar) {
1955-
__ strw(rscratch1, Address(rthread, JavaThread::thread_state_offset()));
1953+
if (UseMembar) {
1954+
__ strw(rscratch1, Address(rthread, JavaThread::thread_state_offset()));
19561955

1957-
// Force this write out before the read below
1958-
__ dmb(Assembler::ISH);
1959-
} else {
1960-
__ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
1961-
__ stlrw(rscratch1, rscratch2);
1962-
1963-
// Write serialization page so VM thread can do a pseudo remote membar.
1964-
// We use the current thread pointer to calculate a thread specific
1965-
// offset to write to within the page. This minimizes bus traffic
1966-
// due to cache line collision.
1967-
__ serialize_memory(rthread, r2);
1968-
}
1956+
// Force this write out before the read below
1957+
__ dmb(Assembler::ISH);
19691958
} else {
1970-
__ strw(rscratch1, Address(rthread, JavaThread::thread_state_offset()));
1959+
__ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
1960+
__ stlrw(rscratch1, rscratch2);
1961+
1962+
// Write serialization page so VM thread can do a pseudo remote membar.
1963+
// We use the current thread pointer to calculate a thread specific
1964+
// offset to write to within the page. This minimizes bus traffic
1965+
// due to cache line collision.
1966+
__ serialize_memory(rthread, r2);
19711967
}
19721968

19731969
// check for safepoint operation in progress and/or pending suspend requests

src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,17 +1394,15 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
13941394
__ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
13951395
__ stlrw(rscratch1, rscratch2);
13961396

1397-
if (os::is_MP()) {
1398-
if (UseMembar) {
1399-
// Force this write out before the read below
1400-
__ dmb(Assembler::ISH);
1401-
} else {
1402-
// Write serialization page so VM thread can do a pseudo remote membar.
1403-
// We use the current thread pointer to calculate a thread specific
1404-
// offset to write to within the page. This minimizes bus traffic
1405-
// due to cache line collision.
1406-
__ serialize_memory(rthread, rscratch2);
1407-
}
1397+
if (UseMembar) {
1398+
// Force this write out before the read below
1399+
__ dmb(Assembler::ISH);
1400+
} else {
1401+
// Write serialization page so VM thread can do a pseudo remote membar.
1402+
// We use the current thread pointer to calculate a thread specific
1403+
// offset to write to within the page. This minimizes bus traffic
1404+
// due to cache line collision.
1405+
__ serialize_memory(rthread, rscratch2);
14081406
}
14091407

14101408
// check for safepoint operation in progress and/or pending suspend requests

src/hotspot/cpu/arm/arm.ad

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5316,8 +5316,7 @@ instruct loadConD(regD dst, immD src, iRegP tmp) %{
53165316
// Prefetch instructions.
53175317
// Must be safe to execute with invalid address (cannot fault).
53185318

5319-
instruct prefetchAlloc_mp( memoryP mem ) %{
5320-
predicate(os::is_MP());
5319+
instruct prefetchAlloc( memoryP mem ) %{
53215320
match( PrefetchAllocation mem );
53225321
ins_cost(MEMORY_REF_COST);
53235322
size(4);
@@ -5333,23 +5332,6 @@ instruct prefetchAlloc_mp( memoryP mem ) %{
53335332
ins_pipe(iload_mem);
53345333
%}
53355334

5336-
instruct prefetchAlloc_sp( memoryP mem ) %{
5337-
predicate(!os::is_MP());
5338-
match( PrefetchAllocation mem );
5339-
ins_cost(MEMORY_REF_COST);
5340-
size(4);
5341-
5342-
format %{ "PLD $mem\t! Prefetch allocation" %}
5343-
ins_encode %{
5344-
#ifdef AARCH64
5345-
__ prfm(pstl1keep, $mem$$Address);
5346-
#else
5347-
__ pld($mem$$Address);
5348-
#endif
5349-
%}
5350-
ins_pipe(iload_mem);
5351-
%}
5352-
53535335
//----------Store Instructions-------------------------------------------------
53545336
// Store Byte
53555337
instruct storeB(memoryB mem, store_RegI src) %{

src/hotspot/cpu/arm/compiledIC_arm.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_
155155
void CompiledDirectStaticCall::verify() {
156156
// Verify call.
157157
_call->verify();
158-
if (os::is_MP()) {
159-
_call->verify_alignment();
160-
}
158+
_call->verify_alignment();
161159

162160
// Verify stub.
163161
address stub = find_stub(/*is_aot*/ false);

src/hotspot/cpu/arm/jniFastGetField_arm.cpp

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -127,13 +127,9 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
127127
__ bic(R1, R1, JNIHandles::weak_tag_mask);
128128
#endif
129129

130-
if (os::is_MP()) {
131-
// Address dependency restricts memory access ordering. It's cheaper than explicit LoadLoad barrier
132-
__ andr(Rtmp1, Rsafept_cnt, (unsigned)1);
133-
__ ldr(Robj, Address(R1, Rtmp1));
134-
} else {
135-
__ ldr(Robj, Address(R1));
136-
}
130+
// Address dependency restricts memory access ordering. It's cheaper than explicit LoadLoad barrier
131+
__ andr(Rtmp1, Rsafept_cnt, (unsigned)1);
132+
__ ldr(Robj, Address(R1, Rtmp1));
137133

138134
#ifdef AARCH64
139135
__ add(Robj, Robj, AsmOperand(R2, lsr, 2));
@@ -198,25 +194,21 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
198194
ShouldNotReachHere();
199195
}
200196

201-
if(os::is_MP()) {
202-
// Address dependency restricts memory access ordering. It's cheaper than explicit LoadLoad barrier
197+
// Address dependency restricts memory access ordering. It's cheaper than explicit LoadLoad barrier
203198
#if defined(__ABI_HARD__) && !defined(AARCH64)
204-
if (type == T_FLOAT || type == T_DOUBLE) {
205-
__ ldr_literal(Rsafepoint_counter_addr, safepoint_counter_addr);
206-
__ fmrrd(Rres, Rres_hi, D0);
207-
__ eor(Rtmp2, Rres, Rres);
208-
__ ldr_s32(Rsafept_cnt2, Address(Rsafepoint_counter_addr, Rtmp2));
209-
} else
199+
if (type == T_FLOAT || type == T_DOUBLE) {
200+
__ ldr_literal(Rsafepoint_counter_addr, safepoint_counter_addr);
201+
__ fmrrd(Rres, Rres_hi, D0);
202+
__ eor(Rtmp2, Rres, Rres);
203+
__ ldr_s32(Rsafept_cnt2, Address(Rsafepoint_counter_addr, Rtmp2));
204+
} else
210205
#endif // __ABI_HARD__ && !AARCH64
211-
{
206+
{
212207
#ifndef AARCH64
213-
__ ldr_literal(Rsafepoint_counter_addr, safepoint_counter_addr);
208+
__ ldr_literal(Rsafepoint_counter_addr, safepoint_counter_addr);
214209
#endif // !AARCH64
215-
__ eor(Rtmp2, Rres, Rres);
216-
__ ldr_s32(Rsafept_cnt2, Address(Rsafepoint_counter_addr, Rtmp2));
217-
}
218-
} else {
219-
__ ldr_s32(Rsafept_cnt2, Address(Rsafepoint_counter_addr));
210+
__ eor(Rtmp2, Rres, Rres);
211+
__ ldr_s32(Rsafept_cnt2, Address(Rsafepoint_counter_addr, Rtmp2));
220212
}
221213
__ cmp(Rsafept_cnt2, Rsafept_cnt);
222214
#ifdef AARCH64

src/hotspot/cpu/arm/macroAssembler_arm.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,8 +1563,6 @@ FixedSizeCodeBlock::~FixedSizeCodeBlock() {
15631563
// Serializes memory.
15641564
// tmp register is not used on AArch64, this parameter is provided solely for better compatibility with 32-bit ARM
15651565
void MacroAssembler::membar(Membar_mask_bits order_constraint, Register tmp) {
1566-
if (!os::is_MP()) return;
1567-
15681566
// TODO-AARCH64 investigate dsb vs dmb effects
15691567
if (order_constraint == StoreStore) {
15701568
dmb(DMB_st);
@@ -1585,7 +1583,6 @@ void MacroAssembler::membar(Membar_mask_bits order_constraint,
15851583
Register tmp,
15861584
bool preserve_flags,
15871585
Register load_tgt) {
1588-
if (!os::is_MP()) return;
15891586

15901587
if (order_constraint == StoreStore) {
15911588
dmb(DMB_st, tmp);

0 commit comments

Comments
 (0)