The package rpms/java-9-openjdk.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/java-9-openjdk.git/commit/?id=d82...
https://src.fedoraproject.org/cgit/rpms/java-9-openjdk.git/commit/?id=9a9....
Change:
+%ifarch %{jit_arches}
-%ifarch s390
Thanks.
Full change:
============
commit 1c2f77718e442f7ac0fee6f8b093edb983bca1aa
Author: Severin Gehwolf <sgehwolf(a)redhat.com>
Date: Fri Apr 20 10:25:30 2018 +0200
Refresh bootcycle-images jobs patch from upstream.
diff --git a/JDK-8201788-arm-bootcycle-jobs.patch b/JDK-8201788-arm-bootcycle-jobs.patch
deleted file mode 100644
index 8ca10e0..0000000
--- a/JDK-8201788-arm-bootcycle-jobs.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -r 21b063d75b3e make/Init.gmk
---- jdk9/make/Init.gmk Thu Mar 16 16:34:33 2017 +0000
-+++ jdk9/make/Init.gmk Tue Apr 04 13:49:37 2017 +0100
-@@ -303,7 +303,8 @@
- $(call PrepareSmartJavac)
- ( cd $(TOPDIR) && \
- $(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
-- -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
-+ $(if $(DISABLE_JOBS),, -j $(JOBS)) \
-+ -f make/Main.gmk $(USER_MAKE_VARS) \
- $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
- ( exitcode=$$? && \
- $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code
$$exitcode) \n" \
-diff -r 21b063d75b3e make/Main.gmk
---- jdk9/make/Main.gmk Thu Mar 16 16:34:33 2017 +0000
-+++ jdk9/make/Main.gmk Tue Apr 04 13:49:37 2017 +0100
-@@ -320,7 +320,7 @@
- ifneq ($(COMPILE_TYPE), cross)
- $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously
built image)
- +$(MAKE) $(MAKE_ARGS) -f $(SRC_ROOT)/make/Init.gmk
PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
-- JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
-+ DISABLE_JOBS=true SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
- else
- $(call LogWarn, Boot cycle build disabled when cross compiling)
- endif
diff --git a/JDK-8201788-bootcycle-images-jobs.patch
b/JDK-8201788-bootcycle-images-jobs.patch
new file mode 100644
index 0000000..a4a4504
--- /dev/null
+++ b/JDK-8201788-bootcycle-images-jobs.patch
@@ -0,0 +1,18 @@
+diff -r 21b063d75b3e make/Init.gmk
+--- jdk9/make/Init.gmk Thu Mar 16 16:34:33 2017 +0000
++++ jdk9/make/Init.gmk Tue Apr 04 13:49:37 2017 +0100
+@@ -310,9 +310,13 @@
+ ifneq ($(PARALLEL_TARGETS), )
+ $(call StartGlobalTimer)
+ $(call PrepareSmartJavac)
++ # JOBS will only be empty for a bootcycle-images recursive call
++ # or if specified via a make argument directly. In those cases
++ # treat it as NOT using jobs at all.
+ ( cd $(TOPDIR) && \
+ $(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
+- -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
++ $(if $(JOBS), -j $(JOBS)) \
++ -f make/Main.gmk $(USER_MAKE_VARS) \
+ $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
+ ( exitcode=$$? && \
+ $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code
$$exitcode) \n" \
diff --git a/java-9-openjdk.spec b/java-9-openjdk.spec
index 51ba475..c2587cb 100644
--- a/java-9-openjdk.spec
+++ b/java-9-openjdk.spec
@@ -860,7 +860,7 @@ Provides: java-%{javaver}-%{origin}-accessiblity =
%{epoch}:%{version}-%{release
Name: java-%{majorver}-%{origin}
Version: %{newjavaver}.%{buildver}
-Release: 8%{?dist}
+Release: 9%{?dist}
# java-1.5.0-ibm from
jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@@ -938,9 +938,9 @@ Patch100: JDK-8201495-s390-java-opts.patch
Patch101: sorted-diff.patch
# Type fixing for s390 (Zero). Not upstream.
Patch102: java-9-openjdk-size_t.patch
-# Arm (32 bit JIT) does not bootcycle without this fix.
-# Pending upstream.
-Patch103: JDK-8201788-arm-bootcycle-jobs.patch
+# bootcycle-images target may run out of ressources
+# due to bad jobs config. Missing backports.
+Patch103: JDK-8201788-bootcycle-images-jobs.patch
# s390 (Zero) build fix. Pending upstream.
Patch104: JDK-8201509-s390-atomic_store.patch
@@ -1834,6 +1834,11 @@ require "copy_jdk_configs.lua"
%changelog
+* Fri Apr 20 2018 Severin Gehwolf <sgehwolf(a)redhat.com> - 1:9.0.4.12-9
+- Rename JDK-8201788-arm-bootcycle-jobs.patch =>
+ JDK-8201788-bootcycle-images-jobs.patch.
+- Refresh with pushed fix upstream.
+
* Wed Apr 18 2018 Severin Gehwolf <sgehwolf(a)redhat.com> - 1:9.0.4.11-8
- Add Zero build fixes for ppc (32 bit) Zero and s390 (32 bit) Zero:
JDK-8185723-zero-atomic_copy64-ppc1.patch,
commit 63ed78891319b554d1835bef474913689ed02bfa
Author: Severin Gehwolf <sgehwolf(a)redhat.com>
Date: Thu Apr 19 12:50:38 2018 +0200
Remove left-over hunks from merge conflict.
diff --git a/java-9-openjdk.spec b/java-9-openjdk.spec
index fcdad2f..51ba475 100644
--- a/java-9-openjdk.spec
+++ b/java-9-openjdk.spec
@@ -469,7 +469,6 @@ exit 0
%defattr(-,root,root,-)
%dir %{_sysconfdir}/.java/.systemPrefs
%dir %{_sysconfdir}/.java
-<<<<<<< HEAD
%dir %{_jvmdir}/%{sdkdir %%1}
%license %{_jvmdir}/%{sdkdir %%1}/legal
%{_jvmdir}/%{sdkdir %%1}/release
@@ -593,7 +592,6 @@ exit 0
%global files_devel() %{expand:
%defattr(-,root,root,-)
-<<<<<<< HEAD
%license %{_jvmdir}/%{sdkdir %%1}/legal
%dir %{_jvmdir}/%{sdkdir %%1}/bin
%{_jvmdir}/%{sdkdir %%1}/bin/appletviewer
commit 5fd9786209cca0b9cf775ef78f82a0a432367f44
Author: Severin Gehwolf <sgehwolf(a)redhat.com>
Date: Thu Apr 19 10:12:21 2018 +0200
Actually enable system nss.
diff --git a/java-9-openjdk.spec b/java-9-openjdk.spec
index 57051ee..fcdad2f 100644
--- a/java-9-openjdk.spec
+++ b/java-9-openjdk.spec
@@ -1359,6 +1359,7 @@ bash ../configure \
--with-debug-level=$debugbuild \
--with-native-debug-symbols=internal \
--enable-unlimited-crypto \
+ --enable-system-nss \
--with-zlib=system \
--with-libjpeg=system \
--with-giflib=system \
commit df4761ea5bd27f67a6d864fe1aea42687470202e
Author: Severin Gehwolf <sgehwolf(a)redhat.com>
Date: Wed Apr 18 13:44:38 2018 +0200
Enable EC test in %check.
diff --git a/java-9-openjdk.spec b/java-9-openjdk.spec
index 0784fb6..57051ee 100644
--- a/java-9-openjdk.spec
+++ b/java-9-openjdk.spec
@@ -1422,8 +1422,7 @@ $JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED
TestCryptoLev
# Check ECC is working
$JAVA_HOME/bin/javac -d . %{SOURCE14}
-#FIXME make it run after system NSS support?
-$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") || true
+$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
# Check debug symbols are present and can identify code
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0'
lib
commit d82eb8a9779ba89fc6a6ed33da645f21ee941e9b
Author: Severin Gehwolf <sgehwolf(a)redhat.com>
Date: Wed Apr 18 11:29:08 2018 +0200
More patch cleanup and clarifications.
- Added jit_arches conditionals for files not being built
with Zero.
diff --git a/JDK-8185723-zero-atomic_copy64-ppc1.patch
b/JDK-8185723-zero-atomic_copy64-ppc1.patch
new file mode 100644
index 0000000..8f60925
--- /dev/null
+++ b/JDK-8185723-zero-atomic_copy64-ppc1.patch
@@ -0,0 +1,27 @@
+# HG changeset patch
+# User aph
+# Date 1501690960 -3600
+# Wed Aug 02 17:22:40 2017 +0100
+# Node ID 76ae018d7d596b9674c23901eaa41fe71674f19a
+# Parent c68024d52834ce6551a558f4caac24491ea1bfae
+8185723: Zero: segfaults on Power PC 32-bit
+Reviewed-by: duke
+
+diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+--- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
++++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+@@ -38,10 +38,10 @@
+ static void atomic_copy64(volatile void *src, volatile void *dst) {
+ #if defined(PPC32)
+ double tmp;
+- asm volatile ("lfd %0, 0(%1)\n"
+- "stfd %0, 0(%2)\n"
+- : "=f"(tmp)
+- : "b"(src), "b"(dst));
++ asm volatile ("lfd %0, %2\n"
++ "stfd %0, %1\n"
++ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
++ : "Q"(*(volatile double*)src));
+ #elif defined(S390) && !defined(_LP64)
+ double tmp;
+ asm volatile ("ld %0, %2\n"
diff --git a/JDK-8186461-zero-atomic_copy64-ppc2.patch
b/JDK-8186461-zero-atomic_copy64-ppc2.patch
new file mode 100644
index 0000000..a65a489
--- /dev/null
+++ b/JDK-8186461-zero-atomic_copy64-ppc2.patch
@@ -0,0 +1,31 @@
+# HG changeset patch
+# User glaubitz
+# Date 1511522185 -3600
+# Fri Nov 24 12:16:25 2017 +0100
+# Node ID 63dd266d5514681d6c84cc0ae8d667bc8b6d0c29
+# Parent a9fbc10dc406312d79c088696811a21fe3bddfc0
+8186461: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe
+
+diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+--- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
++++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+@@ -36,12 +36,18 @@
+
+ // Atomically copy 64 bits of data
+ static void atomic_copy64(volatile void *src, volatile void *dst) {
+-#if defined(PPC32)
++#if defined(PPC32) && !defined(__SPE__)
+ double tmp;
+ asm volatile ("lfd %0, %2\n"
+ "stfd %0, %1\n"
+ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
+ : "Q"(*(volatile double*)src));
++#elif defined(PPC32) && defined(__SPE__)
++ long tmp;
++ asm volatile ("evldd %0, %2\n"
++ "evstdd %0, %1\n"
++ : "=&r"(tmp), "=Q"(*(volatile long*)dst)
++ : "Q"(*(volatile long*)src));
+ #elif defined(S390) && !defined(_LP64)
+ double tmp;
+ asm volatile ("ld %0, %2\n"
diff --git a/JDK-8200556-aarch64-slowdebug-crash.patch
b/JDK-8200556-aarch64-slowdebug-crash.patch
new file mode 100644
index 0000000..ccd2f49
--- /dev/null
+++ b/JDK-8200556-aarch64-slowdebug-crash.patch
@@ -0,0 +1,14 @@
+diff -r 214a94e9366c src/cpu/aarch64/vm/nativeInst_aarch64.cpp
+--- openjdk/hotspot/src/cpu/aarch64/vm/nativeInst_aarch64.cpp Mon Jul 17 12:11:32 2017
+0000
++++ openjdk/hotspot/src/cpu/aarch64/vm/nativeInst_aarch64.cpp Mon Jul 24 16:23:14 2017
+0100
+@@ -343,7 +343,7 @@
+ CodeBuffer cb(code_pos, instruction_size);
+ MacroAssembler a(&cb);
+
+- a.mov(rscratch1, entry);
++ a.movptr(rscratch1, (uintptr_t)entry);
+ a.br(rscratch1);
+
+ ICache::invalidate_range(code_pos, instruction_size);
+
+
diff --git a/JDK-8201509-s390-atomic_store.patch b/JDK-8201509-s390-atomic_store.patch
new file mode 100644
index 0000000..d9c3c7e
--- /dev/null
+++ b/JDK-8201509-s390-atomic_store.patch
@@ -0,0 +1,18 @@
+diff --git openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+@@ -44,10 +44,10 @@
+ : "b"(src), "b"(dst));
+ #elif defined(S390) && !defined(_LP64)
+ double tmp;
+- asm volatile ("ld %0, 0(%1)\n"
+- "std %0, 0(%2)\n"
+- : "=r"(tmp)
+- : "a"(src), "a"(dst));
++ asm volatile ("ld %0, %2\n"
++ "std %0, %1\n"
++ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
++ : "Q"(*(volatile double*)src));
+ #else
+ *(jlong *) dst = *(jlong *) src;
+ #endif
diff --git a/JDK-8201788-arm-bootcycle-jobs.patch b/JDK-8201788-arm-bootcycle-jobs.patch
new file mode 100644
index 0000000..8ca10e0
--- /dev/null
+++ b/JDK-8201788-arm-bootcycle-jobs.patch
@@ -0,0 +1,25 @@
+diff -r 21b063d75b3e make/Init.gmk
+--- jdk9/make/Init.gmk Thu Mar 16 16:34:33 2017 +0000
++++ jdk9/make/Init.gmk Tue Apr 04 13:49:37 2017 +0100
+@@ -303,7 +303,8 @@
+ $(call PrepareSmartJavac)
+ ( cd $(TOPDIR) && \
+ $(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
+- -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
++ $(if $(DISABLE_JOBS),, -j $(JOBS)) \
++ -f make/Main.gmk $(USER_MAKE_VARS) \
+ $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
+ ( exitcode=$$? && \
+ $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code
$$exitcode) \n" \
+diff -r 21b063d75b3e make/Main.gmk
+--- jdk9/make/Main.gmk Thu Mar 16 16:34:33 2017 +0000
++++ jdk9/make/Main.gmk Tue Apr 04 13:49:37 2017 +0100
+@@ -320,7 +320,7 @@
+ ifneq ($(COMPILE_TYPE), cross)
+ $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously
built image)
+ +$(MAKE) $(MAKE_ARGS) -f $(SRC_ROOT)/make/Init.gmk
PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
+- JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
++ DISABLE_JOBS=true SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
+ else
+ $(call LogWarn, Boot cycle build disabled when cross compiling)
+ endif
diff --git a/RHBZ-1537049-system-nss-via-sunec.patch
b/RHBZ-1537049-system-nss-via-sunec.patch
new file mode 100644
index 0000000..5a0b9ca
--- /dev/null
+++ b/RHBZ-1537049-system-nss-via-sunec.patch
@@ -0,0 +1,654 @@
+diff --git jdk9/common/autoconf/jdk-options.m4 jdk9/common/autoconf/jdk-options.m4
+--- jdk9/common/autoconf/jdk-options.m4
++++ jdk9/common/autoconf/jdk-options.m4
+@@ -256,9 +256,10 @@
+ #
+ AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
+ [
++ AC_REQUIRE([LIB_SETUP_MISC_LIBS])
+ AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
+
+- if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl";
then
++ if test "x${system_nss}" = "xyes" -o -d
"${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
+ ENABLE_INTREE_EC=true
+ AC_MSG_RESULT([yes])
+ else
+diff --git jdk9/common/autoconf/libraries.m4 jdk9/common/autoconf/libraries.m4
+--- jdk9/common/autoconf/libraries.m4
++++ jdk9/common/autoconf/libraries.m4
+@@ -175,6 +175,48 @@
+ AC_SUBST(LIBDL)
+ LIBS="$save_LIBS"
+
++ ###############################################################################
++ #
++ # Check for the NSS libraries
++ #
++
++ AC_MSG_CHECKING([whether to build the Sun EC provider against the system NSS
libraries])
++
++ # default is bundled
++ DEFAULT_SYSTEM_NSS=no
++
++ AC_ARG_ENABLE([system-nss], [AS_HELP_STRING([--enable-system-nss],
++ [build the SunEC provider using the system NSS libraries
@<:@disabled@:>@])],
++ [
++ case "${enableval}" in
++ yes)
++ system_nss=yes
++ ;;
++ *)
++ system_nss=no
++ ;;
++ esac
++ ],
++ [
++ system_nss=${DEFAULT_SYSTEM_NSS}
++ ])
++ AC_MSG_RESULT([$system_nss])
++
++ if test "x${system_nss}" = "xyes"; then
++ PKG_CHECK_MODULES(NSS_SOFTTKN, nss-softokn >= 3.16.1, [NSS_SOFTOKN_FOUND=yes],
[NSS_SOFTOKN_FOUND=no])
++ PKG_CHECK_MODULES(NSS, nss >= 3.16.1, [NSS_FOUND=yes], [NSS_FOUND=no])
++ if test "x${NSS_SOFTOKN_FOUND}" = "xyes" -a
"x${NSS_FOUND}" = "xyes"; then
++ NSS_LIBS="$NSS_SOFTOKN_LIBS $NSS_LIBS -lfreebl";
++ USE_EXTERNAL_NSS=true
++ else
++ AC_MSG_ERROR([--enable-system-nss specified, but NSS not found.])
++ fi
++ else
++ USE_EXTERNAL_NSS=false
++ fi
++ AC_SUBST(USE_EXTERNAL_NSS)
++
++
+ # Deprecated libraries, keep the flags for backwards compatibility
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ BASIC_DEPRECATED_ARG_WITH([dxsdk])
+diff --git jdk9/common/autoconf/spec.gmk.in jdk9/common/autoconf/spec.gmk.in
+--- jdk9/common/autoconf/spec.gmk.in
++++ jdk9/common/autoconf/spec.gmk.in
+@@ -764,6 +764,10 @@
+ # Libraries
+ #
+
++USE_EXTERNAL_NSS:=@USE_EXTERNAL_NSS@
++NSS_LIBS:=@NSS_LIBS@
++NSS_CFLAGS:=@NSS_CFLAGS@
++
+ USE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@
+ LCMS_CFLAGS:=@LCMS_CFLAGS@
+ LCMS_LIBS:=@LCMS_LIBS@
+diff --git jdk9/jdk/make/lib/Lib-jdk.crypto.ec.gmk
jdk9/jdk/make/lib/Lib-jdk.crypto.ec.gmk
+--- jdk9/jdk/make/lib/Lib-jdk.crypto.ec.gmk
++++ jdk9/jdk/make/lib/Lib-jdk.crypto.ec.gmk
+@@ -29,9 +29,15 @@
+
+ ifeq ($(ENABLE_INTREE_EC), true)
+
+- LIBSUNEC_SRC := $(JDK_TOPDIR)/src/jdk.crypto.ec/share/native/libsunec
+ BUILD_LIBSUNEC_FLAGS := $(addprefix -I, $(SUNEC_SRC))
+
++ ifeq ($(USE_EXTERNAL_NSS), true)
++ LIBSUNEC_SRC := $(JDK_TOPDIR)/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp
++ BUILD_LIBSUNEC_FLAGS += $(NSS_CFLAGS) -DSYSTEM_NSS -DNSS_ENABLE_ECC
++ else
++ LIBSUNEC_SRC := $(JDK_TOPDIR)/src/jdk.crypto.ec/share/native/libsunec
++ endif
++
+ #
+ # On sol-sparc...all libraries are compiled with -xregs=no%appl
+ # (set in CFLAGS_REQUIRED_sparc)
+@@ -60,7 +66,7 @@
+ LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
+ LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LIBS := $(LIBCXX), \
+- LIBS_linux := -lc, \
++ LIBS_linux := -lc $(NSS_LIBS), \
+ LIBS_solaris := -lc, \
+ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
+ RC_FLAGS := $(RC_FLAGS) \
+diff --git jdk9/jdk/make/mapfiles/libsunec/mapfile-vers
jdk9/jdk/make/mapfiles/libsunec/mapfile-vers
+--- jdk9/jdk/make/mapfiles/libsunec/mapfile-vers
++++ jdk9/jdk/make/mapfiles/libsunec/mapfile-vers
+@@ -31,6 +31,7 @@
+ Java_sun_security_ec_ECDSASignature_signDigest;
+ Java_sun_security_ec_ECDSASignature_verifySignedDigest;
+ Java_sun_security_ec_ECDHKeyAgreement_deriveKey;
++ Java_sun_security_ec_SunEC_initialize;
+ local:
+ *;
+ };
+diff --git jdk9/jdk/src/java.base/unix/native/include/jni_md.h
jdk9/jdk/src/java.base/unix/native/include/jni_md.h
+--- jdk9/jdk/src/java.base/unix/native/include/jni_md.h
++++ jdk9/jdk/src/java.base/unix/native/include/jni_md.h
+@@ -36,6 +36,11 @@
+ #define JNIEXPORT
+ #define JNIIMPORT
+ #endif
++#if (defined(__GNUC__)) || __has_attribute(unused)
++ #define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
++#else
++ #define UNUSED(x) UNUSED_ ## x
++#endif
+
+ #define JNICALL
+
+diff --git jdk9/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java
jdk9/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java
+--- jdk9/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java
++++ jdk9/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java
+@@ -61,6 +61,7 @@
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
+ System.loadLibrary("sunec"); // check for native library
++ initialize();
+ return null;
+ }
+ });
+@@ -272,4 +273,9 @@
+ putService(new ProviderService(this, "KeyAgreement",
+ "ECDH", "sun.security.ec.ECDHKeyAgreement", null,
ATTRS));
+ }
++
++ /**
++ * Initialize the native code.
++ */
++ private static native void initialize();
+ }
+diff --git jdk9/jdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp
jdk9/jdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp
+--- jdk9/jdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp
++++ jdk9/jdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp
+@@ -25,7 +25,11 @@
+
+ #include <jni.h>
+ #include "jni_util.h"
++#ifdef SYSTEM_NSS
++#include "ecc_impl.h"
++#else
+ #include "impl/ecc_impl.h"
++#endif
+
+ #define ILLEGAL_STATE_EXCEPTION "java/lang/IllegalStateException"
+ #define INVALID_ALGORITHM_PARAMETER_EXCEPTION \
+@@ -33,6 +37,13 @@
+ #define INVALID_PARAMETER_EXCEPTION \
+ "java/security/InvalidParameterException"
+ #define KEY_EXCEPTION "java/security/KeyException"
++#define INTERNAL_ERROR "java/lang/InternalError"
++
++#ifdef SYSTEM_NSS
++#define SYSTEM_UNUSED(x) UNUSED(x)
++#else
++#define SYSTEM_UNUSED(x) x
++#endif
+
+ extern "C" {
+
+@@ -55,8 +66,13 @@
+ /*
+ * Deep free of the ECParams struct
+ */
+-void FreeECParams(ECParams *ecparams, jboolean freeStruct)
++void FreeECParams(ECParams *ecparams, jboolean SYSTEM_UNUSED(freeStruct))
+ {
++#ifdef SYSTEM_NSS
++ // Needs to be freed using the matching method to the one
++ // that allocated it. PR_TRUE means the memory is zeroed.
++ PORT_FreeArena(ecparams->arena, PR_TRUE);
++#else
+ // Use B_FALSE to free the SECItem->data element, but not the SECItem itself
+ // Use B_TRUE to free both
+
+@@ -70,6 +86,7 @@
+ SECITEM_FreeItem(&ecparams->curveOID, B_FALSE);
+ if (freeStruct)
+ free(ecparams);
++#endif
+ }
+
+ jbyteArray getEncodedBytes(JNIEnv *env, SECItem *hSECItem)
+@@ -95,7 +112,7 @@
+ */
+ JNIEXPORT jobjectArray
+ JNICALL Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair
+- (JNIEnv *env, jclass clazz, jint keySize, jbyteArray encodedParams, jbyteArray seed)
++ (JNIEnv *env, jclass UNUSED(clazz), jint UNUSED(keySize), jbyteArray encodedParams,
jbyteArray seed)
+ {
+ ECPrivateKey *privKey = NULL; // contains both public and private values
+ ECParams *ecparams = NULL;
+@@ -127,8 +144,17 @@
+ env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer);
+
+ // Generate the new keypair (using the supplied seed)
++#ifdef SYSTEM_NSS
++ if (RNG_RandomUpdate((unsigned char *) pSeedBuffer, jSeedLength)
++ != SECSuccess) {
++ ThrowException(env, KEY_EXCEPTION);
++ goto cleanup;
++ }
++ if (EC_NewKey(ecparams, &privKey) != SECSuccess) {
++#else
+ if (EC_NewKey(ecparams, &privKey, (unsigned char *) pSeedBuffer,
+ jSeedLength, 0) != SECSuccess) {
++#endif
+ ThrowException(env, KEY_EXCEPTION);
+ goto cleanup;
+ }
+@@ -175,10 +201,15 @@
+ }
+ if (privKey) {
+ FreeECParams(&privKey->ecParams, false);
++#ifndef SYSTEM_NSS
++ // The entire ECPrivateKey is allocated in the arena
++ // when using system NSS, so only the in-tree version
++ // needs to clear these manually.
+ SECITEM_FreeItem(&privKey->version, B_FALSE);
+ SECITEM_FreeItem(&privKey->privateValue, B_FALSE);
+ SECITEM_FreeItem(&privKey->publicValue, B_FALSE);
+ free(privKey);
++#endif
+ }
+
+ if (pSeedBuffer) {
+@@ -196,7 +227,7 @@
+ */
+ JNIEXPORT jbyteArray
+ JNICALL Java_sun_security_ec_ECDSASignature_signDigest
+- (JNIEnv *env, jclass clazz, jbyteArray digest, jbyteArray privateKey, jbyteArray
encodedParams, jbyteArray seed, jint timing)
++ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray digest, jbyteArray privateKey,
jbyteArray encodedParams, jbyteArray seed, jint timing)
+ {
+ jbyte* pDigestBuffer = NULL;
+ jint jDigestLength = env->GetArrayLength(digest);
+@@ -255,8 +286,18 @@
+ env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer);
+
+ // Sign the digest (using the supplied seed)
++#ifdef SYSTEM_NSS
++ if (RNG_RandomUpdate((unsigned char *) pSeedBuffer, jSeedLength)
++ != SECSuccess) {
++ ThrowException(env, KEY_EXCEPTION);
++ goto cleanup;
++ }
++ if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item)
++ != SECSuccess) {
++#else
+ if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item,
+ (unsigned char *) pSeedBuffer, jSeedLength, 0, timing) != SECSuccess) {
++#endif
+ ThrowException(env, KEY_EXCEPTION);
+ goto cleanup;
+ }
+@@ -305,7 +346,7 @@
+ */
+ JNIEXPORT jboolean
+ JNICALL Java_sun_security_ec_ECDSASignature_verifySignedDigest
+- (JNIEnv *env, jclass clazz, jbyteArray signedDigest, jbyteArray digest, jbyteArray
publicKey, jbyteArray encodedParams)
++ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray signedDigest, jbyteArray digest,
jbyteArray publicKey, jbyteArray encodedParams)
+ {
+ jboolean isValid = false;
+
+@@ -362,9 +403,10 @@
+
+ cleanup:
+ {
+- if (params_item.data)
++ if (params_item.data) {
+ env->ReleaseByteArrayElements(encodedParams,
+ (jbyte *) params_item.data, JNI_ABORT);
++ }
+
+ if (pubKey.publicValue.data)
+ env->ReleaseByteArrayElements(publicKey,
+@@ -390,7 +432,7 @@
+ */
+ JNIEXPORT jbyteArray
+ JNICALL Java_sun_security_ec_ECDHKeyAgreement_deriveKey
+- (JNIEnv *env, jclass clazz, jbyteArray privateKey, jbyteArray publicKey, jbyteArray
encodedParams)
++ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray privateKey, jbyteArray publicKey,
jbyteArray encodedParams)
+ {
+ jbyteArray jSecret = NULL;
+ ECParams *ecparams = NULL;
+@@ -466,9 +508,10 @@
+ env->ReleaseByteArrayElements(publicKey,
+ (jbyte *) publicValue_item.data, JNI_ABORT);
+
+- if (params_item.data)
++ if (params_item.data) {
+ env->ReleaseByteArrayElements(encodedParams,
+ (jbyte *) params_item.data, JNI_ABORT);
++ }
+
+ if (ecparams)
+ FreeECParams(ecparams, true);
+@@ -477,4 +520,28 @@
+ return jSecret;
+ }
+
++JNIEXPORT void
++JNICALL Java_sun_security_ec_SunEC_initialize
++ (JNIEnv *env, jclass UNUSED(clazz))
++{
++#ifdef SYSTEM_NSS
++ if (SECOID_Init() != SECSuccess) {
++ ThrowException(env, INTERNAL_ERROR);
++ }
++ if (RNG_RNGInit() != SECSuccess) {
++ ThrowException(env, INTERNAL_ERROR);
++ }
++#endif
++}
++
++JNIEXPORT void
++JNICALL JNI_OnUnload
++ (JavaVM *vm, void *reserved)
++{
++#ifdef SYSTEM_NSS
++ RNG_RNGShutdown();
++ SECOID_Shutdown();
++#endif
++}
++
+ } /* extern "C" */
+diff --git jdk9/jdk/src/jdk.crypto.ec/share/native/libsunec/ecc_impl.h
jdk9/jdk/src/jdk.crypto.ec/share/native/libsunec/ecc_impl.h
+new file mode 100644
+--- /dev/null
++++ jdk9/jdk/src/jdk.crypto.ec/share/native/libsunec/ecc_impl.h
+@@ -0,0 +1,298 @@
++/*
++ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
++ * Use is subject to license terms.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this library; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit
www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++/* *********************************************************************
++ *
++ * The Original Code is the Netscape security libraries.
++ *
++ * The Initial Developer of the Original Code is
++ * Netscape Communications Corporation.
++ * Portions created by the Initial Developer are Copyright (C) 1994-2000
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ * Dr Vipul Gupta <vipul.gupta(a)sun.com> and
++ * Douglas Stebila <douglas(a)stebila.ca>, Sun Microsystems Laboratories
++ *
++ * Last Modified Date from the Original Code: May 2017
++ *********************************************************************** */
++
++#ifndef _ECC_IMPL_H
++#define _ECC_IMPL_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <sys/types.h>
++
++#ifdef SYSTEM_NSS
++#include <secitem.h>
++#include <secerr.h>
++#include <keythi.h>
++#ifdef LEGACY_NSS
++#include <softoken.h>
++#else
++#include <blapi.h>
++#endif
++#else
++#include "ecl-exp.h"
++#endif
++
++/*
++ * Multi-platform definitions
++ */
++#ifdef __linux__
++#define B_FALSE FALSE
++#define B_TRUE TRUE
++typedef unsigned char uint8_t;
++typedef unsigned long ulong_t;
++typedef enum { B_FALSE, B_TRUE } boolean_t;
++#endif /* __linux__ */
++
++#ifdef _ALLBSD_SOURCE
++#include <stdint.h>
++#define B_FALSE FALSE
++#define B_TRUE TRUE
++typedef unsigned long ulong_t;
++typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
++#endif /* _ALLBSD_SOURCE */
++
++#ifdef AIX
++#define B_FALSE FALSE
++#define B_TRUE TRUE
++typedef unsigned char uint8_t;
++typedef unsigned long ulong_t;
++#endif /* AIX */
++
++#ifdef _WIN32
++typedef unsigned char uint8_t;
++typedef unsigned long ulong_t;
++typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
++#define strdup _strdup /* Replace POSIX name with ISO C++ name */
++#endif /* _WIN32 */
++
++#ifndef _KERNEL
++#include <stdlib.h>
++#endif /* _KERNEL */
++
++#define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */
++#define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */
++#define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */
++#define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */
++#define EC_MIN_KEY_LEN 112 /* min key length in bits */
++#define EC_MAX_KEY_LEN 571 /* max key length in bits */
++#define EC_MAX_OID_LEN 10 /* max length of OID buffer */
++
++/*
++ * Various structures and definitions from NSS are here.
++ */
++
++#ifndef SYSTEM_NSS
++#ifdef _KERNEL
++#define PORT_ArenaAlloc(a, n, f) kmem_alloc((n), (f))
++#define PORT_ArenaZAlloc(a, n, f) kmem_zalloc((n), (f))
++#define PORT_ArenaGrow(a, b, c, d) NULL
++#define PORT_ZAlloc(n, f) kmem_zalloc((n), (f))
++#define PORT_Alloc(n, f) kmem_alloc((n), (f))
++#else
++#define PORT_ArenaAlloc(a, n, f) malloc((n))
++#define PORT_ArenaZAlloc(a, n, f) calloc(1, (n))
++#define PORT_ArenaGrow(a, b, c, d) NULL
++#define PORT_ZAlloc(n, f) calloc(1, (n))
++#define PORT_Alloc(n, f) malloc((n))
++#endif
++
++#define PORT_NewArena(b) (char *)12345
++#define PORT_ArenaMark(a) NULL
++#define PORT_ArenaUnmark(a, b)
++#define PORT_ArenaRelease(a, m)
++#define PORT_FreeArena(a, b)
++#define PORT_Strlen(s) strlen((s))
++#define PORT_SetError(e)
++
++#define PRBool boolean_t
++#define PR_TRUE B_TRUE
++#define PR_FALSE B_FALSE
++
++#ifdef _KERNEL
++#define PORT_Assert ASSERT
++#define PORT_Memcpy(t, f, l) bcopy((f), (t), (l))
++#else
++#define PORT_Assert assert
++#define PORT_Memcpy(t, f, l) memcpy((t), (f), (l))
++#endif
++
++#endif
++
++#define CHECK_OK(func) if (func == NULL) goto cleanup
++#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup
++
++#ifndef SYSTEM_NSS
++typedef enum {
++ siBuffer = 0,
++ siClearDataBuffer = 1,
++ siCipherDataBuffer = 2,
++ siDERCertBuffer = 3,
++ siEncodedCertBuffer = 4,
++ siDERNameBuffer = 5,
++ siEncodedNameBuffer = 6,
++ siAsciiNameString = 7,
++ siAsciiString = 8,
++ siDEROID = 9,
++ siUnsignedInteger = 10,
++ siUTCTime = 11,
++ siGeneralizedTime = 12
++} SECItemType;
++
++typedef struct SECItemStr SECItem;
++
++struct SECItemStr {
++ SECItemType type;
++ unsigned char *data;
++ unsigned int len;
++};
++
++typedef SECItem SECKEYECParams;
++
++typedef enum { ec_params_explicit,
++ ec_params_named
++} ECParamsType;
++
++typedef enum { ec_field_GFp = 1,
++ ec_field_GF2m
++} ECFieldType;
++
++struct ECFieldIDStr {
++ int size; /* field size in bits */
++ ECFieldType type;
++ union {
++ SECItem prime; /* prime p for (GFp) */
++ SECItem poly; /* irreducible binary polynomial for (GF2m) */
++ } u;
++ int k1; /* first coefficient of pentanomial or
++ * the only coefficient of trinomial
++ */
++ int k2; /* two remaining coefficients of pentanomial */
++ int k3;
++};
++typedef struct ECFieldIDStr ECFieldID;
++
++struct ECCurveStr {
++ SECItem a; /* contains octet stream encoding of
++ * field element (X9.62 section 4.3.3)
++ */
++ SECItem b;
++ SECItem seed;
++};
++typedef struct ECCurveStr ECCurve;
++
++typedef void PRArenaPool;
++
++struct ECParamsStr {
++ PRArenaPool * arena;
++ ECParamsType type;
++ ECFieldID fieldID;
++ ECCurve curve;
++ SECItem base;
++ SECItem order;
++ int cofactor;
++ SECItem DEREncoding;
++ ECCurveName name;
++ SECItem curveOID;
++};
++typedef struct ECParamsStr ECParams;
++
++struct ECPublicKeyStr {
++ ECParams ecParams;
++ SECItem publicValue; /* elliptic curve point encoded as
++ * octet stream.
++ */
++};
++typedef struct ECPublicKeyStr ECPublicKey;
++
++struct ECPrivateKeyStr {
++ ECParams ecParams;
++ SECItem publicValue; /* encoded ec point */
++ SECItem privateValue; /* private big integer */
++ SECItem version; /* As per SEC 1, Appendix C, Section C.4 */
++};
++typedef struct ECPrivateKeyStr ECPrivateKey;
++
++typedef enum _SECStatus {
++ SECBufferTooSmall = -3,
++ SECWouldBlock = -2,
++ SECFailure = -1,
++ SECSuccess = 0
++} SECStatus;
++#endif
++
++#ifdef _KERNEL
++#define RNG_GenerateGlobalRandomBytes(p,l) ecc_knzero_random_generator((p), (l))
++#else
++/*
++ This function is no longer required because the random bytes are now
++ supplied by the caller. Force a failure.
++*/
++#ifndef SYSTEM_NSS
++#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure
++#endif
++#endif
++#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup
++#define MP_TO_SEC_ERROR(err)
++
++#define SECITEM_TO_MPINT(it, mp) \
++ CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
++
++extern int ecc_knzero_random_generator(uint8_t *, size_t);
++extern ulong_t soft_nzero_random_generator(uint8_t *, ulong_t);
++
++#ifdef SYSTEM_NSS
++#define EC_DecodeParams(a,b,c) EC_DecodeParams(a,b)
++#define ECDSA_VerifyDigest(a,b,c,d) ECDSA_VerifyDigest(a,b,c)
++#define ECDH_Derive(a,b,c,d,e,f) ECDH_Derive(a,b,c,d,e)
++#else
++extern SECStatus EC_DecodeParams(const SECItem *, ECParams **, int);
++
++extern SECItem * SECITEM_AllocItem(PRArenaPool *, SECItem *, unsigned int, int);
++extern SECStatus SECITEM_CopyItem(PRArenaPool *, SECItem *, const SECItem *,
++ int);
++extern void SECITEM_FreeItem(SECItem *, boolean_t);
++
++/* This function has been modified to accept an array of random bytes */
++extern SECStatus EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey,
++ const unsigned char* random, int randomlen, int);
++/* This function has been modified to accept an array of random bytes */
++extern SECStatus ECDSA_SignDigest(ECPrivateKey *, SECItem *, const SECItem *,
++ const unsigned char* random, int randomlen, int, int timing);
++extern SECStatus ECDSA_VerifyDigest(ECPublicKey *, const SECItem *,
++ const SECItem *, int);
++extern SECStatus ECDH_Derive(SECItem *, ECParams *, SECItem *, boolean_t,
++ SECItem *, int);
++#endif
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* _ECC_IMPL_H */
diff --git a/aarch64BuildFailure.patch b/aarch64BuildFailure.patch
deleted file mode 100644
index ccd2f49..0000000
--- a/aarch64BuildFailure.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -r 214a94e9366c src/cpu/aarch64/vm/nativeInst_aarch64.cpp
---- openjdk/hotspot/src/cpu/aarch64/vm/nativeInst_aarch64.cpp Mon Jul 17 12:11:32 2017
+0000
-+++ openjdk/hotspot/src/cpu/aarch64/vm/nativeInst_aarch64.cpp Mon Jul 24 16:23:14 2017
+0100
-@@ -343,7 +343,7 @@
- CodeBuffer cb(code_pos, instruction_size);
- MacroAssembler a(&cb);
-
-- a.mov(rscratch1, entry);
-+ a.movptr(rscratch1, (uintptr_t)entry);
- a.br(rscratch1);
-
- ICache::invalidate_range(code_pos, instruction_size);
-
-
diff --git a/bootcycle_jobs.patch b/bootcycle_jobs.patch
deleted file mode 100644
index 8ca10e0..0000000
--- a/bootcycle_jobs.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -r 21b063d75b3e make/Init.gmk
---- jdk9/make/Init.gmk Thu Mar 16 16:34:33 2017 +0000
-+++ jdk9/make/Init.gmk Tue Apr 04 13:49:37 2017 +0100
-@@ -303,7 +303,8 @@
- $(call PrepareSmartJavac)
- ( cd $(TOPDIR) && \
- $(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
-- -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
-+ $(if $(DISABLE_JOBS),, -j $(JOBS)) \
-+ -f make/Main.gmk $(USER_MAKE_VARS) \
- $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
- ( exitcode=$$? && \
- $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code
$$exitcode) \n" \
-diff -r 21b063d75b3e make/Main.gmk
---- jdk9/make/Main.gmk Thu Mar 16 16:34:33 2017 +0000
-+++ jdk9/make/Main.gmk Tue Apr 04 13:49:37 2017 +0100
-@@ -320,7 +320,7 @@
- ifneq ($(COMPILE_TYPE), cross)
- $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously
built image)
- +$(MAKE) $(MAKE_ARGS) -f $(SRC_ROOT)/make/Init.gmk
PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
-- JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
-+ DISABLE_JOBS=true SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
- else
- $(call LogWarn, Boot cycle build disabled when cross compiling)
- endif
diff --git a/java-9-openjdk.spec b/java-9-openjdk.spec
index 8f412dd..0784fb6 100644
--- a/java-9-openjdk.spec
+++ b/java-9-openjdk.spec
@@ -469,6 +469,7 @@ exit 0
%defattr(-,root,root,-)
%dir %{_sysconfdir}/.java/.systemPrefs
%dir %{_sysconfdir}/.java
+<<<<<<< HEAD
%dir %{_jvmdir}/%{sdkdir %%1}
%license %{_jvmdir}/%{sdkdir %%1}/legal
%{_jvmdir}/%{sdkdir %%1}/release
@@ -488,7 +489,9 @@ exit 0
%{_jvmdir}/%{sdkdir %%1}/bin/tnameserv
%{_jvmdir}/%{sdkdir %%1}/bin/unpack200
%dir %{_jvmdir}/%{sdkdir %%1}/lib
+%ifarch %{jit_arches}
%{_jvmdir}/%{sdkdir %%1}/lib/classlist
+%endif
%{_jvmdir}/%{sdkdir %%1}/lib/jexec
%{_jvmdir}/%{sdkdir %%1}/lib/jrt-fs.jar
%{_jvmdir}/%{sdkdir %%1}/lib/modules
@@ -523,8 +526,11 @@ exit 0
%{_jvmdir}/%{sdkdir %%1}/lib/libnio.so
%{_jvmdir}/%{sdkdir %%1}/lib/libprefs.so
%{_jvmdir}/%{sdkdir %%1}/lib/librmi.so
+%ifarch %{jit_arches}
%{_jvmdir}/%{sdkdir %%1}/lib/libsaproc.so
+%endif
%{_jvmdir}/%{sdkdir %%1}/lib/libsctp.so
+%{_jvmdir}/%{sdkdir %%1}/lib/libsunec.so
%{_jvmdir}/%{sdkdir %%1}/lib/libunpack.so
%{_jvmdir}/%{sdkdir %%1}/lib/libverify.so
%{_jvmdir}/%{sdkdir %%1}/lib/libzip.so
@@ -587,6 +593,7 @@ exit 0
%global files_devel() %{expand:
%defattr(-,root,root,-)
+<<<<<<< HEAD
%license %{_jvmdir}/%{sdkdir %%1}/legal
%dir %{_jvmdir}/%{sdkdir %%1}/bin
%{_jvmdir}/%{sdkdir %%1}/bin/appletviewer
@@ -603,7 +610,9 @@ exit 0
%{_jvmdir}/%{sdkdir %%1}/bin/jdeps
%{_jvmdir}/%{sdkdir %%1}/bin/jdeprscan
%{_jvmdir}/%{sdkdir %%1}/bin/jimage
+%ifarch %{jit_arches}
%{_jvmdir}/%{sdkdir %%1}/bin/jhsdb
+%endif
%{_jvmdir}/%{sdkdir %%1}/bin/jinfo
%{_jvmdir}/%{sdkdir %%1}/bin/jlink
%{_jvmdir}/%{sdkdir %%1}/bin/jmap
@@ -853,7 +862,7 @@ Provides: java-%{javaver}-%{origin}-accessiblity =
%{epoch}:%{version}-%{release
Name: java-%{majorver}-%{origin}
Version: %{newjavaver}.%{buildver}
-Release: 7%{?dist}
+Release: 8%{?dist}
# java-1.5.0-ibm from
jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@@ -875,7 +884,7 @@ URL:
http://openjdk.java.net/
# PROJECT_NAME=jdk-updates REPO_NAME=jdk9u
VERSION=jdk-%%{majorver}.%%{minorver}.%%{securityver}+%%{buildver}
./generate_source_tarball.sh
#
# Example:
-# PROJECT_NAME=jdk-updates REPO_NAME=jdk9u VERSION=jdk-9.0.4+11
./generate_source_tarball.sh
+# PROJECT_NAME=jdk-updates REPO_NAME=jdk9u VERSION=jdk-9.0.4+12
./generate_source_tarball.sh
Source0: jdk-updates-jdk%{majorver}u-jdk-%{newjavaver}+%{buildver}.tar.xz
# Custom README for -src subpackage
@@ -907,28 +916,43 @@ Source14: TestECDSA.java
# RPM/distribution specific patches
#
+# NSS via SunPKCS11 Provider (disabled comment
+# due to memory leak).
Patch1000: enableCommentedOutSystemNss.patch
# Ignore AWTError when assistive technologies are loaded
Patch1: accessible-toolkit.patch
# Restrict access to java-atk-wrapper classes
Patch2: java-atk-wrapper-security.patch
-Patch3: system-nss-ec-rh1537049.patch
+# Enable EC ciphers via SunEC provider and system NSS.
+Patch3: RHBZ-1537049-system-nss-via-sunec.patch
Patch4: libjpeg-turbo-1.4-compat.patch
#
# OpenJDK specific patches
#
+# s390 (Zero) build does not bootcycle without this patch
+# Already in JDK-11. Missing backports.
Patch100: JDK-8201495-s390-java-opts.patch
# See JDK-8198844. This won't be needed any more in
# JDK 11+
Patch101: sorted-diff.patch
-# Type fixing for s390
+# Type fixing for s390 (Zero). Not upstream.
Patch102: java-9-openjdk-size_t.patch
-Patch103: bootcycle_jobs.patch
+# Arm (32 bit JIT) does not bootcycle without this fix.
+# Pending upstream.
+Patch103: JDK-8201788-arm-bootcycle-jobs.patch
+# s390 (Zero) build fix. Pending upstream.
+Patch104: JDK-8201509-s390-atomic_store.patch
+
+# aarch64 slowdebug build fix. Pending upstream
+Patch400: JDK-8200556-aarch64-slowdebug-crash.patch
-Patch400: aarch64BuildFailure.patch
+# Zero fixes for PPC32. Already in latest upstream,
+# but in no JDK 9 repository. Missing backport.
+Patch501: JDK-8185723-zero-atomic_copy64-ppc1.patch
+Patch502: JDK-8186461-zero-atomic_copy64-ppc2.patch
BuildRequires: autoconf
BuildRequires: automake
@@ -1221,8 +1245,14 @@ sh %{SOURCE12}
%patch101 -p1
%patch102 -p1
%patch103 -p1
+%patch104 -p1
%patch400 -p1
+pushd hotspot
+%patch501 -p1
+%patch502 -p1
+popd # hotspot
+
popd # openjdk
%patch1000
@@ -1806,6 +1836,16 @@ require "copy_jdk_configs.lua"
%changelog
+* Wed Apr 18 2018 Severin Gehwolf <sgehwolf(a)redhat.com> - 1:9.0.4.11-8
+- Add Zero build fixes for ppc (32 bit) Zero and s390 (32 bit) Zero:
+ JDK-8185723-zero-atomic_copy64-ppc1.patch,
+ JDK-8186461-zero-atomic_copy64-ppc2.patch,
+ JDK-8201509-s390-atomic_store.patch
+- Renamed some patches for clarity:
+ bootcycle_jobs.patch => JDK-8201788-arm-bootcycle-jobs.patch
+ system-nss-ec-rh1537049.patch => RHBZ-1537049-system-nss-via-sunec.patch
+ aarch64BuildFailure.patch => JDK-8200556-aarch64-slowdebug-crash.patch
+
* Tue Apr 17 2018 Severin Gehwolf <sgehwolf(a)redhat.com> - 1:9.0.4.11-7
- Remove JDK-8195685, JDK-8196136, JDK-8195859, JDK-8196221
now upstream.
commit 9a9ffab59edbac5c50f67c985b3a8d3aad0f4a2a
Author: Severin Gehwolf <sgehwolf(a)redhat.com>
Date: Tue Apr 17 17:34:53 2018 +0200
Clean up patches and spec file.
diff --git a/.gitignore b/.gitignore
index da0444d..9f95f47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/jdk9-jdk9-jdk-9+181-CPU4.tar.xz
/jdk-updates-jdk9u-jdk-9.0.1+11.tar.xz
/jdk-updates-jdk9u-jdk-9.0.4+11.tar.xz
+/jdk-updates-jdk9u-jdk-9.0.4+12.tar.xz
diff --git a/JDK-8195685-cannot-build-with-8174962.patch
b/JDK-8195685-cannot-build-with-8174962.patch
deleted file mode 100644
index 8a34b35..0000000
--- a/JDK-8195685-cannot-build-with-8174962.patch
+++ /dev/null
@@ -1,297 +0,0 @@
-# HG changeset patch
-# User aph
-# Date 1516971866 -3600
-# Fri Jan 26 14:04:26 2018 +0100
-# Node ID a8b7d1fd5884bcfe816df11f16dd71aec7bdacdb
-# Parent f6418daf023ea194db63519e3d13ca6c252028ed
-8195685: AArch64: AArch64 cannot build with JDK-8174962
-Reviewed-by: adinn, njian
-
-diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
---- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
-+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
-@@ -927,8 +927,12 @@
- RegisterOrConstant itable_index,
- Register method_result,
- Register scan_temp,
-- Label& L_no_such_interface) {
-- assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
-+ Label& L_no_such_interface,
-+ bool return_method) {
-+ assert_different_registers(recv_klass, intf_klass, scan_temp);
-+ assert_different_registers(method_result, intf_klass, scan_temp);
-+ assert(recv_klass != method_result || !return_method,
-+ "recv_klass can be destroyed when method isn't needed");
- assert(itable_index.is_constant() || itable_index.as_register() == method_result,
- "caller must use same register for non-constant itable index as for
method");
-
-@@ -946,12 +950,14 @@
- lea(scan_temp, Address(recv_klass, scan_temp, Address::lsl(3)));
- add(scan_temp, scan_temp, vtable_base);
-
-- // Adjust recv_klass by scaled itable_index, so we can free itable_index.
-- assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in
the code below");
-- // lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr,
itentry_off));
-- lea(recv_klass, Address(recv_klass, itable_index, Address::lsl(3)));
-- if (itentry_off)
-- add(recv_klass, recv_klass, itentry_off);
-+ if (return_method) {
-+ // Adjust recv_klass by scaled itable_index, so we can free itable_index.
-+ assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in
the code below");
-+ // lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr,
itentry_off));
-+ lea(recv_klass, Address(recv_klass, itable_index, Address::lsl(3)));
-+ if (itentry_off)
-+ add(recv_klass, recv_klass, itentry_off);
-+ }
-
- // for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
- // if (scan->interface() == intf) {
-@@ -985,8 +991,10 @@
- bind(found_method);
-
- // Got a hit.
-- ldr(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
-- ldr(method_result, Address(recv_klass, scan_temp));
-+ if (return_method) {
-+ ldrw(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
-+ ldr(method_result, Address(recv_klass, scan_temp, Address::uxtw(0)));
-+ }
- }
-
- // virtual method calling
-diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
b/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
---- a/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
-+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
-@@ -870,7 +870,8 @@
- RegisterOrConstant itable_index,
- Register method_result,
- Register scan_temp,
-- Label& no_such_interface);
-+ Label& no_such_interface,
-+ bool return_method = true);
-
- // virtual method calling
- // n.b. x86 allows RegisterOrConstant for vtable_index
-diff --git a/src/cpu/aarch64/vm/templateTable_aarch64.cpp
b/src/cpu/aarch64/vm/templateTable_aarch64.cpp
---- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp
-+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp
-@@ -3279,11 +3279,11 @@
- transition(vtos, vtos);
- assert(byte_no == f1_byte, "use this argument");
-
-- prepare_invoke(byte_no, r0, rmethod, // get f1 Klass*, f2 itable index
-+ prepare_invoke(byte_no, r0, rmethod, // get f1 Klass*, f2 Method*
- r2, r3); // recv, flags
-
- // r0: interface klass (from f1)
-- // rmethod: itable index (from f2)
-+ // rmethod: method (from f2)
- // r2: receiver
- // r3: flags
-
-@@ -3302,11 +3302,28 @@
- __ null_check(r2, oopDesc::klass_offset_in_bytes());
- __ load_klass(r3, r2);
-
-+ Label no_such_interface, no_such_method;
-+
-+ // Receiver subtype check against REFC.
-+ // Superklass in r0. Subklass in r3. Blows rscratch2, r13
-+ __ lookup_interface_method(// inputs: rec. class, interface, itable index
-+ r3, r0, noreg,
-+ // outputs: scan temp. reg, scan temp. reg
-+ rscratch2, r13,
-+ no_such_interface,
-+ /*return_method=*/false);
-+
- // profile this call
- __ profile_virtual_call(r3, r13, r19);
-
-- Label no_such_interface, no_such_method;
--
-+ // Get declaring interface class from method, and itable index
-+ __ ldr(r0, Address(rmethod, Method::const_offset()));
-+ __ ldr(r0, Address(r0, ConstMethod::constants_offset()));
-+ __ ldr(r0, Address(r0, ConstantPool::pool_holder_offset_in_bytes()));
-+ __ ldrw(rmethod, Address(rmethod, Method::itable_index_offset()));
-+ __ subw(rmethod, rmethod, Method::itable_index_max);
-+ __ negw(rmethod, rmethod);
-+
- __ lookup_interface_method(// inputs: rec. class, interface, itable index
- r3, r0, rmethod,
- // outputs: method, scan temp. reg
-diff --git a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
---- a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
-+++ b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
-@@ -29,6 +29,7 @@
- #include "code/vtableStubs.hpp"
- #include "interp_masm_aarch64.hpp"
- #include "memory/resourceArea.hpp"
-+#include "oops/compiledICHolder.hpp"
- #include "oops/instanceKlass.hpp"
- #include "oops/klassVtable.hpp"
- #include "runtime/sharedRuntime.hpp"
-@@ -140,28 +141,44 @@
- #endif
-
- // Entry arguments:
-- // rscratch2: Interface
-+ // rscratch2: CompiledICHolder
- // j_rarg0: Receiver
-
-- // Free registers (non-args) are r0 (interface), rmethod
-
-+ // Most registers are in use; we'll use r0, rmethod, r10, r11
-+ const Register recv_klass_reg = r10;
-+ const Register holder_klass_reg = r0; // declaring interface klass (DECC)
-+ const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
-+ const Register temp_reg = r11;
-+ const Register icholder_reg = rscratch2;
-+
-+ Label L_no_such_interface;
-+
-+ __ ldr(resolved_klass_reg, Address(icholder_reg,
CompiledICHolder::holder_klass_offset()));
-+ __ ldr(holder_klass_reg, Address(icholder_reg,
CompiledICHolder::holder_metadata_offset()));
-+
- // get receiver (need to skip return address on top of stack)
--
- assert(VtableStub::receiver_location() == j_rarg0->as_VMReg(), "receiver
expected in j_rarg0");
- // get receiver klass (also an implicit null-check)
- address npe_addr = __ pc();
--
-- // Most registers are in use; we'll use r0, rmethod, r10, r11
-- __ load_klass(r10, j_rarg0);
--
-- Label throw_icce;
-+ __ load_klass(recv_klass_reg, j_rarg0);
-
-- // Get Method* and entrypoint for compiler
-+ // Receiver subtype check against REFC.
-+ // Destroys recv_klass_reg value.
-+ __ lookup_interface_method(// inputs: rec. class, interface
-+ recv_klass_reg, resolved_klass_reg, noreg,
-+ // outputs: scan temp. reg1, scan temp. reg2
-+ recv_klass_reg, temp_reg,
-+ L_no_such_interface,
-+ /*return_method=*/false);
-+
-+ // Get selected method from declaring class and itable index
-+ __ load_klass(recv_klass_reg, j_rarg0); // restore recv_klass_reg
- __ lookup_interface_method(// inputs: rec. class, interface, itable index
-- r10, rscratch2, itable_index,
-- // outputs: method, scan temp. reg
-- rmethod, r11,
-- throw_icce);
-+ recv_klass_reg, holder_klass_reg, itable_index,
-+ // outputs: method, scan temp. reg
-+ rmethod, temp_reg,
-+ L_no_such_interface);
-
- // method (rmethod): Method*
- // j_rarg0: receiver
-@@ -183,7 +200,7 @@
- __ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
- __ br(rscratch1);
-
-- __ bind(throw_icce);
-+ __ bind(L_no_such_interface);
- __
far_jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
-
- __ flush();
-@@ -205,11 +222,11 @@
- int size = DebugVtables ? 216 : 0;
- if (CountCompiledCalls)
- size += 6 * 4;
-- // FIXME
-+ // FIXME: vtable stubs only need 36 bytes
- if (is_vtable_stub)
- size += 52;
- else
-- size += 104;
-+ size += 176;
- return size;
-
- // In order to tune these parameters, run the JVM with VM options
-@@ -217,33 +234,58 @@
- // actual itable stubs. Run it with -Xmx31G -XX:+UseCompressedOops.
- //
- // If Universe::narrow_klass_base is nonzero, decoding a compressed
-- // class can take zeveral instructions. Run it with -Xmx31G
-- // -XX:+UseCompressedOops.
-+ // class can take zeveral instructions.
- //
- // The JVM98 app. _202_jess has a megamorphic interface call.
- // The itable code looks like this:
-- // Decoding VtableStub itbl[1]@12
-- // ldr w10, [x1,#8]
-- // lsl x10, x10, #3
-- // ldr w11, [x10,#280]
-- // add x11, x10, x11, uxtx #3
-- // add x11, x11, #0x1b8
-- // ldr x12, [x11]
-- // cmp x9, x12
-- // b.eq success
-- // loop:
-- // cbz x12, throw_icce
-- // add x11, x11, #0x10
-- // ldr x12, [x11]
-- // cmp x9, x12
-- // b.ne loop
-- // success:
-- // ldr x11, [x11,#8]
-- // ldr x12, [x10,x11]
-- // ldr x8, [x12,#72]
-- // br x8
-- // throw_icce:
-- // b throw_ICCE_entry
-+
-+ // ldr xmethod, [xscratch2,#CompiledICHolder::holder_klass_offset]
-+ // ldr x0, [xscratch2]
-+ // ldr w10, [x1,#oopDesc::klass_offset_in_bytes]
-+ // mov xheapbase, #0x3c000000 // #narrow_klass_base
-+ // movk xheapbase, #0x3f7, lsl #32
-+ // add x10, xheapbase, x10
-+ // mov xheapbase, #0xe7ff0000 // #heapbase
-+ // movk xheapbase, #0x3f7, lsl #32
-+ // ldr w11, [x10,#vtable_length_offset]
-+ // add x11, x10, x11, uxtx #3
-+ // add x11, x11, #itableMethodEntry::method_offset_in_bytes
-+ // ldr x10, [x11]
-+ // cmp xmethod, x10
-+ // b.eq found_method
-+ // search:
-+ // cbz x10, no_such_interface
-+ // add x11, x11, #0x10
-+ // ldr x10, [x11]
-+ // cmp xmethod, x10
-+ // b.ne search
-+ // found_method:
-+ // ldr w10, [x1,#oopDesc::klass_offset_in_bytes]
-+ // mov xheapbase, #0x3c000000 // #narrow_klass_base
-+ // movk xheapbase, #0x3f7, lsl #32
-+ // add x10, xheapbase, x10
-+ // mov xheapbase, #0xe7ff0000 // #heapbase
-+ // movk xheapbase, #0x3f7, lsl #32
-+ // ldr w11, [x10,#vtable_length_offset]
-+ // add x11, x10, x11, uxtx #3
-+ // add x11, x11, #itableMethodEntry::method_offset_in_bytes
-+ // add x10, x10, #itentry_off
-+ // ldr xmethod, [x11]
-+ // cmp x0, xmethod
-+ // b.eq found_method2
-+ // search2:
-+ // cbz xmethod, 0x000003ffa872e6cc
-+ // add x11, x11, #0x10
-+ // ldr xmethod, [x11]
-+ // cmp x0, xmethod
-+ // b.ne search2
-+ // found_method2:
-+ // ldr w11, [x11,#itableOffsetEntry::offset_offset_in_bytes]
-+ // ldr xmethod, [x10,w11,uxtw]
-+ // ldr xscratch1, [xmethod,#Method::from_compiled_offset]
-+ // br xscratch1
-+ // no_such_interface:
-+ // b throw_ICCE_entry
-
- }
-
diff --git a/JDK-8195859-vtableStubs-gtest-fails-after-8174962.patch
b/JDK-8195859-vtableStubs-gtest-fails-after-8174962.patch
deleted file mode 100644
index a4f588c..0000000
--- a/JDK-8195859-vtableStubs-gtest-fails-after-8174962.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-# HG changeset patch
-# User adinn
-# Date 1516891647 0
-# Thu Jan 25 14:47:27 2018 +0000
-# Node ID e321560ac819c05274c59f46f5cc28ccfd4b38ec
-# Parent 77baeab90732e7cfb6eb1b754a768a197bca1ab5
-8195859: AArch64: vtableStubs gtest fails after 8174962
-Summary: gtest vtableStubs introduced by 8174962 fails on AArch64 with an invalid insn
encoding
-Reviewed-by: duke
-
-diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
---- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
-+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
-@@ -1049,7 +1049,8 @@
- ldr(method_result, Address(method_result, vtable_offset_in_bytes));
- } else {
- vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
-- ldr(method_result, Address(recv_klass, vtable_offset_in_bytes));
-+ ldr(method_result,
-+ form_address(rscratch1, recv_klass, vtable_offset_in_bytes));
- }
- }
-
diff --git a/JDK-8196136-correct-register-use-8195685.patch
b/JDK-8196136-correct-register-use-8195685.patch
deleted file mode 100644
index dbdc223..0000000
--- a/JDK-8196136-correct-register-use-8195685.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-# HG changeset patch
-# User adinn
-# Date 1516881392 0
-# Thu Jan 25 11:56:32 2018 +0000
-# Node ID 51d97ee431ff04f126c436b25dc75de7e0d2d4dd
-# Parent 2da4a52715d837b639edcfe37c66e5428c023abd
-8196136: AArch64: Correct register use in patch for JDK-8195685
-Summary: itable stubs must not use java argument registers as scratch registers
-Reviewed-by: aph
-
-diff --git a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
---- a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
-+++ b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
-@@ -63,8 +63,8 @@
-
- #ifndef PRODUCT
- if (CountCompiledCalls) {
-- __ lea(r19, ExternalAddress((address)
SharedRuntime::nof_megamorphic_calls_addr()));
-- __ incrementw(Address(r19));
-+ __ lea(r16, ExternalAddress((address)
SharedRuntime::nof_megamorphic_calls_addr()));
-+ __ incrementw(Address(r16));
- }
- #endif
-
-@@ -73,13 +73,13 @@
-
- // get receiver klass
- address npe_addr = __ pc();
-- __ load_klass(r19, j_rarg0);
-+ __ load_klass(r16, j_rarg0);
-
- #ifndef PRODUCT
- if (DebugVtables) {
- Label L;
- // check offset vs vtable length
-- __ ldrw(rscratch1, Address(r19, Klass::vtable_length_offset()));
-+ __ ldrw(rscratch1, Address(r16, Klass::vtable_length_offset()));
- __ cmpw(rscratch1, vtable_index * vtableEntry::size());
- __ br(Assembler::GT, L);
- __ enter();
-@@ -91,7 +91,7 @@
- }
- #endif // PRODUCT
-
-- __ lookup_virtual_method(r19, vtable_index, rmethod);
-+ __ lookup_virtual_method(r16, vtable_index, rmethod);
-
- if (DebugVtables) {
- Label L;
-@@ -145,9 +145,9 @@
- // j_rarg0: Receiver
-
-
-- // Most registers are in use; we'll use r0, rmethod, r10, r11
-+ // Most registers are in use; we'll use r16, rmethod, r10, r11
- const Register recv_klass_reg = r10;
-- const Register holder_klass_reg = r0; // declaring interface klass (DECC)
-+ const Register holder_klass_reg = r16; // declaring interface klass (DECC)
- const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
- const Register temp_reg = r11;
- const Register icholder_reg = rscratch2;
diff --git a/JDK-8196221-mistake-in-8195859.patch b/JDK-8196221-mistake-in-8195859.patch
deleted file mode 100644
index d9975c9..0000000
--- a/JDK-8196221-mistake-in-8195859.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-# HG changeset patch
-# User adinn
-# Date 1516984701 0
-# Fri Jan 26 16:38:21 2018 +0000
-# Node ID 2c35f60ad26425a6d1dd1071e8a5adde79154fe3
-# Parent e2a7856edfbaccebd36bf02674e39b1a53867241
-8196221: AArch64: Mistake in committed patch for JDK-8195859
-Summary: The wrong patch was committed for JDK-8195859
-Reviewed-by: duke
-
-diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
---- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
-+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
-@@ -1050,7 +1050,7 @@
- } else {
- vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
- ldr(method_result,
-- form_address(rscratch1, recv_klass, vtable_offset_in_bytes));
-+ form_address(rscratch1, recv_klass, vtable_offset_in_bytes, 0));
- }
- }
-
diff --git a/JDK-8201495-s390-java-opts.patch b/JDK-8201495-s390-java-opts.patch
new file mode 100644
index 0000000..b3f90c7
--- /dev/null
+++ b/JDK-8201495-s390-java-opts.patch
@@ -0,0 +1,12 @@
+diff -up jdk9/common/autoconf/boot-jdk.m4 jdk9/common/autoconf/boot-jdk.m4
+--- jdk9/common/autoconf/boot-jdk.m4 16:01:27.000000000 -0400
++++ jdk9/common/autoconf/boot-jdk.m4 2014-05-21 11:50:36.507890197 -0400
+@@ -405,7 +405,7 @@
+ BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
+
+ # Maximum amount of heap memory and stack size.
+- JVM_HEAP_LIMIT_32="1024"
++ JVM_HEAP_LIMIT_32="768"
+ # Running a 64 bit JVM allows for and requires a bigger heap
+ JVM_HEAP_LIMIT_64="1600"
+ STACK_SIZE_32=768
diff --git a/PStack-808293.patch b/PStack-808293.patch
deleted file mode 100644
index 552984a..0000000
--- a/PStack-808293.patch
+++ /dev/null
@@ -1,40 +0,0 @@
----
jdk9/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06
02:26:33.322164601 +0200
-+++
jdk9/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06
02:26:57.958514071 +0200
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2012, Red Hat Inc.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
-@@ -84,7 +85,8 @@
- out.print("----------------- ");
- out.print(th);
- out.println(" -----------------");
-- while (f != null) {
-+ int maxStack = 256;
-+ while (f != null && maxStack-- > 0) {
- ClosestSymbol sym = f.closestSymbolToPC();
- Address pc = f.pc();
- out.print(pc + "\t");
-@@ -158,10 +160,19 @@
- }
- }
- }
-+ Address oldPC = f.pc();
-+ Address oldFP = f.localVariableBase();
- f = f.sender(th);
-+ if (f != null
-+ && oldPC.equals(f.pc())
-+ && oldFP.equals(f.localVariableBase())) {
-+ // We didn't make any progress
-+ f = null;
-+ }
- }
- } catch (Exception exp) {
-- exp.printStackTrace();
-+ // exp.printStackTrace();
-+ out.println("bad stack: " + exp);
- // continue, may be we can do a better job for other threads
- }
- if (concurrentLocks) {
diff --git a/hotspot-min-max-macros.patch b/hotspot-min-max-macros.patch
deleted file mode 100644
index 477f82a..0000000
--- a/hotspot-min-max-macros.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -r b515beb3b4ad jdk9/hotspot/src/share/vm/utilities/globalDefinitions.hpp
---- jdk9/hotspot/src/share/vm/utilities/globalDefinitions.hpp Thu Jul 07 18:40:53 2016
+0100
-+++ jdk9/hotspot/src/share/vm/utilities/globalDefinitions.hpp Tue Jul 12 19:13:51 2016
+0100
-@@ -1163,8 +1163,10 @@
- #undef min
- #endif
-
-+#ifndef _GLIBCXX_STDLIB_H
- #define max(a,b) Do_not_use_max_use_MAX2_instead
- #define min(a,b) Do_not_use_min_use_MIN2_instead
-+#endif
-
- // It is necessary to use templates here. Having normal overloaded
- // functions does not work because it is necessary to provide both 32-
diff --git a/java-1.9.0-openjdk-s390-java-opts.patch
b/java-1.9.0-openjdk-s390-java-opts.patch
deleted file mode 100644
index a09aa9a..0000000
--- a/java-1.9.0-openjdk-s390-java-opts.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up jdk9/common/autoconf/boot-jdk.m4 jdk9/common/autoconf/boot-jdk.m4
---- jdk9/common/autoconf/boot-jdk.m4 16:01:27.000000000 -0400
-+++ jdk9/common/autoconf/boot-jdk.m4 2014-05-21 11:50:36.507890197 -0400
-@@ -315,12 +315,12 @@
- fi
-
- # Minimum amount of heap memory.
-- ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
-+ ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs,[$JAVA])
- if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test
"x$OPENJDK_TARGET_CPU" = "xppc64" ; then
- # Why does macosx need more heap? Its the huge JDK batch.
- ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
- else
-- ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
-+ ADD_JVM_ARG_IF_OK([-Xmx768M],boot_jdk_jvmargs,[$JAVA])
- fi
- # When is adding -client something that speeds up the JVM?
- # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
-
diff --git a/java-1.9.0-openjdk-size_t.patch b/java-1.9.0-openjdk-size_t.patch
deleted file mode 100644
index 9ca29a9..0000000
--- a/java-1.9.0-openjdk-size_t.patch
+++ /dev/null
@@ -1,307 +0,0 @@
-diff -ruN
jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
----
jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2014-07-30
06:51:43.000000000 -0400
-+++
jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2014-09-04
22:47:14.059845388 -0400
-@@ -2686,7 +2686,7 @@
- if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
- size_t multiple =
_num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
- n_blks += CMSOldPLABReactivityFactor*multiple*n_blks;
-- n_blks = MIN2(n_blks, CMSOldPLABMax);
-+ n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax);
- }
- assert(n_blks > 0, "Error");
- _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
-diff -ruN
jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
----
jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2014-07-30
06:51:43.000000000 -0400
-+++
jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2014-09-04
22:47:14.061845394 -0400
-@@ -950,7 +950,7 @@
- if (free_percentage < desired_free_percentage) {
- size_t desired_capacity = (size_t)(used() / ((double) 1 -
desired_free_percentage));
- assert(desired_capacity >= capacity(), "invalid expansion size");
-- size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
-+ size_t expand_bytes = MAX2(desired_capacity - capacity(),
(size_t)MinHeapDeltaBytes);
- if (PrintGCDetails && Verbose) {
- size_t desired_capacity = (size_t)(used() / ((double) 1 -
desired_free_percentage));
- gclog_or_tty->print_cr("\nFrom compute_new_size: ");
-@@ -6559,7 +6559,7 @@
- HeapWord* curAddr = _markBitMap.startWord();
- while (curAddr < _markBitMap.endWord()) {
- size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr);
-- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
-+ MemRegion chunk(curAddr, MIN2((size_t)CMSBitMapYieldQuantum, remaining));
- _markBitMap.clear_large_range(chunk);
- if (ConcurrentMarkSweepThread::should_yield() &&
- !foregroundGCIsActive() &&
-@@ -6858,7 +6858,7 @@
- return;
- }
- // Double capacity if possible
-- size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
-+ size_t new_capacity = MIN2(_capacity*2, (size_t)MarkStackSizeMax);
- // Do not give up existing stack until we have managed to
- // get the double capacity that we desired.
- ReservedSpace rs(ReservedSpace::allocation_align_size_up(
-diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2014-07-30
06:51:43.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2014-09-04
22:47:14.063845410 -0400
-@@ -3767,7 +3767,7 @@
- // of things to do) or totally (at the very end).
- size_t target_size;
- if (partially) {
-- target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
-+ target_size = MIN2((size_t)(_task_queue->max_elems()/3), (size_t)
GCDrainStackTargetSize);
- } else {
- target_size = 0;
- }
-@@ -4605,7 +4605,7 @@
- // The > 0 check is to deal with the prev and next live bytes which
- // could be 0.
- if (*hum_bytes > 0) {
-- bytes = MIN2(HeapRegion::GrainBytes, *hum_bytes);
-+ bytes = MIN2(HeapRegion::GrainBytes, (size_t)*hum_bytes);
- *hum_bytes -= bytes;
- }
- return bytes;
-diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-07-30
06:51:43.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-09-04
22:47:14.065845427 -0400
-@@ -1730,7 +1730,7 @@
-
- verify_region_sets_optional();
-
-- size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes);
-+ size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes);
- ergo_verbose1(ErgoHeapSizing,
- "attempt heap expansion",
- ergo_format_reason("allocation request failed")
-diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2014-07-30
06:51:43.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2014-09-04
22:47:14.065845427 -0400
-@@ -160,7 +160,7 @@
- if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
- size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
- region_size = MAX2(average_heap_size / TARGET_REGION_NUMBER,
-- (uintx) MIN_REGION_SIZE);
-+ (size_t) MIN_REGION_SIZE);
- }
-
- int region_size_log = log2_long((jlong) region_size);
-diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
----
jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2014-07-30
06:51:43.000000000 -0400
-+++
jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2014-09-04
22:47:14.067845443 -0400
-@@ -71,7 +71,7 @@
- if (_virtual_space != NULL &&
_virtual_space->expand_by(_reserved_byte_size)) {
- _region_start = covered_region.start();
- _region_size = covered_region.word_size();
-- idx_t* map = (idx_t*)_virtual_space->reserved_low_addr();
-+ BitMap::bm_word_t* map =
(BitMap::bm_word_t*)_virtual_space->reserved_low_addr();
- _beg_bits.set_map(map);
- _beg_bits.set_size(bits / 2);
- _end_bits.set_map(map + words / 2);
-diff -ruN
jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
----
jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2014-07-30
06:51:43.000000000 -0400
-+++
jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2014-09-04
22:47:14.068845451 -0400
-@@ -910,8 +910,8 @@
- void PSParallelCompact::initialize_dead_wood_limiter()
- {
- const size_t max = 100;
-- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
-- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-+ _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0;
-+ _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
- _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
- DEBUG_ONLY(_dwl_initialized = true;)
- _dwl_adjustment = normal_distribution(1.0);
-diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2014-07-30
06:51:43.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2014-09-04
22:47:14.068845451 -0400
-@@ -194,7 +194,7 @@
- const size_t num_overflow_elems = of_stack->size();
- const size_t space_available = queue->max_elems() - queue->size();
- const size_t num_take_elems = MIN3(space_available / 4,
-- ParGCDesiredObjsFromOverflowList,
-+ (size_t)ParGCDesiredObjsFromOverflowList,
- num_overflow_elems);
- // Transfer the most recent num_take_elems from the overflow
- // stack to our work queue.
-diff -ruN jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp
jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp
---- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2014-07-30 06:51:43.000000000
-0400
-+++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2014-09-04 22:55:49.271922585
-0400
-@@ -389,7 +389,7 @@
- uintx calculated_size = NewSize + OldSize;
- double shrink_factor = (double) MaxHeapSize / calculated_size;
- uintx smaller_new_size = align_size_down((uintx)(NewSize * shrink_factor),
_gen_alignment);
-- FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(),
smaller_new_size));
-+ FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(),
(size_t)smaller_new_size));
- _initial_gen0_size = NewSize;
-
- // OldSize is already aligned because above we aligned MaxHeapSize to
-@@ -437,7 +437,7 @@
- // yield a size that is too small) and bound it by MaxNewSize above.
- // Ergonomics plays here by previously calculating the desired
- // NewSize and MaxNewSize.
-- max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
-+ max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize);
- }
- assert(max_new_size > 0, "All paths should set max_new_size");
-
-@@ -459,23 +459,23 @@
- // lower limit.
- _min_gen0_size = NewSize;
- desired_new_size = NewSize;
-- max_new_size = MAX2(max_new_size, NewSize);
-+ max_new_size = MAX2(max_new_size, (size_t)NewSize);
- } else if (FLAG_IS_ERGO(NewSize)) {
- // If NewSize is set ergonomically, we should use it as a lower
- // limit, but use NewRatio to calculate the initial size.
- _min_gen0_size = NewSize;
- desired_new_size =
-- MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
-- max_new_size = MAX2(max_new_size, NewSize);
-+ MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
-+ max_new_size = MAX2(max_new_size, (size_t)NewSize);
- } else {
- // For the case where NewSize is the default, use NewRatio
- // to size the minimum and initial generation sizes.
- // Use the default NewSize as the floor for these values. If
- // NewRatio is overly large, the resulting sizes can be too
- // small.
-- _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
-+ _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size),
(size_t)NewSize);
- desired_new_size =
-- MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
-+ MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
- }
-
- assert(_min_gen0_size > 0, "Sanity check");
-@@ -577,7 +577,7 @@
- } else {
- // It's been explicitly set on the command line. Use the
- // OldSize and then determine the consequences.
-- _min_gen1_size = MIN2(OldSize, _min_heap_byte_size - _min_gen0_size);
-+ _min_gen1_size = MIN2((size_t)OldSize, _min_heap_byte_size - _min_gen0_size);
- _initial_gen1_size = OldSize;
-
- // If the user has explicitly set an OldSize that is inconsistent
-diff -ruN jdk8/hotspot/src/share/vm/memory/metaspace.cpp
jdk8/hotspot/src/share/vm/memory/metaspace.cpp
---- jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2014-07-30 06:51:43.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2014-09-04 22:47:14.071845475 -0400
-@@ -1431,7 +1431,7 @@
-
- void MetaspaceGC::post_initialize() {
- // Reset the high-water mark once the VM initialization is done.
-- _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
-+ _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize);
- }
-
- bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
-@@ -1491,7 +1491,7 @@
- (size_t)MIN2(min_tmp, double(max_uintx));
- // Don't shrink less than the initial generation size
- minimum_desired_capacity = MAX2(minimum_desired_capacity,
-- MetaspaceSize);
-+ (size_t)MetaspaceSize);
-
- if (PrintGCDetails && Verbose) {
- gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
-@@ -1546,7 +1546,7 @@
- const double max_tmp = used_after_gc / minimum_used_percentage;
- size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
- maximum_desired_capacity = MAX2(maximum_desired_capacity,
-- MetaspaceSize);
-+ (size_t)MetaspaceSize);
- if (PrintGCDetails && Verbose) {
- gclog_or_tty->print_cr(" "
- " maximum_free_percentage: %6.2f"
-@@ -3197,7 +3197,7 @@
- // on the medium chunk list. The next chunk will be small and progress
- // from there. This size calculated by -version.
- _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
-- (CompressedClassSpaceSize/BytesPerWord)*2);
-+
(size_t)(CompressedClassSpaceSize/BytesPerWord)*2);
- _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
- // Arbitrarily set the initial virtual space to a multiple
- // of the boot class loader size.
-diff -ruN jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
---- jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp 2014-07-30 06:51:43.000000000
-0400
-+++ jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp 2014-09-04 22:47:14.071845475
-0400
-@@ -48,7 +48,7 @@
- const size_t beg_index = size_t(index);
- assert(beg_index < len || len == 0, "index too large");
-
-- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
-+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
- const size_t end_index = beg_index + stride;
- T* const base = (T*)a->base();
- T* const beg = base + beg_index;
-@@ -82,7 +82,7 @@
- const size_t beg_index = size_t(index);
- assert(beg_index < len || len == 0, "index too large");
-
-- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
-+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
- const size_t end_index = beg_index + stride;
- T* const base = (T*)a->base();
- T* const beg = base + beg_index;
-diff -ruN jdk8/hotspot/src/share/vm/runtime/arguments.cpp
jdk8/hotspot/src/share/vm/runtime/arguments.cpp
---- jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2014-07-30 06:51:43.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2014-09-04 22:47:14.072845483 -0400
-@@ -1244,7 +1244,7 @@
- // NewSize was set on the command line and it is larger than
- // preferred_max_new_size.
- if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line
-- FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
-+ FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t)NewSize, preferred_max_new_size));
- } else {
- FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
- }
-@@ -1269,8 +1269,8 @@
- // Unless explicitly requested otherwise, make young gen
- // at least min_new, and at most preferred_max_new_size.
- if (FLAG_IS_DEFAULT(NewSize)) {
-- FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
-- FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
-+ FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t)NewSize, min_new));
-+ FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize));
- if (PrintGCDetails && Verbose) {
- // Too early to use gclog_or_tty
- tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
-@@ -1280,7 +1280,7 @@
- // so it's NewRatio x of NewSize.
- if (FLAG_IS_DEFAULT(OldSize)) {
- if (max_heap > NewSize) {
-- FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize));
-+ FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap -
NewSize));
- if (PrintGCDetails && Verbose) {
- // Too early to use gclog_or_tty
- tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
-@@ -1401,7 +1401,7 @@
- return true;
- }
-
--uintx Arguments::max_heap_for_compressed_oops() {
-+size_t Arguments::max_heap_for_compressed_oops() {
- // Avoid sign flip.
- assert(OopEncodingHeapMax > (uint64_t)os::vm_page_size(), "Unusual page
size");
- // We need to fit both the NULL page and the heap into the memory budget, while
---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp 2014-06-12
03:58:35.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp 2014-06-12
03:58:35.000000000 -0400
-@@ -38,7 +38,7 @@
- _cancel(false),
- _empty(true),
- _dropped(0) {
-- _nqueues = MAX2(ParallelGCThreads, (size_t)1);
-+ _nqueues = MAX2(ParallelGCThreads, (uintx)1);
- _queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
- for (size_t i = 0; i < _nqueues; i++) {
- new (_queues + i)
G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(),
_max_cache_size, _max_size);
---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp 2014-06-12
03:58:35.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp 2014-06-12
03:58:35.000000000 -0400
-@@ -110,7 +110,7 @@
- };
-
- G1StringDedupEntryCache::G1StringDedupEntryCache() {
-- _nlists = MAX2(ParallelGCThreads, (size_t)1);
-+ _nlists = MAX2(ParallelGCThreads, (uintx)1);
- _lists = PaddedArray<G1StringDedupEntryFreeList,
mtGC>::create_unfreeable((uint)_nlists);
- }
-
diff --git a/java-9-openjdk-size_t.patch b/java-9-openjdk-size_t.patch
new file mode 100644
index 0000000..d8f6e65
--- /dev/null
+++ b/java-9-openjdk-size_t.patch
@@ -0,0 +1,143 @@
+diff --git openjdk/hotspot/src/share/vm/code/codeCache.cpp
openjdk/hotspot/src/share/vm/code/codeCache.cpp
+--- openjdk/hotspot/src/share/vm/code/codeCache.cpp
++++ openjdk/hotspot/src/share/vm/code/codeCache.cpp
+@@ -318,7 +318,7 @@ size_t CodeCache::heap_alignment() {
+ ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) {
+ // Determine alignment
+ const size_t page_size = os::can_execute_large_page_memory() ?
+- MIN2(os::page_size_for_region_aligned(InitialCodeCacheSize, 8),
++ MIN2(os::page_size_for_region_aligned((size_t)InitialCodeCacheSize, 8),
+ os::page_size_for_region_aligned(size, 8)) :
+ os::vm_page_size();
+ const size_t granularity = os::vm_allocation_granularity();
+@@ -410,7 +410,7 @@ void CodeCache::add_heap(ReservedSpace rs, const char* name, int
code_blob_type)
+ add_heap(heap);
+
+ // Reserve Space
+- size_t size_initial = MIN2(InitialCodeCacheSize, rs.size());
++ size_t size_initial = MIN2((size_t)InitialCodeCacheSize, rs.size());
+ size_initial = round_to(size_initial, os::vm_page_size());
+ if (!heap->reserve(rs, size_initial, CodeCacheSegmentSize)) {
+ vm_exit_during_initialization("Could not reserve enough space for code
cache");
+diff --git openjdk/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
openjdk/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
+--- openjdk/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
++++ openjdk/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
+@@ -197,7 +197,7 @@ bool ParScanThreadState::take_from_overflow_stack() {
+ const size_t num_overflow_elems = of_stack->size();
+ const size_t space_available = queue->max_elems() - queue->size();
+ const size_t num_take_elems = MIN3(space_available / 4,
+- ParGCDesiredObjsFromOverflowList,
++ (size_t)ParGCDesiredObjsFromOverflowList,
+ num_overflow_elems);
+ // Transfer the most recent num_take_elems from the overflow
+ // stack to our work queue.
+diff --git openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
+--- openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
++++ openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
+@@ -2458,7 +2458,7 @@ void G1CMTask::drain_local_queue(bool partially) {
+ // of things to do) or totally (at the very end).
+ size_t target_size;
+ if (partially) {
+- target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
++ target_size = MIN2((size_t)_task_queue->max_elems()/3,
(size_t)GCDrainStackTargetSize);
+ } else {
+ target_size = 0;
+ }
+diff --git openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp
openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp
+--- openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp
++++ openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp
+@@ -41,7 +41,7 @@ void G1CMObjArrayProcessor::push_array_slice(HeapWord* what) {
+ }
+
+ size_t G1CMObjArrayProcessor::process_array_slice(objArrayOop obj, HeapWord* start_from,
size_t remaining) {
+- size_t words_to_scan = MIN2(remaining, ObjArrayMarkingStride);
++ size_t words_to_scan = MIN2(remaining, (size_t)ObjArrayMarkingStride);
+
+ if (remaining > ObjArrayMarkingStride) {
+ push_array_slice(start_from + ObjArrayMarkingStride);
+diff --git openjdk/hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp
openjdk/hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp
+--- openjdk/hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp
++++ openjdk/hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp
+@@ -99,7 +99,7 @@ size_t G1PageBasedVirtualSpace::uncommitted_size() const {
+ return reserved_size() - committed_size();
+ }
+
+-size_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
++uintptr_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
+ return (addr - _low_boundary) / _page_size;
+ }
+
+diff --git openjdk/hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp
openjdk/hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp
+--- openjdk/hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp
++++ openjdk/hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp
+@@ -119,7 +119,7 @@ inline void oop_pc_follow_contents_specialized(objArrayOop obj, int
index, ParCo
+ const size_t beg_index = size_t(index);
+ assert(beg_index < len || len == 0, "index too large");
+
+- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
++ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
+ const size_t end_index = beg_index + stride;
+ T* const base = (T*)obj->base();
+ T* const beg = base + beg_index;
+diff --git openjdk/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
openjdk/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
+--- openjdk/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
++++ openjdk/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
+@@ -905,8 +905,8 @@ void PSParallelCompact::initialize_space_info()
+ void PSParallelCompact::initialize_dead_wood_limiter()
+ {
+ const size_t max = 100;
+- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
+- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
++ _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0;
++ _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
+ _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
+ DEBUG_ONLY(_dwl_initialized = true;)
+ _dwl_adjustment = normal_distribution(1.0);
+diff --git openjdk/hotspot/src/share/vm/gc/shared/plab.cpp
openjdk/hotspot/src/share/vm/gc/shared/plab.cpp
+--- openjdk/hotspot/src/share/vm/gc/shared/plab.cpp
++++ openjdk/hotspot/src/share/vm/gc/shared/plab.cpp
+@@ -32,7 +32,7 @@
+
+ size_t PLAB::min_size() {
+ // Make sure that we return something that is larger than AlignmentReserve
+- return align_object_size(MAX2(MinTLABSize / HeapWordSize,
(uintx)oopDesc::header_size())) + AlignmentReserve;
++ return align_object_size(MAX2(MinTLABSize / HeapWordSize,
(size_t)oopDesc::header_size())) + AlignmentReserve;
+ }
+
+ size_t PLAB::max_size() {
+diff --git openjdk/hotspot/src/share/vm/prims/whitebox.cpp
openjdk/hotspot/src/share/vm/prims/whitebox.cpp
+--- openjdk/hotspot/src/share/vm/prims/whitebox.cpp
++++ openjdk/hotspot/src/share/vm/prims/whitebox.cpp
+@@ -1022,7 +1022,7 @@ WB_ENTRY(jobject, WB_GetUint64VMFlag(JNIEnv* env, jobject o,
jstring name))
+ WB_END
+
+ WB_ENTRY(jobject, WB_GetSizeTVMFlag(JNIEnv* env, jobject o, jstring name))
+- uintx result;
++ size_t result;
+ if (GetVMFlag <size_t> (thread, env, name, &result,
&CommandLineFlags::size_tAt)) {
+ ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI
+ return longBox(thread, env, result);
+diff --git openjdk/hotspot/src/share/vm/runtime/arguments.cpp
openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+@@ -1489,7 +1489,7 @@ void Arguments::set_tiered_flags() {
+ // Increase the code cache size - tiered compiles a lot more.
+ if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
+ FLAG_SET_ERGO(uintx, ReservedCodeCacheSize,
+- MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
++ MIN2(CODE_CACHE_DEFAULT_LIMIT, (size_t)(ReservedCodeCacheSize * 5)));
+ }
+ // Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize
>= 240M
+ if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M)
{
+diff --git openjdk/hotspot/src/share/vm/runtime/arguments.hpp
openjdk/hotspot/src/share/vm/runtime/arguments.hpp
+--- openjdk/hotspot/src/share/vm/runtime/arguments.hpp
++++ openjdk/hotspot/src/share/vm/runtime/arguments.hpp
+@@ -416,7 +416,7 @@ class Arguments : AllStatic {
+ // Value of the conservative maximum heap alignment needed
+ static size_t _conservative_max_heap_alignment;
+
+- static uintx _min_heap_size;
++ static size_t _min_heap_size;
+
+ // -Xrun arguments
+ static AgentLibraryList _libraryList;
diff --git a/java-9-openjdk.spec b/java-9-openjdk.spec
index 3747a40..8f412dd 100644
--- a/java-9-openjdk.spec
+++ b/java-9-openjdk.spec
@@ -146,7 +146,7 @@
# Standard JPackage naming and versioning defines.
%global origin openjdk
%global minorver 0
-%global buildver 11
+%global buildver 12
# priority must be 7 digits in total
#setting to 1, so debug ones can have 0
%global priority 00000%{minorver}1
@@ -853,7 +853,7 @@ Provides: java-%{javaver}-%{origin}-accessiblity =
%{epoch}:%{version}-%{release
Name: java-%{majorver}-%{origin}
Version: %{newjavaver}.%{buildver}
-Release: 5%{?dist}
+Release: 7%{?dist}
# java-1.5.0-ibm from
jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@@ -903,49 +903,32 @@ Source13: TestCryptoLevel.java
# Ensure ECDSA is working
Source14: TestECDSA.java
+#
# RPM/distribution specific patches
+#
+
+Patch1000: enableCommentedOutSystemNss.patch
# Ignore AWTError when assistive technologies are loaded
-Patch1: accessible-toolkit.patch
+Patch1: accessible-toolkit.patch
# Restrict access to java-atk-wrapper classes
-Patch3: java-atk-wrapper-security.patch
-# RHBZ 808293
-Patch4: PStack-808293.patch
-# Allow multiple initialization of PKCS11 libraries
-Patch5: multiple-pkcs11-library-init.patch
-Patch12: removeSunEcProvider-RH1154143.patch
-Patch13: libjpeg-turbo-1.4-compat.patch
+Patch2: java-atk-wrapper-security.patch
+Patch3: system-nss-ec-rh1537049.patch
+Patch4: libjpeg-turbo-1.4-compat.patch
#
# OpenJDK specific patches
#
-# JVM heap size changes for s390 (thanks to aph)
-Patch100: java-1.9.0-openjdk-s390-java-opts.patch
+Patch100: JDK-8201495-s390-java-opts.patch
+# See JDK-8198844. This won't be needed any more in
+# JDK 11+
Patch101: sorted-diff.patch
# Type fixing for s390
-Patch102: java-1.9.0-openjdk-size_t.patch
-Patch103: hotspot-min-max-macros.patch
-Patch104: bootcycle_jobs.patch
-
-#Patch300: jstack-pr1845.patch
+Patch102: java-9-openjdk-size_t.patch
+Patch103: bootcycle_jobs.patch
-Patch400: ppc_stack_overflow_fix.patch
-Patch401: aarch64BuildFailure.patch
-
-# Fix AArch64 build issues which got introduced with 9.0.4+11 (January 2018 CPU)
-#
-# JDK-8195685 AArch64 cannot build with JDK-8174962
-# JDK-8196136 AArch64: Correct register use in patch for JDK-8195685
-# JDK-8195859 AArch64: vtableStubs gtest fails after 8174962
-# JDK-8196221 AArch64: Mistake in committed patch for JDK-8195859
-Patch402: JDK-8195685-cannot-build-with-8174962.patch
-Patch403: JDK-8196136-correct-register-use-8195685.patch
-Patch404: JDK-8195859-vtableStubs-gtest-fails-after-8174962.patch
-Patch405: JDK-8196221-mistake-in-8195859.patch
-
-# Non-OpenJDK fixes
-Patch1000: enableCommentedOutSystemNss.patch
+Patch400: aarch64BuildFailure.patch
BuildRequires: autoconf
BuildRequires: automake
@@ -1230,34 +1213,16 @@ cp %{SOURCE2} .
pushd openjdk
sh %{SOURCE12}
%patch1 -p1
+%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
-%patch12 -p1
-%patch13 -p1
-# s390 build fixes
-%ifarch s390
%patch100 -p1
-%patch102 -p1
-%endif
-
%patch101 -p1
-#%patch103 -p1
-%patch104 -p1
+%patch102 -p1
+%patch103 -p1
-# Zero PPC fixes.
-# TODO: propose them upstream
%patch400 -p1
-
-%patch401 -p1
-pushd hotspot
-%patch402 -p1
-%patch403 -p1
-%patch404 -p1
-%patch405 -p1
-popd
-
popd # openjdk
%patch1000
@@ -1841,6 +1806,20 @@ require "copy_jdk_configs.lua"
%changelog
+* Tue Apr 17 2018 Severin Gehwolf <sgehwolf(a)redhat.com> - 1:9.0.4.11-7
+- Remove JDK-8195685, JDK-8196136, JDK-8195859, JDK-8196221
+ now upstream.
+- Replace java-1.9.0-openjdk-s390-java-opts.patch with
+ version from upstream. See JDK-8201495.
+- Remove multiple-pkcs11-library-init.patch, PStack-808293.patch
+ hotspot-min-max-macros.patch, jstack-pr1845.patch,
+ ppc_stack_overflow_fix.patch (see JDK-8201639) as they are
+ no longer needed.
+
+* Tue Apr 10 2018 Martin Balao <mbalao(a)redhat.com> - 1:9.0.4.11-6
+- deleted: removeSunEcProvider-RH1154143.patch
+- added: system-nss-ec-rh1537049.patch
+
* Fri Jan 26 2018 Severin Gehwolf <sgehwolf(a)redhat.com> - 1:9.0.4.11-4
- Update AArch64 patch series (3) from upstream which fix
FTBFS on AArch64 post-January CPU.
diff --git a/jstack-pr1845.patch b/jstack-pr1845.patch
deleted file mode 100644
index 5fd2c79..0000000
--- a/jstack-pr1845.patch
+++ /dev/null
@@ -1,274 +0,0 @@
-diff -r c728621e76f2 tapset/jstack.stp.in
---- tapset/jstack-9.stp.in Mon Jun 02 18:41:24 2014 +0100
-+++ tapset/jstack-9.stp.in Sat Jun 14 00:21:14 2014 +0900
-@@ -45,11 +45,7 @@
- semantic error: failed to retrieve location attribute for local
- */
-
--global Universe_methodKlassObj;
--global Universe_collectedHeap;
--global HeapWordSize;
- global CodeCache_heap;
--global NarrowOopStruct;
-
- global sp_register;
- global fp_register;
-@@ -57,9 +53,8 @@
- global ptr_size;
- global ptr_mask;
-
--global constantPoolOopDesc_size;
-+global constantPool_size;
- global HeapBlock_Header_size;
--global oopDesc_size;
-
- global vm_inited;
-
-@@ -67,26 +62,6 @@
- in a bare function and vm_init_end seems a good place to use. */
- probe hotspot.vm_init_end
- {
-- // The parent/type oop for a methodOop.
-- Universe_methodKlassObj[pid()] = %( systemtap_v >= "1.8"
-- %? @var("_methodKlassObj(a)universe.cpp")
-- %: $_methodKlassObj %);
--
-- /**
-- * The Universe class holds some of the interesting statics for
-- * introspection into HotSpot. The CollectedHeap
-- * (Universe::_collectedHeap) is an abstraction of a java heap for Hotspot
-- * it contains a _reserved MemRegion which represents a contigous
-- * region of the address space consisting of HeapWords (which just
-- * have one field member char *i).
-- *
-- * Note that we access it through its "short name" _collectedHeap.
-- */
-- Universe_collectedHeap[pid()] = %( systemtap_v >= "1.8"
-- %? @var("_collectedHeap(a)universe.cpp")
-- %: $_collectedHeap %);
-- HeapWordSize[pid()] = $HeapWordSize;
--
- /**
- * The CodeCache class contains the static CodeHeap _heap that
- * is malloced at the start of the vm run and holds all generated
-@@ -107,17 +82,6 @@
- %? @var("_heap(a)codeCache.cpp")
- %: $_heap %);
-
-- /**
-- * Does target process use CompressedOops ?
-- */
-- NarrowOopStruct[pid()] = 0;
-- %( systemtap_v >= "1.8"
-- %? if (@var("UseCompressedOops(a)globals.cpp"))
-- NarrowOopStruct[pid()] = &@var("_narrow_oop(a)universe.cpp");
-- %: if($UseCompressedOops)
-- NarrowOopStruct[pid()] = $_narrow_oop;
-- %)
--
- // Should really check arch of user space (for 32bit jvm on 64bit kernel).
- %( arch == "i386" %?
- sp_register = "esp";
-@@ -136,22 +100,17 @@
-
- // Pretend we have an array at address zero and take address of second
- // element and we have the size.
-- constantPoolOopDesc_size = &@cast(0, "constantPoolOopDesc")[1];
-+ constantPool_size = &@cast(0, "ConstantPool")[1];
-
- // Really should get from dwarf: @size("HeapBlock::Header"),
@size("oopDesc")
- HeapBlock_Header_size = 2 * ptr_size;
-- oopDesc_size = 2 * ptr_size;
-
- vm_inited[pid()] = 1;
- }
-
- probe hotspot.vm_shutdown
- {
-- delete(Universe_methodKlassObj[pid()]);
-- delete(Universe_collectedHeap[pid()]);
-- delete(HeapWordSize[pid()]);
- delete(CodeCache_heap[pid()]);
-- delete(NarrowOopStruct[pid()]);
- delete(vm_inited[pid()]);
- }
-
-@@ -262,15 +221,7 @@
- return frame;
- }
-
-- // Extract heap and code bounds.
-- heap_start = @cast(Universe_collectedHeap[pid()],
-- "CollectedHeap",
-- "@ABS_SERVER_LIBJVM_SO@")->_reserved->_start;
-- heap_size = HeapWordSize[pid()] * @cast(Universe_collectedHeap[pid()],
-- "CollectedHeap",
--
"@ABS_SERVER_LIBJVM_SO@")->_reserved->_word_size;
-- heap_end = heap_start + heap_size;
--
-+ // Extract code bounds.
- CodeCache_low = @cast(CodeCache_heap[pid()], "CodeHeap",
- "@ABS_SERVER_LIBJVM_SO@")->_memory->_low;
- CodeCache_high = @cast(CodeCache_heap[pid()], "CodeHeap",
-@@ -351,105 +302,69 @@
- // For the interpreter (and other code blobs) it is on the
- // stack relative to the frame pointer.
- if (blob_name == "nmethod")
-- methodOopPtr = @cast(blob, "nmethod",
-+ methodPtr = @cast(blob, "nmethod",
- "@ABS_SERVER_LIBJVM_SO@")->_method
- else
-- methodOopPtr = user_long(fp + (-3 * ptr_size)) & ptr_mask
--
-- // Start optimistic. A methodOop is only valid if it was
-- // heap allocated. And if the "type class" oop equals the
-- // Universe::methodKlassObj.
-- if (heap_start > methodOopPtr || methodOopPtr >= heap_end)
-- isMethodOop = 0
-- else
-- {
-- if (NarrowOopStruct[pid()])
-- {
-- methodOopKlass = @cast(methodOopPtr, "methodOopDesc",
--
"@ABS_SERVER_LIBJVM_SO@")->_metadata->_compressed_klass;
-- methodOopKlass = (@cast(NarrowOopStruct[pid()],
-- "NarrowOopStruct",
--
"@ABS_SERVER_LIBJVM_SO@")->_base
-- + (methodOopKlass
-- << @cast(NarrowOopStruct[pid()],
-- "NarrowOopStruct",
--
"@ABS_SERVER_LIBJVM_SO@")->_shift));
-- }
-- else
-- methodOopKlass = @cast(methodOopPtr, "methodOopDesc",
--
"@ABS_SERVER_LIBJVM_SO@")->_metadata->_klass;
-+ methodPtr = user_long(fp + (-3 * ptr_size)) & ptr_mask
-
-- isMethodOop = (methodOopKlass == Universe_methodKlassObj[pid()]);
-- }
-+ // The java class is the holder of the constants (strings)
-+ // that describe the method and signature. This constant pool
-+ // contains symbolic information that describe the properties
-+ // of the class. The indexes for methods and signaturates in
-+ // the constant pool are Symbols that contain utf8
-+ // strings (plus lenghts). (We could also sanity check that
-+ // the tag value is correct [CONSTANT_String = 8]).
-+ // Note that the class name uses '/' instead of '.' as
-+ // package name separator and that the method signature is
-+ // encoded as a method descriptor string. Both of which we
-+ // don't demangle here.
-+ constMethod = @cast(methodPtr, "Method",
-+
"@ABS_SERVER_LIBJVM_SO@")->_constMethod;
-+ constantPool = @cast(constMethod, "ConstMethod",
-+
"@ABS_SERVER_LIBJVM_SO@")->_constants;
-+ constantPool_base = constantPool + constantPool_size;
-+
-+ klass = @cast(constantPool, "ConstantPool",
-+ "@ABS_SERVER_LIBJVM_SO@")->_pool_holder;
-+ klassSymbol = @cast(klass, "Klass",
-+ "@ABS_SERVER_LIBJVM_SO@")->_name;
-+ klassName = &@cast(klassSymbol, "Symbol",
-+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
-+ klassLength = @cast(klassSymbol, "Symbol",
-+ "@ABS_SERVER_LIBJVM_SO@")->_length;
-+
-+ methodIndex = @cast(constMethod, "ConstMethod",
-+ "@ABS_SERVER_LIBJVM_SO@")->_name_index;
-+ methodSymbol = user_long(constantPool_base + (methodIndex * ptr_size));
-+ methodName = &@cast(methodSymbol, "Symbol",
-+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
-+ methodLength = @cast(methodSymbol, "Symbol",
-+ "@ABS_SERVER_LIBJVM_SO@")->_length;
-
-- if (isMethodOop)
-+ if (log_sig)
- {
-- // The java class is the holder of the constants (strings)
-- // that describe the method and signature. This constant pool
-- // contains symbolic information that describe the properties
-- // of the class. The indexes for methods and signaturates in
-- // the constant pool are Symbols that contain utf8
-- // strings (plus lenghts). (We could also sanity check that
-- // the tag value is correct [CONSTANT_String = 8]).
-- // Note that the class name uses '/' instead of '.'
as
-- // package name separator and that the method signature is
-- // encoded as a method descriptor string. Both of which we
-- // don't demangle here.
-- constantPoolOopDesc = @cast(methodOopPtr, "methodOopDesc",
--
"@ABS_SERVER_LIBJVM_SO@")->_constants;
-- constantPoolOop_base = constantPoolOopDesc +
constantPoolOopDesc_size;
--
-- klassPtr = @cast(constantPoolOopDesc,
"constantPoolOopDesc",
--
"@ABS_SERVER_LIBJVM_SO@")->_pool_holder;
-- klassSymbol = @cast(klassPtr + oopDesc_size, "Klass",
-- "@ABS_SERVER_LIBJVM_SO@")->_name;
-- klassName = &@cast(klassSymbol, "Symbol",
-- "@ABS_SERVER_LIBJVM_SO@")->_body[0];
-- klassLength = @cast(klassSymbol, "Symbol",
-- "@ABS_SERVER_LIBJVM_SO@")->_length;
--
-- methodIndex = @cast(methodOopPtr, "methodOopDesc",
--
"@ABS_SERVER_LIBJVM_SO@")->_constMethod->_name_index;
-- methodOopDesc = user_long(constantPoolOop_base + (methodIndex *
ptr_size)) - 1;
-- methodName = &@cast(methodOopDesc, "Symbol",
-- "@ABS_SERVER_LIBJVM_SO@")->_body[0];
-- methodLength = @cast(methodOopDesc, "Symbol",
-- "@ABS_SERVER_LIBJVM_SO@")->_length;
--
-- if (log_sig)
-- {
-- sigIndex = @cast(methodOopPtr, "methodOopDesc",
--
"@ABS_SERVER_LIBJVM_SO@")->_constMethod->_signature_index;
-- sigOopDesc = user_long(constantPoolOop_base
-- + (sigIndex * ptr_size)) - 1;
-- sigName = &@cast(sigOopDesc, "Symbol",
--
"@ABS_SERVER_LIBJVM_SO@")->_body[0];
-- sigLength = @cast(sigOopDesc, "Symbol",
--
"@ABS_SERVER_LIBJVM_SO@")->_length;
-- sig = user_string_n(sigName, sigLength);
-- }
-- else
-- sig = "";
--
-- code_name = (log_native
-- ? sprintf("<%s@0x%x>",
-- str_replace(blob_name, " ",
"_"), pc)
-- : "");
--
-- frame = sprintf("%s.%s%s%s",
-- user_string_n(klassName, klassLength),
-- user_string_n(methodName, methodLength),
-- sig, code_name);
-+ sigIndex = @cast(constMethod, "ConstMethod",
-+
"@ABS_SERVER_LIBJVM_SO@")->_signature_index;
-+ sigSymbol = user_long(constantPool_base
-+ + (sigIndex * ptr_size));
-+ sigName = &@cast(sigSymbol, "Symbol",
-+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
-+ sigLength = @cast(sigSymbol, "Symbol",
-+ "@ABS_SERVER_LIBJVM_SO@")->_length;
-+ sig = user_string_n(sigName, sigLength);
- }
- else
-- {
-- // This is probably just an internal function, not a java
-- // method, just print the blob_name and continue.
-- // fp is probably still trusted.
-- if (log_native)
-- frame = sprintf("<%s@0x%x>",
-- str_replace(blob_name, " ",
"_"), pc);
-- }
-+ sig = "";
-+
-+ code_name = (log_native
-+ ? sprintf("<%s@0x%x>",
-+ str_replace(blob_name, " ",
"_"), pc)
-+ : "");
-+
-+ frame = sprintf("%s.%s%s%s",
-+ user_string_n(klassName, klassLength),
-+ user_string_n(methodName, methodLength),
-+ sig, code_name);
-
- // We cannot trust the frame pointer of compiled methods.
- // The server (c2) jit compiler uses the fp register.
diff --git a/multiple-pkcs11-library-init.patch b/multiple-pkcs11-library-init.patch
deleted file mode 100644
index bf74ba2..0000000
--- a/multiple-pkcs11-library-init.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1352129932 0
-# Node ID e9c857dcb964dbfa5eef3a3590244cb4d999cf7a
-# Parent 1406789608b76d0906881979335d685855f44190
-Allow multiple PKCS11 library initialisation to be a non-critical error.
-
-diff -r 1406789608b7 -r e9c857dcb964 src/share/classes/sun/security/pkcs11/Config.java
---- jdk9/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java Tue
Oct 30 13:05:14 2012 +0000
-+++ jdk9/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java Mon
Nov 05 15:38:52 2012 +0000
-@@ -52,6 +52,7 @@
- static final int ERR_HALT = 1;
- static final int ERR_IGNORE_ALL = 2;
- static final int ERR_IGNORE_LIB = 3;
-+ static final int ERR_IGNORE_MULTI_INIT = 4;
-
- // same as allowSingleThreadedModules but controlled via a system property
- // and applied to all providers. if set to false, no SunPKCS11 instances
-@@ -980,6 +981,8 @@
- handleStartupErrors = ERR_IGNORE_LIB;
- } else if (val.equals("halt")) {
- handleStartupErrors = ERR_HALT;
-+ } else if (val.equals("ignoreMultipleInitialisation")) {
-+ handleStartupErrors = ERR_IGNORE_MULTI_INIT;
- } else {
- throw excToken("Invalid value for handleStartupErrors:");
- }
-diff -r 1406789608b7 -r e9c857dcb964
src/share/classes/sun/security/pkcs11/SunPKCS11.java
---- jdk9/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java
Tue Oct 30 13:05:14 2012 +0000
-+++ jdk9/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java
Mon Nov 05 15:38:52 2012 +0000
-@@ -168,26 +168,37 @@
- String nssLibraryDirectory = config.getNssLibraryDirectory();
- String nssSecmodDirectory = config.getNssSecmodDirectory();
- boolean nssOptimizeSpace = config.getNssOptimizeSpace();
-+ int errorHandling = config.getHandleStartupErrors();
-
- if (secmod.isInitialized()) {
- if (nssSecmodDirectory != null) {
- String s = secmod.getConfigDir();
- if ((s != null) &&
- (s.equals(nssSecmodDirectory) == false)) {
-- throw new ProviderException("Secmod directory "
-- + nssSecmodDirectory
-- + " invalid, NSS already initialized with "
-- + s);
-+ String msg = "Secmod directory " +
nssSecmodDirectory
-+ + " invalid, NSS already initialized with " +
s;
-+ if (errorHandling == Config.ERR_IGNORE_MULTI_INIT ||
-+ errorHandling == Config.ERR_IGNORE_ALL) {
-+ throw new UnsupportedOperationException(msg);
-+ } else {
-+ throw new ProviderException(msg);
-+ }
- }
- }
- if (nssLibraryDirectory != null) {
- String s = secmod.getLibDir();
- if ((s != null) &&
- (s.equals(nssLibraryDirectory) == false)) {
-- throw new ProviderException("NSS library directory
"
-+ String msg = "NSS library directory "
- + nssLibraryDirectory
- + " invalid, NSS already initialized with "
-- + s);
-+ + s;
-+ if (errorHandling == Config.ERR_IGNORE_MULTI_INIT ||
-+ errorHandling == Config.ERR_IGNORE_ALL) {
-+ throw new UnsupportedOperationException(msg);
-+ } else {
-+ throw new ProviderException(msg);
-+ }
- }
- }
- } else {
diff --git a/ppc_stack_overflow_fix.patch b/ppc_stack_overflow_fix.patch
deleted file mode 100644
index 483665c..0000000
--- a/ppc_stack_overflow_fix.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff --git a/src/cpu/zero/vm/stack_zero.hpp b/src/cpu/zero/vm/stack_zero.hpp
---- jdk9/hotspot/src/cpu/zero/vm/stack_zero.hpp
-+++ jdk9/hotspot/src/cpu/zero/vm/stack_zero.hpp
-@@ -99,7 +99,7 @@
- int shadow_pages_size() const {
- return _shadow_pages_size;
- }
-- int abi_stack_available(Thread *thread) const;
-+ ssize_t abi_stack_available(Thread *thread) const;
-
- public:
- void overflow_check(int required_words, TRAPS);
-diff --git a/src/cpu/zero/vm/stack_zero.inline.hpp
b/src/cpu/zero/vm/stack_zero.inline.hpp
---- jdk9/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
-+++ jdk9/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
-@@ -47,12 +47,12 @@
- // This method returns the amount of ABI stack available for us
- // to use under normal circumstances. Note that the returned
- // value can be negative.
--inline int ZeroStack::abi_stack_available(Thread *thread) const {
-+inline ssize_t ZeroStack::abi_stack_available(Thread *thread) const {
- guarantee(Thread::current() == thread, "should run in the same thread");
-- int stack_used = thread->stack_base() - (address) &stack_used
-+ ssize_t stack_used = thread->stack_base() - (address) &stack_used
- + (JavaThread::stack_guard_zone_size() + JavaThread::stack_shadow_zone_size());
-- int stack_free = thread->stack_size() - stack_used;
-+ ssize_t stack_free = thread->stack_size() - stack_used;
- return stack_free;
- }
-
- #endif // CPU_ZERO_VM_STACK_ZERO_INLINE_HPP
-diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
---- jdk9/hotspot/src/os/posix/vm/os_posix.cpp
-+++ jdk9/hotspot/src/os/posix/vm/os_posix.cpp
-@@ -4791,6 +4791,13 @@
- JavaThread::stack_shadow_zone_size();
-
- _java_thread_min_stack_allowed = align_size_up(_java_thread_min_stack_allowed,
vm_page_size());
-+#ifdef ZERO
-+ // If this is Zero, allow at the very minimum one page each for the
-+ // Zero stack and the native stack. This won't make any difference
-+ // for 4k pages, but is significant for large pages.
-+ _java_thread_min_stack_allowed = MAX2(_java_thread_min_stack_allowed,
-+
align_size_up((size_t)(JavaThread::stack_guard_zone_size()+JavaThread::stack_shadow_zone_size()+2)
* vm_page_size(), vm_page_size());
-+#endif
-
- size_t stack_size_in_bytes = ThreadStackSize * K;
- if (stack_size_in_bytes != 0 &&
diff --git a/sources b/sources
index f7375cd..ebbbe84 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (jdk-updates-jdk9u-jdk-9.0.4+11.tar.xz) =
88e07166a2b0b447489b0b33ae45da1184f57ee8ca108e2b9d2d356e00003111512f5b7af2d364219c6478ecede9e8bd5f9ee51669e8a73a7572b5451d075634
+SHA512 (jdk-updates-jdk9u-jdk-9.0.4+12.tar.xz) =
73e1d2a40e47bc4856d07b198e81b1215867f83fa74eb471eb77fd8fe5f8c133c12cf9b1c588e02e8845e0d5480c56c4f26ce0aef666557a04aca7c3200628ca
SHA512 (systemtap-tapset-3.6.0pre02.tar.xz) =
848f42ef7ca751e723fd50e3a6da14c0965ad4da37ea3331568658e27497b7a7e4b9aad3dedd264ad0bb5566c37a92302b905f10258a4e2c89dc4ba609e55481