From 42712cb78a052157ff4acde83b6a2091d790cc2d Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Mon, 22 Feb 2016 15:27:34 +0100 Subject: [PATCH] Sync with rhel 7.3 --- aarch64_FTBFS_rhbz_1307224.patch | 27 ------------ java-1.8.0-openjdk-s390-java-opts.patch | 55 +++++++++++++++++-------- java-1.8.0-openjdk-size_t.patch | 12 ------ java-1.8.0-openjdk.spec | 26 +++++++----- remove_aarch64_jvm.cfg_divergence.patch | 48 +++++++++++++++++++++ rh1300630.patch | 24 +++++++++++ s390-size_t_format_flags.patch | 2 +- 7 files changed, 125 insertions(+), 69 deletions(-) delete mode 100644 aarch64_FTBFS_rhbz_1307224.patch create mode 100644 remove_aarch64_jvm.cfg_divergence.patch create mode 100644 rh1300630.patch diff --git a/aarch64_FTBFS_rhbz_1307224.patch b/aarch64_FTBFS_rhbz_1307224.patch deleted file mode 100644 index 1a10f2c..0000000 --- a/aarch64_FTBFS_rhbz_1307224.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/java-1.8.0-openjdk-1.8.0.72-5.b15.fc24.x86_64/openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp -index ef50802..9d604d5 100644 ---- openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp -+++ openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp -@@ -194,10 +194,6 @@ static int reg2offset_out(VMReg r) { - return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size; - } - --template static const T& min (const T& a, const T& b) { -- return (a > b) ? b : a; --} -- - // --------------------------------------------------------------------------- - // Read the array of BasicTypes from a signature, and compute where the - // arguments should go. Values in the VMRegPair regs array refer to 4-byte -diff --git a/java-1.8.0-openjdk-1.8.0.72-6.b15.fc24.x86_64/openjdk/jdk/src/solaris/bin/aarch64/jvm.cfg b/java-1.8.0-openjdk-1.8.0.72-6.b15.fc24.x86_64/openjdk/jdk/src/solaris/bin/aarch64/jvm.cfg -index d20c3f4..17c4be3 100644 ---- openjdk/jdk/src/solaris/bin/aarch64/jvm.cfg -+++ openjdk/jdk/src/solaris/bin/aarch64/jvm.cfg -@@ -31,6 +31,5 @@ - # "-XXaltjvm=" option, but that too is unsupported - # and may not be available in a future release. - # ---client IF_SERVER_CLASS -server - -server KNOWN ---minimal KNOWN -+-client IGNORE diff --git a/java-1.8.0-openjdk-s390-java-opts.patch b/java-1.8.0-openjdk-s390-java-opts.patch index 3f0cf39..e2a4313 100644 --- a/java-1.8.0-openjdk-s390-java-opts.patch +++ b/java-1.8.0-openjdk-s390-java-opts.patch @@ -1,27 +1,46 @@ -diff -up jdk8/common/autoconf/boot-jdk.m4.s390 jdk8/common/autoconf/boot-jdk.m4 ---- jdk8/common/autoconf/boot-jdk.m4.s390 2016-02-16 16:18:10.000000000 +0100 -+++ jdk8/common/autoconf/boot-jdk.m4 2016-02-16 16:21:44.000000000 +0100 -@@ -329,21 +329,12 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_AR +--- openjdk.orig/common/autoconf/boot-jdk.m4 2016-01-21 18:33:47.586288044 +0000 ++++ openjdk/common/autoconf/boot-jdk.m4 2016-02-05 15:56:09.012242707 +0000 +@@ -1,5 +1,6 @@ + # + # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright 2014 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 +@@ -303,6 +323,9 @@ + + AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], + [ ++ # Ensure OPENJDK_TARGET_CPU_ARCH has been setup ++ AC_REQUIRE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET]) ++ + ############################################################################## + # + # Specify options for anything that is run with the Boot JDK. +@@ -325,16 +348,23 @@ + JAVA_FLAGS=$boot_jdk_jvmargs + AC_SUBST(JAVA_FLAGS) + +- AC_MSG_CHECKING([flags for boot jdk java command for big workloads]) # Starting amount of heap memory. - ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) -+ ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_big,[$JAVA]) ++ if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then ++ ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_big,[$JAVA]) ++ else ++ ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) ++ fi # Maximum amount of heap memory. # Maximum stack size. -- if test "x$BOOT_JDK_BITS" = x32; then + if test "x$BOOT_JDK_BITS" = x32; then - JVM_MAX_HEAP=1100M -+ JVM_MAX_HEAP=768M ++ if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then ++ JVM_MAX_HEAP=768M ++ else ++ JVM_MAX_HEAP=1100M ++ fi STACK_SIZE=768 -- else -- # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit -- # pointers are used. Apparently, we need to increase the heap and stack -- # space for the jvm. More specifically, when running javac to build huge -- # jdk batch -- JVM_MAX_HEAP=1600M -- STACK_SIZE=1536 -- fi - ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs_big,[$JAVA]) - ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA]) - ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs_big,[$JAVA]) + else + # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit diff --git a/java-1.8.0-openjdk-size_t.patch b/java-1.8.0-openjdk-size_t.patch index 406372a..c9c6b97 100644 --- a/java-1.8.0-openjdk-size_t.patch +++ b/java-1.8.0-openjdk-size_t.patch @@ -109,18 +109,6 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp.size_t jd } int region_size_log = log2_long((jlong) region_size); -diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t 2015-05-19 12:16:26.000000000 -0400 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2015-06-09 10:21:39.000000000 -0400 -@@ -833,7 +833,7 @@ OtherRegionsTable::do_cleanup_work(HRRSC - // This can be done by either mutator threads together with the - // concurrent refinement threads or GC threads. - uint HeapRegionRemSet::num_par_rem_sets() { -- return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (uint)ParallelGCThreads); -+ return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads); - } - - HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, diff -up jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp --- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t 2015-05-19 12:16:26.000000000 -0400 +++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2015-06-09 10:21:39.000000000 -0400 diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 5c2863b..e7a98f2 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -735,7 +735,7 @@ Obsoletes: java-1.7.0-openjdk-accessibility%1 Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 8.%{buildver}%{?dist} +Release: 9.%{buildver}%{?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 @@ -806,15 +806,18 @@ Patch511: rh1214835.patch Patch512: no_strict_overflow.patch # Arch-specific upstreamable patches -# JVM heap size changes for s390 (thanks to aph) +# PR2415: JVM -Xmx requirement is too high on s390 Patch100: %{name}-s390-java-opts.patch # Type fixing for s390 Patch102: %{name}-size_t.patch # Use "%z" for size_t on s390 as size_t != intptr_t Patch103: s390-size_t_format_flags.patch -# Remove unneccessary template definition in aarch64 -# sharedRuntime code. See RHBZ#1307224 -Patch104: aarch64_FTBFS_rhbz_1307224.patch + +# AArch64-specific upstreamable patches +# Revert 'Fixes to work around "missing 'client' JVM" error messages' and sync jvm.cfg with OpenJDK 9 +Patch104: remove_aarch64_jvm.cfg_divergence.patch +# RH1300630, 8147805: aarch64: C1 segmentation fault due to inline Unsafe.getAndSetObject +Patch105: rh1300630.patch # Patches which need backporting to 8u # S8073139, RH1191652; fix name of ppc64le architecture @@ -1109,13 +1112,13 @@ sh %{SOURCE12} %patch12 # s390 build fixes -%ifarch s390 %patch100 %patch102 %patch103 -%endif -# Aarch64 build fixes + +# aarch64 build fixes %patch104 +%patch105 # Zero PPC fixes. %patch403 @@ -1223,9 +1226,6 @@ bash ../../configure \ --with-milestone="fcs" \ --with-update-version=%{updatever} \ --with-build-number=%{buildver} \ -%ifarch %{aarch64} - --with-user-release-suffix="aarch64-%{updatever}-%{buildver}" \ -%endif --with-boot-jdk=/usr/lib/jvm/java-openjdk \ --with-debug-level=$debugbuild \ --enable-unlimited-crypto \ @@ -1269,6 +1269,7 @@ find images/%{j2sdkimage} -iname '*.debuginfo' -exec rm {} \; popd >& /dev/null +# Install nss.cfg right away as we will be using the JRE above export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{j2sdkimage} # Install nss.cfg right away as we will be using the JRE above @@ -1695,6 +1696,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Mon Feb 22 2016 jvanek - 1:1.8.0.72-.b15 +- sync from rhel + * Tue Feb 16 2016 Dan HorĂ¡k - 1:1.8.0.72-8.b15 - Refresh s390-java-opts patch diff --git a/remove_aarch64_jvm.cfg_divergence.patch b/remove_aarch64_jvm.cfg_divergence.patch new file mode 100644 index 0000000..64aeb57 --- /dev/null +++ b/remove_aarch64_jvm.cfg_divergence.patch @@ -0,0 +1,48 @@ +diff -r 57824090cf28 src/share/bin/java.c +--- openjdk/jdk/src/share/bin/java.c Fri Feb 05 17:41:45 2016 +0000 ++++ openjdk/jdk/src/share/bin/java.c Thu Feb 18 03:43:51 2016 +0000 +@@ -699,22 +699,6 @@ + } + } + +-/* +- * This is called if the jvmtype returned by CheckJvmType above +- * didn't exist. In this case if it was the default VM and we +- * selected the server vm we will allow it to use the client vm +- * instead. +- */ +-char * +-GetAltJvmType(char *jvmtype) +-{ +- if ((knownVMs[0].flag == VM_IF_SERVER_CLASS)) { +- if (jvmtype == knownVMs[0].server_class+1) return knownVMs[0].name+1; +- if (jvmtype == knownVMs[0].name+1) return knownVMs[0].server_class+1; +- } +- return NULL; +-} +- + /* copied from HotSpot function "atomll()" */ + static int + parse_size(const char *s, jlong *result) { +diff -r 57824090cf28 src/share/bin/java.h +--- openjdk/jdk/src/share/bin/java.h Fri Feb 05 17:41:45 2016 +0000 ++++ openjdk/jdk/src/share/bin/java.h Thu Feb 18 03:43:51 2016 +0000 +@@ -164,7 +164,6 @@ + */ + jint ReadKnownVMs(const char *jvmcfg, jboolean speculative); + char *CheckJvmType(int *argc, char ***argv, jboolean speculative); +-char *GetAltJvmType(char *jvmtype); + void AddOption(char *str, void *info); + + enum ergo_policy { +diff -r 57824090cf28 src/solaris/bin/aarch64/jvm.cfg +--- openjdk/jdk/src/solaris/bin/aarch64/jvm.cfg Fri Feb 05 17:41:45 2016 +0000 ++++ openjdk/jdk/src/solaris/bin/aarch64/jvm.cfg Thu Feb 18 03:43:51 2016 +0000 +@@ -31,6 +31,5 @@ + # "-XXaltjvm=" option, but that too is unsupported + # and may not be available in a future release. + # +--client IF_SERVER_CLASS -server + -server KNOWN +--minimal KNOWN ++-client IGNORE diff --git a/rh1300630.patch b/rh1300630.patch new file mode 100644 index 0000000..d9c46c5 --- /dev/null +++ b/rh1300630.patch @@ -0,0 +1,24 @@ +# HG changeset patch +# User hshi +# Date 1455640059 0 +# Tue Feb 16 16:27:39 2016 +0000 +# Node ID f90e98d9a3e53ffa6d4611bec799d8a9b338d82c +# Parent 225180d970c1fd447b87de8122016cdbfaea0dff +8147805: aarch64: C1 segmentation fault due to inline Unsafe.getAndSetObject +Summary: In Aarch64 LIR_Assembler.atomic_op, keep stored data reference register in decompressed forms as it may be used later +Reviewed-by: aph +Contributed-by: hui.shi@linaro.org, felix.yang@linaro.org + +diff -r 225180d970c1 -r f90e98d9a3e5 src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp +--- openjdk/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp Thu Jan 21 22:17:05 2016 +0000 ++++ openjdk/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp Tue Feb 16 16:27:39 2016 +0000 +@@ -3202,7 +3202,8 @@ + Register obj = as_reg(data); + Register dst = as_reg(dest); + if (is_oop && UseCompressedOops) { +- __ encode_heap_oop(obj); ++ __ encode_heap_oop(rscratch1, obj); ++ obj = rscratch1; + } + assert_different_registers(obj, addr.base(), tmp, rscratch2, dst); + Label again; diff --git a/s390-size_t_format_flags.patch b/s390-size_t_format_flags.patch index 1c644b5..451c806 100644 --- a/s390-size_t_format_flags.patch +++ b/s390-size_t_format_flags.patch @@ -110,7 +110,7 @@ diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp #define INTPTR_FORMAT_W(width) "%" #width PRIxPTR -+#ifdef S390 ++#if defined(S390) && !defined(_LP64) +#define SSIZE_FORMAT "%z" PRIdPTR +#define SIZE_FORMAT "%z" PRIuPTR +#define SIZE_FORMAT_HEX "0x%z" PRIxPTR