Skip to content

Commit ddc4019

Browse files
committed
[patch] Add JDK10 AssumeMP workaround
1 parent c5559b5 commit ddc4019

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

scripts/jdk10.patch

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
diff -r b09e56145e11 make/autoconf/flags.m4
22
--- a/make/autoconf/flags.m4 Thu Mar 08 04:23:31 2018 +0000
3-
+++ b/make/autoconf/flags.m4 Wed Mar 28 01:46:33 2018 +0200
3+
+++ b/make/autoconf/flags.m4 Fri Apr 06 22:21:26 2018 +0200
44
@@ -30,7 +30,7 @@
55
AC_DEFUN([FLAGS_SETUP_ABI_PROFILE],
66
[
@@ -31,7 +31,7 @@ diff -r b09e56145e11 make/autoconf/flags.m4
3131
$2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
3232
diff -r b09e56145e11 src/hotspot/cpu/arm/assembler_arm_32.hpp
3333
--- a/src/hotspot/cpu/arm/assembler_arm_32.hpp Thu Mar 08 04:23:31 2018 +0000
34-
+++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp Wed Mar 28 01:46:33 2018 +0200
34+
+++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp Fri Apr 06 22:21:26 2018 +0200
3535
@@ -498,7 +498,7 @@
3636
void dmb(DMB_Opt opt, Register reg) {
3737
if (VM_Version::arm_arch() >= 7) {
@@ -63,9 +63,28 @@ diff -r b09e56145e11 src/hotspot/cpu/arm/assembler_arm_32.hpp
6363
};
6464
#endif // __SOFTFP__
6565

66+
diff -r b09e56145e11 src/hotspot/cpu/arm/vm_version_arm_32.cpp
67+
--- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp Thu Mar 08 04:23:31 2018 +0000
68+
+++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp Fri Apr 06 22:21:26 2018 +0200
69+
@@ -298,6 +298,15 @@
70+
FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
71+
}
72+
73+
+ // ARMv5 MP workaround
74+
+ if (arm_arch() == 5) {
75+
+ if (FLAG_IS_DEFAULT(AssumeMP)) {
76+
+ FLAG_SET_DEFAULT(AssumeMP, false);
77+
+ else if (AssumeMP) {
78+
+ warning("AssumeMP can not be true for ARMv5 as there is only uniprocessor support");
79+
+ FLAG_SET_DEFAULT(AssumeMP, false);
80+
+ }
81+
+ }
82+
_is_initialized = true;
83+
}
84+
6685
diff -r b09e56145e11 src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.hpp
6786
--- a/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.hpp Thu Mar 08 04:23:31 2018 +0000
68-
+++ b/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.hpp Wed Mar 28 01:46:33 2018 +0200
87+
+++ b/src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.hpp Fri Apr 06 22:21:26 2018 +0200
6988
@@ -71,7 +71,7 @@
7089
__asm__ volatile (
7190
".word 0xF57FF050 | 0xf" : : : "memory");
@@ -84,3 +103,15 @@ diff -r b09e56145e11 src/hotspot/os_cpu/linux_arm/orderAccess_linux_arm.inline.h
84103
intptr_t zero = 0;
85104
__asm__ volatile (
86105
"mcr p15, 0, %0, c7, c10, 5"
106+
diff -r b09e56145e11 src/hotspot/share/runtime/globals.hpp
107+
--- a/src/hotspot/share/runtime/globals.hpp Thu Mar 08 04:23:31 2018 +0000
108+
+++ b/src/hotspot/share/runtime/globals.hpp Fri Apr 06 22:21:26 2018 +0200
109+
@@ -586,7 +586,7 @@
110+
range(8, 256) \
111+
constraint(ObjectAlignmentInBytesConstraintFunc,AtParse) \
112+
\
113+
- product(bool, AssumeMP, true, \
114+
+ product(bool, AssumeMP, false, \
115+
"(Deprecated) Instruct the VM to assume multiple processors are available")\
116+
\
117+
/* UseMembar is theoretically a temp flag used for memory barrier */ \

0 commit comments

Comments
 (0)