Skip to content

Commit 75bafad

Browse files
authored
Merge pull request #71 from JakubVanek/bugfix/jdk15
JDK15 support
2 parents abfb698 + 8499f51 commit 75bafad

File tree

3 files changed

+41
-13
lines changed

3 files changed

+41
-13
lines changed

scripts/config.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,33 @@ elif [ "$JDKVER" == "14" ]; then
289289
HOTSPOT_ABI=arm-sflt
290290
JNI_PATH_FLAGS="--with-jni-libpath=/usr/lib/$DEB_HOST_MULTIARCH/jni:/lib/$DEB_HOST_MULTIARCH:/usr/lib/$DEB_HOST_MULTIARCH:/usr/lib/jni:/lib:/usr/lib"
291291

292+
# OpenJDK 15
293+
elif [ "$JDKVER" == "15" ]; then
294+
VERSION_POLICY="latest_general_availability"
295+
JAVA_REPO="https://github.com/openjdk/jdk15u.git"
296+
JAVA_SCM="git"
297+
PATCHVER="jdk15"
298+
AUTOGEN_STYLE="v2"
299+
if [ "$BUILDER_TYPE" = "native" ]; then
300+
HOSTJDK="$BUILDDIR/jdk-ev3"
301+
HOSTJDK_RENAME_FROM="$BUILDDIR/jdk"
302+
HOSTJDK_FILE="$BUILDDIR/jdk-ev3.tar.gz"
303+
# stretch and buster have different versions
304+
if [ "$BUILDER_DISTRO" = "stretch" ]; then
305+
HOSTJDK_URL="https://ci.adoptopenjdk.net/job/eljbuild/job/stretch-14/lastSuccessfulBuild/artifact/build/jdk-ev3.tar.gz"
306+
else
307+
HOSTJDK_URL="https://ci.adoptopenjdk.net/job/eljbuild/job/buster-14/lastSuccessfulBuild/artifact/build/jdk-ev3.tar.gz"
308+
fi
309+
else
310+
# same for both stretch & buster
311+
HOSTJDK="$BUILDDIR/jdk-14.0.1+7"
312+
HOSTJDK_FILE="$BUILDDIR/OpenJDK14U-jdk_x64_linux_hotspot_14.0.1_7.tar.gz"
313+
HOSTJDK_URL="https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.1%2B7/OpenJDK14U-jdk_x64_linux_hotspot_14.0.1_7.tar.gz"
314+
fi
315+
IMAGEDIR="$JDKDIR/build/linux-arm-${JDKVM}-${HOTSPOT_DEBUG}/images"
316+
HOTSPOT_ABI=arm-sflt
317+
JNI_PATH_FLAGS="--with-jni-libpath=/usr/lib/$DEB_HOST_MULTIARCH/jni:/lib/$DEB_HOST_MULTIARCH:/usr/lib/$DEB_HOST_MULTIARCH:/usr/lib/jni:/lib:/usr/lib"
318+
292319
# OpenJDK Loom & Master+dev
293320
elif [ "$JDKVER" == "loom" ] || [ "$JDKVER" == "tip" ]; then
294321
if [ "$JDKVER" == "loom" ]; then
@@ -333,6 +360,7 @@ else
333360
echo "JDKVER=12" >&2
334361
echo "JDKVER=13" >&2
335362
echo "JDKVER=14" >&2
363+
echo "JDKVER=15" >&2
336364
echo "JDKVER=loom" >&2
337365
echo "JDKVER=tip" >&2
338366
exit 1

scripts/jdk15_cds.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/src/hotspot/share/memory/metaspaceShared.cpp b/src/hotspot/share/memory/metaspaceShared.cpp
2-
index 20d7f53d3..4f6130b62 100644
2+
index 57a97b5c2..448156667 100644
33
--- a/src/hotspot/share/memory/metaspaceShared.cpp
44
+++ b/src/hotspot/share/memory/metaspaceShared.cpp
5-
@@ -1221,7 +1221,7 @@ public:
5+
@@ -1311,7 +1311,7 @@ public:
66
address obj = ref->obj();
77
int bytes = ref->size() * BytesPerWord;
88
char* p;
@@ -11,7 +11,7 @@ index 20d7f53d3..4f6130b62 100644
1111
char* oldtop;
1212
char* newtop;
1313

14-
@@ -1239,7 +1239,7 @@ public:
14+
@@ -1329,7 +1329,7 @@ public:
1515
Klass* klass = (Klass*)obj;
1616
if (klass->is_instance_klass()) {
1717
SystemDictionaryShared::validate_before_archiving(InstanceKlass::cast(klass));
@@ -21,10 +21,10 @@ index 20d7f53d3..4f6130b62 100644
2121
}
2222
p = _rw_region.allocate(bytes, alignment);
2323
diff --git a/src/hotspot/share/memory/metaspaceShared.hpp b/src/hotspot/share/memory/metaspaceShared.hpp
24-
index 4a4ee709f..57af38f19 100644
24+
index 326522c4a..4c5e54b4d 100644
2525
--- a/src/hotspot/share/memory/metaspaceShared.hpp
2626
+++ b/src/hotspot/share/memory/metaspaceShared.hpp
27-
@@ -70,7 +70,7 @@ public:
27+
@@ -71,7 +71,7 @@ public:
2828
DumpRegion(const char* name) : _name(name), _base(NULL), _top(NULL), _end(NULL), _is_packed(false) {}
2929

3030
char* expand_top_to(char* newtop);

scripts/jdk15_new.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/make/autoconf/hotspot.m4 b/make/autoconf/hotspot.m4
2-
index 0e4f4c283..647f41158 100644
2+
index 43653c115..4c5f960a8 100644
33
--- a/make/autoconf/hotspot.m4
44
+++ b/make/autoconf/hotspot.m4
5-
@@ -172,6 +172,11 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
5+
@@ -138,6 +138,11 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
66
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
77
fi
88

@@ -13,24 +13,24 @@ index 0e4f4c283..647f41158 100644
1313
+
1414
# --with-cpu-port is no longer supported
1515
UTIL_DEPRECATED_ARG_WITH(with-cpu-port)
16-
])
16+
1717
diff --git a/src/hotspot/share/memory/metaspaceShared.cpp b/src/hotspot/share/memory/metaspaceShared.cpp
18-
index 5bc8df595..20d7f53d3 100644
18+
index 28742febe..57a97b5c2 100644
1919
--- a/src/hotspot/share/memory/metaspaceShared.cpp
2020
+++ b/src/hotspot/share/memory/metaspaceShared.cpp
21-
@@ -71,6 +71,7 @@
22-
#include "utilities/bitMap.inline.hpp"
21+
@@ -72,6 +72,7 @@
22+
#include "utilities/ostream.hpp"
2323
#include "utilities/defaultStream.hpp"
2424
#include "utilities/hashtable.inline.hpp"
2525
+#include "gc/shared/softRefPolicy.hpp"
2626
#if INCLUDE_G1GC
2727
#include "gc/g1/g1CollectedHeap.hpp"
2828
#endif
2929
diff --git a/src/hotspot/share/oops/constantPool.cpp b/src/hotspot/share/oops/constantPool.cpp
30-
index b325f9f16..da47aff73 100644
30+
index d27bf3474..35bc24c7b 100644
3131
--- a/src/hotspot/share/oops/constantPool.cpp
3232
+++ b/src/hotspot/share/oops/constantPool.cpp
33-
@@ -429,8 +429,12 @@ void ConstantPool::remove_unshareable_info() {
33+
@@ -437,8 +437,12 @@ void ConstantPool::remove_unshareable_info() {
3434
}
3535

3636
int ConstantPool::cp_to_object_index(int cp_index) {

0 commit comments

Comments
 (0)