sync with rhel7

This commit is contained in:
Jiri Vanek 2014-09-25 12:16:24 +02:00
parent c2cceb304c
commit d904612421
7 changed files with 129 additions and 98 deletions

View File

@ -1,23 +0,0 @@
--- jdk8/hotspot/src/os/linux/vm/os_linux.cpp Wed Oct 23 15:44:12 2013 -0700
+++ jdk8/hotspot/src/os/linux/vm/os_linux.cpp Thu Dec 19 16:03:33 2013 +0000
@@ -4797,9 +4797,19 @@
// size. Add a page for compiler2 recursion in main thread.
// Add in 2*BytesPerWord times page size to account for VM stack during
// class initialization depending on 32 or 64 bit VM.
+
+
os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
(size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() +
- (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size());
+ (2*BytesPerWord COMPILER2_PRESENT(+1))
+ *
+#ifdef PPC
+ NOT_ZERO ( Linux::vm_default_page_size() )
+ ZERO_ONLY ( Linux::page_size() )
+#else
+ ( Linux::vm_default_page_size() )
+#endif
+ );
size_t threadStackSizeInBytes = ThreadStackSize * K;
if (threadStackSizeInBytes != 0 &&

View File

@ -0,0 +1,45 @@
diff --git a/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp b/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
--- jdk8/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
+++ jdk8/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
@@ -222,31 +222,35 @@
inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
#ifdef ARM
- return arm_lock_test_and_set(dest, exchange_value);
+ jint result = arm_lock_test_and_set(dest, exchange_value);
#else
#ifdef M68K
- return m68k_lock_test_and_set(dest, exchange_value);
+ jint result = m68k_lock_test_and_set(dest, exchange_value);
#else
// __sync_lock_test_and_set is a bizarrely named atomic exchange
// operation. Note that some platforms only support this with the
// limitation that the only valid value to store is the immediate
// constant 1. There is a test for this in JNI_CreateJavaVM().
- return __sync_lock_test_and_set (dest, exchange_value);
+ jint result = __sync_lock_test_and_set (dest, exchange_value);
+ __sync_synchronize();
#endif // M68K
#endif // ARM
+ return result;
}
inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
volatile intptr_t* dest) {
#ifdef ARM
- return arm_lock_test_and_set(dest, exchange_value);
+ intptr_t result = arm_lock_test_and_set(dest, exchange_value);
#else
#ifdef M68K
- return m68k_lock_test_and_set(dest, exchange_value);
+ intptr_t result = m68k_lock_test_and_set(dest, exchange_value);
#else
- return __sync_lock_test_and_set (dest, exchange_value);
+ intptr_t result = __sync_lock_test_and_set (dest, exchange_value);
+ __sync_synchronize();
#endif // M68K
#endif // ARM
+ return result;
}
inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {

View File

@ -0,0 +1,13 @@
diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4
--- jdk8/common/autoconf/platform.m4
+++ jdk8/common/autoconf/platform.m4
@@ -367,7 +367,8 @@
# ZERO_ARCHDEF is used to enable architecture-specific code
case "${OPENJDK_TARGET_CPU}" in
- ppc*) ZERO_ARCHDEF=PPC ;;
+ ppc) ZERO_ARCHDEF=PPC32 ;;
+ ppc64) ZERO_ARCHDEF=PPC64 ;;
s390*) ZERO_ARCHDEF=S390 ;;
sparc*) ZERO_ARCHDEF=SPARC ;;
x86_64*) ZERO_ARCHDEF=AMD64 ;;

View File

@ -1,18 +0,0 @@
diff -up jdk8/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp.ppc64 jdk8/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp
--- jdk8/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp.ppc64 2013-02-22 19:02:06.000000000 +0100
+++ jdk8/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2013-04-18 16:21:24.897403406 +0200
@@ -32,11 +32,11 @@
//
define_pd_global(bool, DontYieldALot, false);
-define_pd_global(intx, ThreadStackSize, 1536);
+define_pd_global(intx, ThreadStackSize, 1664);
#ifdef _LP64
-define_pd_global(intx, VMThreadStackSize, 1024);
+define_pd_global(intx, VMThreadStackSize, 1664);
#else
-define_pd_global(intx, VMThreadStackSize, 512);
+define_pd_global(intx, VMThreadStackSize, 1152);
#endif // _LP64
define_pd_global(intx, CompilerThreadStackSize, 0);
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);

View File

@ -123,7 +123,7 @@
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}
Release: 9.%{buildver}%{?dist}
Release: 10.%{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
@ -177,8 +177,6 @@ Source101: config.sub
# Ignore AWTError when assistive technologies are loaded
Patch1: %{name}-accessible-toolkit.patch
# RHBZ 1015432
Patch2: 1015432.patch
# Restrict access to java-atk-wrapper classes
Patch3: java-atk-wrapper-security.patch
# RHBZ 808293
@ -195,23 +193,22 @@ Patch11: hotspot-build-j-directive.patch
#
# OpenJDK specific patches
#
Patch666: stackoverflow-ppc32_64-20140828.patch
# JVM heap size changes for s390 (thanks to aph)
Patch100: %{name}-s390-java-opts.patch
# Type fixing for s390
Patch102: %{name}-size_t.patch
# Patch for PPC/PPC64
Patch103: %{name}-ppc-zero-hotspot.patch
Patch201: system-libjpeg.patch
Patch202: system-libpng.patch
Patch203: system-lcms.patch
Patch300: jstack-pr1845.patch
Patch400: ppc_stack_overflow_fix.patch
Patch401: fix_ZERO_ARCHDEF_ppc.patch
Patch402: atomic_linux_zero.inline.hpp.patch
Patch9999: enableArm64.patch
BuildRequires: autoconf
@ -444,16 +441,11 @@ sh %{SOURCE12}
%patch9999
%endif
%ifnarch %{aarch64}
%patch666
%endif
%patch201
%patch202
%patch203
%patch1
#%%patch2
%patch3
%patch4
%patch5
@ -467,10 +459,11 @@ sh %{SOURCE12}
%patch102
%endif
%ifarch ppc %{power64}
# PPC fixes
%patch103
%endif
# Zero PPC fixes.
# TODO: propose them upstream
%patch400
%patch401
%patch402
# Extract systemtap tapsets
%if %{with_systemtap}
@ -517,7 +510,13 @@ export ARCH_DATA_MODEL=64
export CFLAGS="$CFLAGS -mieee"
%endif
export CFLAGS="$CFLAGS -fstack-protector-strong"
EXTRA_CFLAGS="-fstack-protector-strong"
# PPC/PPC64 needs -fno-tree-vectorize since -O3 would
# otherwise generate wrong code producing segfaults.
%ifarch %{power64} ppc
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-tree-vectorize"
%endif
export EXTRA_CFLAGS
(cd jdk8/common/autoconf
bash ./autogen.sh
@ -550,9 +549,10 @@ bash ../../configure \
--with-libpng=system \
--with-lcms=system \
--with-stdc++lib=dynamic \
--with-num-cores="$NUM_PROC" \
--with-extra-cflags="-fno-devirtualize" \
--with-extra-cxxflags="-fno-devirtualize"
--with-extra-cxxflags="-fno-devirtualize" \
--with-extra-cflags="$EXTRA_CFLAGS" \
--with-num-cores="$NUM_PROC"
# The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist
# disables FDS for all build configs and reverts to pre-FDS make logic.
@ -1326,6 +1326,9 @@ exit 0
%{_jvmdir}/%{jredir}/lib/accessibility.properties
%changelog
* Thu Sep 25 2014 Jiri Vanek <jvanek@redhat.com> - 1:1.8.0.20-10.b26
- sync with rhel7
* Wed Sep 17 2014 Omair Majid <omajid@redhat.com> - 1:1.8.0.20-9.b26
- Remove LIBDIR and funny definition of _libdir.
- Fix rpmlint warnings about macros in comments.

View File

@ -0,0 +1,48 @@
diff --git a/src/cpu/zero/vm/stack_zero.hpp b/src/cpu/zero/vm/stack_zero.hpp
--- jdk8/hotspot/src/cpu/zero/vm/stack_zero.hpp
+++ jdk8/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
--- jdk8/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
+++ jdk8/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
@@ -47,10 +47,11 @@
// 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 {
- int stack_used = thread->stack_base() - (address) &stack_used;
- int stack_free = thread->stack_size() - stack_used;
- return stack_free - shadow_pages_size();
+inline ssize_t ZeroStack::abi_stack_available(Thread *thread) const {
+ ssize_t stack_used = thread->stack_base() - (address) &stack_used
+ + (StackYellowPages+StackRedPages+StackShadowPages) * os::vm_page_size();
+ 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
--- jdk8/hotspot/src/os/linux/vm/os_linux.cpp
+++ jdk8/hotspot/src/os/linux/vm/os_linux.cpp
@@ -4700,6 +4700,13 @@
os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
(size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() +
(2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_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.
+ os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
+ (size_t)(StackYellowPages+StackRedPages+StackShadowPages+2) * Linux::page_size());
+#endif
size_t threadStackSizeInBytes = ThreadStackSize * K;
if (threadStackSizeInBytes != 0 &&

View File

@ -1,37 +0,0 @@
diff -r f0d8ef4d9f93 src/os/linux/vm/os_linux.cpp
--- jdk8/hotspot/src/os/linux/vm/os_linux.cpp Wed Aug 13 15:49:58 2014 +0100
+++ jdk8/hotspot/src/os/linux/vm/os_linux.cpp Thu Aug 28 09:51:18 2014 +0000
@@ -4843,6 +4843,7 @@
pthread_mutex_init(&dl_mutex, NULL);
+NOT_ZERO (
// If the pagesize of the VM is greater than 8K determine the appropriate
// number of initial guard pages. The user can change this with the
// command line arguments, if needed.
@@ -4851,6 +4852,7 @@
StackRedPages = 1;
StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size();
}
+ )
}
// To install functions for atexit system call
@@ -4903,10 +4905,16 @@
// size. Add a page for compiler2 recursion in main thread.
// Add in 2*BytesPerWord times page size to account for VM stack during
// class initialization depending on 32 or 64 bit VM.
+NOT_ZERO (
os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
(size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() +
(2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size());
-
+ )
+ZERO_ONLY (
+ os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
+ (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
+ 2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::page_size());
+ )
size_t threadStackSizeInBytes = ThreadStackSize * K;
if (threadStackSizeInBytes != 0 &&
threadStackSizeInBytes < os::Linux::min_stack_allowed) {