changeset 2903:26338251981b

Bump aarch32 to jdk8u212-b04-aarch32-190429. Upstream changes: - S7127191: SA JSDB does not display native symbols correctly for transported Linux cores - S8027434: "-XX:OnOutOfMemoryError" uses fork instead of vfork - S8028254: gc/arguments/TestMinInitialErgonomics.java failed with unexpected initial heap size - S8059038: Create new launcher for SA tools - S8065749: [TESTBUG]: gc/arguments/TestG1HeapRegionSize.java fails at nightly - S8068269: RTM tests that assert on non-zero lock statistics are too strict in RTMTotalCountIncrRate > 1 cases - S8076274: [TESTBUG] Remove @ignore from runtime\NMT\JcmdDetailDiff.java - S8077608: [TESTBUG] Enable Hotspot jtreg tests to run in agentvm mode - S8133984: print_compressed_class_space() is only defined in 64-bit VM - S8141491: Unaligned memory access in Bits.c - S8145096: Undefined behaviour in HotSpot - S8170681: Remove fontconfig header files from JDK source tree - S8180904: Hotspot tests running with -agentvm failing due to classpath - S8184309: Build warnings from GCC 7.1 on Fedora 26 - S8185975: PPC64: Fix vsldoi interface according to the ISA - S8189761: COMPANY_NAME, IMPLEMENTOR, BUNDLE_VENDOR, VENDOR, but no configure flag - S8195153: [test] runtime/6981737/Test6981737.java shouldn't check 'java.vendor' and 'java.vm.vendor' properties - S8197429: Increased stack guard causes segfaults on x86-32 - S8200109: NMT: diff_malloc_site assert(early->flags() == current->flags(), "Must be the same memory type") - S8200115: System property java.vm.vendor value includes quotation marks - S8206075: On x86, assert on unbound assembler Labels used as branch targets - S8208480: Test failure: assert(is_bound() || is_unused()) after JDK-8206075 in C1 - S8210647: libsaproc is being compiled without optimization - S8211106: [windows] Update OS detection code to recognize Windows Server 2019 - S8211231: BarrierSetC1::generate_referent_check() confuses register allocator - S8211926: Catastrophic size_t underflow in BitMap::*_large methods - S8212110: Build of saproc.dll broken on Windows 32 bit after JDK-8210647 - S8213419: [AArch32] C2 may hang in MulLNode::Ideal()/MulINode::Ideal() with gcc 8.2.1 - S8213419: C2 may hang in MulLNode::Ideal()/MulINode::Ideal() with gcc 8.2.1 - S8213992: Rename and make DieOnSafepointTimeout the diagnostic option - S8214059: Undefined behaviour in ADLC - S8214189: [AArch32] test/hotspot/jtreg/compiler/intrinsics/mathexact/MulExactLConstantTest.java fails on Windows x64 when run with -XX:-TieredCompilation - S8214189: test/hotspot/jtreg/compiler/intrinsics/mathexact/MulExactLConstantTest.java fails on Windows x64 when run with -XX:-TieredCompilation - S8214206: Fix for JDK-8213419 is broken on 32-bit - S8215934: G1 Old Gen MemoryPool CollectionUsage.used values don't reflect mixed GC results - S8216037: Avoid calling vm_update with a NULL name - S8217432: MetaspaceGC::_capacity_until_GC exceeds MaxMetaspaceSize - S8217520: Remove vm.opt.MaxGCPauseMillis == "null" from TestOldGenCollectionUsage.java - S8217753: Enable HotSpot builds on 5.x Linux kernels - S8218613: [TESTBUG] runtime/ErrorHandling tests are building incorrect testlibrary classes - S8219961: [ppc64] Increase code size for interpreter generation. - S8221355: Performance regression after JDK-8155635 backport into 8u ChangeLog: 2019-04-28 Andrew John Hughes <gnu_andrew@member.fsf.org> Bump aarch32 to jdk8u212-b04-aarch32-190428. * patches/hotspot/aarch32/8145096-pr2854.patch, * patches/hotspot/aarch32/8184309-pr3596.patch, * patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch, * patches/hotspot/aarch32/8214059-pr3693.patch, * patches/hotspot/aarch32/8217753-pr3685.patch, * patches/hotspot/aarch32/crash_dump_bug_url.patch: Remove patches now upstream. * Makefile.am: (ICEDTEA_PATCHES): Remove AArch32-only patches which are now included in the updated tarball. Move 8222286 so it applies to both builds, now they both have 8213419. * hotspot.map.in: Bump aarch32 to jdk8u212-b04-aarch32-190428. * patches/hotspot/aarch32/8222286-pr3727-s390.patch: Symlink to Shenandoah verison. * patches/hotspot/aarch32/pr1942.patch, * patches/hotspot/aarch32/pr2777.patch: Switch back to symlinks now they can share a version with Shenandoah again.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Mon, 29 Apr 2019 00:39:04 +0100
parents 86a0f06c97b2
children c87d4b274a2b
files ChangeLog Makefile.am NEWS hotspot.map.in patches/hotspot/aarch32/8145096-pr2854.patch patches/hotspot/aarch32/8184309-pr3596.patch patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch patches/hotspot/aarch32/8214059-pr3693.patch patches/hotspot/aarch32/8217753-pr3685.patch patches/hotspot/aarch32/8222286-pr3727-s390.patch patches/hotspot/aarch32/crash_dump_bug_url.patch patches/hotspot/aarch32/pr1942.patch patches/hotspot/aarch32/pr2777.patch
diffstat 13 files changed, 34 insertions(+), 1097 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Apr 25 05:42:42 2019 +0100
+++ b/ChangeLog	Mon Apr 29 00:39:04 2019 +0100
@@ -1,3 +1,27 @@
+2019-04-28  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	Bump aarch32 to jdk8u212-b04-aarch32-190429.
+	* patches/hotspot/aarch32/8145096-pr2854.patch,
+	* patches/hotspot/aarch32/8184309-pr3596.patch,
+	* patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch,
+	* patches/hotspot/aarch32/8214059-pr3693.patch,
+	* patches/hotspot/aarch32/8217753-pr3685.patch,
+	* patches/hotspot/aarch32/crash_dump_bug_url.patch:
+	Remove patches now upstream.
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Remove AArch32-only patches which
+	are now included in the updated tarball. Move 8222286
+	so it applies to both builds, now they both have
+	8213419.
+	* hotspot.map.in: Bump aarch32 to
+	jdk8u212-b04-aarch32-190429.
+	* patches/hotspot/aarch32/8222286-pr3727-s390.patch:
+	Symlink to Shenandoah verison.
+	* patches/hotspot/aarch32/pr1942.patch,
+	* patches/hotspot/aarch32/pr2777.patch:
+	Switch back to symlinks now they can share a version with
+	Shenandoah again.
+
 2019-04-22  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	PR3734: Make use of branding options
--- a/Makefile.am	Thu Apr 25 05:42:42 2019 +0100
+++ b/Makefile.am	Mon Apr 29 00:39:04 2019 +0100
@@ -350,13 +350,7 @@
 if WITH_AARCH32_HSBUILD
 ICEDTEA_PATCHES += \
 	patches/hotspot/$(HSBUILD)/pr3548-aarch32.patch \
-	patches/hotspot/$(HSBUILD)/8078628-pr3208.patch \
-	patches/hotspot/$(HSBUILD)/8145096-pr2854.patch \
-	patches/hotspot/$(HSBUILD)/8197429-pr3546-rh1536622.patch \
-	patches/hotspot/$(HSBUILD)/8184309-pr3596.patch \
-	patches/hotspot/$(HSBUILD)/8214059-pr3693.patch \
-	patches/hotspot/$(HSBUILD)/8217753-pr3685.patch \
-	patches/hotspot/$(HSBUILD)/crash_dump_bug_url.patch
+	patches/hotspot/$(HSBUILD)/8078628-pr3208.patch
 endif
 
 ICEDTEA_PATCHES += \
@@ -390,14 +384,14 @@
 	patches/hotspot/$(HSBUILD)/6424123-pr3696.patch \
 	patches/hotspot/$(HSBUILD)/8059847-pr3696.patch \
 	patches/hotspot/$(HSBUILD)/8076475-pr3696.patch \
-	patches/hotspot/$(HSBUILD)/pr3728.patch
+	patches/hotspot/$(HSBUILD)/pr3728.patch \
+	patches/hotspot/$(HSBUILD)/8222286-pr3727-s390.patch
 
 # Shenandoah has the AArch64 port so should get the return value & debug build fixes
 # Shenandoah also needs some fixes to build on all architectures
 if WITH_SHENANDOAH_HSBUILD
 ICEDTEA_PATCHES += \
 	patches/hotspot/$(HSBUILD)/8158260-pr2991-rh1341258-aarch64.patch \
-	patches/hotspot/$(HSBUILD)/8222286-pr3727-s390.patch \
 	patches/hotspot/$(HSBUILD)/8222286-pr3727-s390-shenandoah.patch \
 	patches/hotspot/$(HSBUILD)/pr3519-return_value-02.patch \
 	patches/hotspot/$(HSBUILD)/pr3634.patch
--- a/NEWS	Thu Apr 25 05:42:42 2019 +0100
+++ b/NEWS	Mon Apr 29 00:39:04 2019 +0100
@@ -179,6 +179,9 @@
   - S8153172, PR3724: aarch64: hotspot crashes after the 8.1 LSE patch is merged
   - S8213419, PR3724: [AArch64] C2 may hang in MulLNode::Ideal()/MulINode::Ideal() with gcc 8.2.1
   - S8221220, PR3724: AArch64: Add StoreStore membar explicitly for Volatile Writes in TemplateTable
+* AArch32 port
+  - S8213419: [AArch32] C2 may hang in MulLNode::Ideal()/MulINode::Ideal() with gcc 8.2.1
+  - S8214189: [AArch32] test/hotspot/jtreg/compiler/intrinsics/mathexact/MulExactLConstantTest.java fails on Windows x64 when run with -XX:-TieredCompilation
 
 New in release 3.11.0 (2019-03-01):
 
--- a/hotspot.map.in	Thu Apr 25 05:42:42 2019 +0100
+++ b/hotspot.map.in	Mon Apr 29 00:39:04 2019 +0100
@@ -1,4 +1,4 @@
 # version type(drop/hg) url changeset sha256sum
 default drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 3f9a60eb8ef0 073ebc2f2e0301e0f2c17bb0e9d7340a0ed1f003c9706109f25ecefeeedc67f6
 shenandoah drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ adb62c0031b8 1226cf506725df9d98188b6918a0329764a64955d6b8ba784eaf2a70c0d40830
-aarch32 drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 965925fb69ca d5db66dc38384c596a0474acb57cb14e30d30ac54977665ca194fa2cc335edee
+aarch32 drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 81a383ab33ee e0744dad6a9ca704b3aa637c3c328df0ccf523f5a128f61cc5d8632eae4b956f
--- a/patches/hotspot/aarch32/8145096-pr2854.patch	Thu Apr 25 05:42:42 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-# HG changeset patch
-# User aph
-# Date 1459479993 -3600
-#      Fri Apr 01 04:06:33 2016 +0100
-# Node ID 5f2728295878fc80d8d14b4304abe9629e6893cd
-# Parent  2d14547e0dfb815e39edde22c092286a22d5b993
-8145096, PR2854: Undefined behaviour in HotSpot
-Summary: Fix some integer overflows
-Reviewed-by: jrose, kvn, kbarrett, adinn, iklam
-
-diff -r 2d14547e0dfb -r 5f2728295878 src/os/posix/vm/os_posix.cpp
---- openjdk/hotspot/src/os/posix/vm/os_posix.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/os/posix/vm/os_posix.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -594,7 +594,11 @@
-   strncpy(buffer, "none", size);
- 
-   const struct {
--    int i;
-+    // NB: i is an unsigned int here because SA_RESETHAND is on some
-+    // systems 0x80000000, which is implicitly unsigned.  Assignining
-+    // it to an int field would be an overflow in unsigned-to-signed
-+    // conversion.
-+    unsigned int i;
-     const char* s;
-   } flaginfo [] = {
-     { SA_NOCLDSTOP, "SA_NOCLDSTOP" },
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/addnode.cpp
---- openjdk/hotspot/src/share/vm/opto/addnode.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/addnode.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -344,8 +344,8 @@
- const Type *AddINode::add_ring( const Type *t0, const Type *t1 ) const {
-   const TypeInt *r0 = t0->is_int(); // Handy access
-   const TypeInt *r1 = t1->is_int();
--  int lo = r0->_lo + r1->_lo;
--  int hi = r0->_hi + r1->_hi;
-+  int lo = java_add(r0->_lo, r1->_lo);
-+  int hi = java_add(r0->_hi, r1->_hi);
-   if( !(r0->is_con() && r1->is_con()) ) {
-     // Not both constants, compute approximate result
-     if( (r0->_lo & r1->_lo) < 0 && lo >= 0 ) {
-@@ -462,8 +462,8 @@
- const Type *AddLNode::add_ring( const Type *t0, const Type *t1 ) const {
-   const TypeLong *r0 = t0->is_long(); // Handy access
-   const TypeLong *r1 = t1->is_long();
--  jlong lo = r0->_lo + r1->_lo;
--  jlong hi = r0->_hi + r1->_hi;
-+  jlong lo = java_add(r0->_lo, r1->_lo);
-+  jlong hi = java_add(r0->_hi, r1->_hi);
-   if( !(r0->is_con() && r1->is_con()) ) {
-     // Not both constants, compute approximate result
-     if( (r0->_lo & r1->_lo) < 0 && lo >= 0 ) {
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/loopTransform.cpp
---- openjdk/hotspot/src/share/vm/opto/loopTransform.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/loopTransform.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -1310,8 +1310,8 @@
-           limit = new (C) Opaque2Node( C, limit );
-           register_new_node( limit, opaq_ctrl );
-         }
--        if (stride_con > 0 && ((limit_type->_lo - stride_con) < limit_type->_lo) ||
--                   stride_con < 0 && ((limit_type->_hi - stride_con) > limit_type->_hi)) {
-+        if (stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo) ||
-+            stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi)) {
-           // No underflow.
-           new_limit = new (C) SubINode(limit, stride);
-         } else {
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/mulnode.cpp
---- openjdk/hotspot/src/share/vm/opto/mulnode.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/mulnode.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -244,13 +244,13 @@
-   double d = (double)hi1;
- 
-   // Compute all endpoints & check for overflow
--  int32 A = lo0*lo1;
-+  int32 A = java_multiply(lo0, lo1);
-   if( (double)A != a*c ) return TypeInt::INT; // Overflow?
--  int32 B = lo0*hi1;
-+  int32 B = java_multiply(lo0, hi1);
-   if( (double)B != a*d ) return TypeInt::INT; // Overflow?
--  int32 C = hi0*lo1;
-+  int32 C = java_multiply(hi0, lo1);
-   if( (double)C != b*c ) return TypeInt::INT; // Overflow?
--  int32 D = hi0*hi1;
-+  int32 D = java_multiply(hi0, hi1);
-   if( (double)D != b*d ) return TypeInt::INT; // Overflow?
- 
-   if( A < B ) { lo0 = A; hi0 = B; } // Sort range endpoints
-@@ -340,13 +340,13 @@
-   double d = (double)hi1;
- 
-   // Compute all endpoints & check for overflow
--  jlong A = lo0*lo1;
-+  jlong A = java_multiply(lo0, lo1);
-   if( (double)A != a*c ) return TypeLong::LONG; // Overflow?
--  jlong B = lo0*hi1;
-+  jlong B = java_multiply(lo0, hi1);
-   if( (double)B != a*d ) return TypeLong::LONG; // Overflow?
--  jlong C = hi0*lo1;
-+  jlong C = java_multiply(hi0, lo1);
-   if( (double)C != b*c ) return TypeLong::LONG; // Overflow?
--  jlong D = hi0*hi1;
-+  jlong D = java_multiply(hi0, hi1);
-   if( (double)D != b*d ) return TypeLong::LONG; // Overflow?
- 
-   if( A < B ) { lo0 = A; hi0 = B; } // Sort range endpoints
-@@ -573,7 +573,8 @@
-     // Masking off high bits which are always zero is useless.
-     const TypeLong* t1 = phase->type( in(1) )->isa_long();
-     if (t1 != NULL && t1->_lo >= 0) {
--      jlong t1_support = ((jlong)1 << (1 + log2_long(t1->_hi))) - 1;
-+      int bit_count = log2_long(t1->_hi) + 1;
-+      jlong t1_support = jlong(max_julong >> (BitsPerJavaLong - bit_count));
-       if ((t1_support & con) == t1_support)
-         return usr;
-     }
-@@ -801,7 +802,7 @@
- 
-   // Check for ((x & ((CONST64(1)<<(64-c0))-1)) << c0) which ANDs off high bits
-   // before shifting them away.
--  const jlong bits_mask = ((jlong)CONST64(1) << (jlong)(BitsPerJavaLong - con)) - CONST64(1);
-+  const jlong bits_mask = jlong(max_julong >> con);
-   if( add1_op == Op_AndL &&
-       phase->type(add1->in(2)) == TypeLong::make( bits_mask ) )
-     return new (phase->C) LShiftLNode( add1->in(1), in(2) );
-@@ -1253,7 +1254,7 @@
-   if ( con == 0 ) return NULL;  // let Identity() handle a 0 shift count
-                               // note: mask computation below does not work for 0 shift count
-   // We'll be wanting the right-shift amount as a mask of that many bits
--  const jlong mask = (((jlong)CONST64(1) << (jlong)(BitsPerJavaLong - con)) -1);
-+  const jlong mask = jlong(max_julong >> con);
- 
-   // Check for ((x << z) + Y) >>> z.  Replace with x + con>>>z
-   // The idiom for rounding to a power of 2 is "(Q+(2^z-1)) >>> z".
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/subnode.cpp
---- openjdk/hotspot/src/share/vm/opto/subnode.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/subnode.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -252,8 +252,8 @@
- const Type *SubINode::sub( const Type *t1, const Type *t2 ) const {
-   const TypeInt *r0 = t1->is_int(); // Handy access
-   const TypeInt *r1 = t2->is_int();
--  int32 lo = r0->_lo - r1->_hi;
--  int32 hi = r0->_hi - r1->_lo;
-+  int32 lo = java_subtract(r0->_lo, r1->_hi);
-+  int32 hi = java_subtract(r0->_hi, r1->_lo);
- 
-   // We next check for 32-bit overflow.
-   // If that happens, we just assume all integers are possible.
-@@ -361,8 +361,8 @@
- const Type *SubLNode::sub( const Type *t1, const Type *t2 ) const {
-   const TypeLong *r0 = t1->is_long(); // Handy access
-   const TypeLong *r1 = t2->is_long();
--  jlong lo = r0->_lo - r1->_hi;
--  jlong hi = r0->_hi - r1->_lo;
-+  jlong lo = java_subtract(r0->_lo, r1->_hi);
-+  jlong hi = java_subtract(r0->_hi, r1->_lo);
- 
-   // We next check for 32-bit overflow.
-   // If that happens, we just assume all integers are possible.
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/type.cpp
---- openjdk/hotspot/src/share/vm/opto/type.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/type.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -1317,8 +1317,8 @@
- 
-   // The new type narrows the old type, so look for a "death march".
-   // See comments on PhaseTransform::saturate.
--  juint nrange = _hi - _lo;
--  juint orange = ohi - olo;
-+  juint nrange = (juint)_hi - _lo;
-+  juint orange = (juint)ohi - olo;
-   if (nrange < max_juint - 1 && nrange > (orange >> 1) + (SMALLINT*2)) {
-     // Use the new type only if the range shrinks a lot.
-     // We do not want the optimizer computing 2^31 point by point.
-@@ -1351,7 +1351,7 @@
- //------------------------------hash-------------------------------------------
- // Type-specific hashing function.
- int TypeInt::hash(void) const {
--  return _lo+_hi+_widen+(int)Type::Int;
-+  return java_add(java_add(_lo, _hi), java_add(_widen, (int)Type::Int));
- }
- 
- //------------------------------is_finite--------------------------------------
-@@ -1532,7 +1532,7 @@
-         // If neither endpoint is extremal yet, push out the endpoint
-         // which is closer to its respective limit.
-         if (_lo >= 0 ||                 // easy common case
--            (julong)(_lo - min) >= (julong)(max - _hi)) {
-+            ((julong)_lo - min) >= ((julong)max - _hi)) {
-           // Try to widen to an unsigned range type of 32/63 bits:
-           if (max >= max_juint && _hi < max_juint)
-             return make(_lo, max_juint, WidenMax);
-@@ -2296,7 +2296,7 @@
- //------------------------------hash-------------------------------------------
- // Type-specific hashing function.
- int TypePtr::hash(void) const {
--  return _ptr + _offset;
-+  return java_add(_ptr, _offset);
- }
- 
- //------------------------------dump2------------------------------------------
-@@ -2877,12 +2877,9 @@
- // Type-specific hashing function.
- int TypeOopPtr::hash(void) const {
-   return
--    (const_oop() ? const_oop()->hash() : 0) +
--    _klass_is_exact +
--    _instance_id +
--    hash_speculative() +
--    _inline_depth +
--    TypePtr::hash();
-+    java_add(java_add(const_oop() ? const_oop()->hash() : 0, _klass_is_exact),
-+             java_add(_instance_id, java_add(hash_speculative(),
-+                                             java_add(_inline_depth, TypePtr::hash()))));
- }
- 
- //------------------------------dump2------------------------------------------
-@@ -3608,7 +3605,7 @@
- //------------------------------hash-------------------------------------------
- // Type-specific hashing function.
- int TypeInstPtr::hash(void) const {
--  int hash = klass()->hash() + TypeOopPtr::hash();
-+  int hash = java_add(klass()->hash(), TypeOopPtr::hash());
-   return hash;
- }
- 
-@@ -4503,7 +4500,7 @@
- //------------------------------hash-------------------------------------------
- // Type-specific hashing function.
- int TypeKlassPtr::hash(void) const {
--  return klass()->hash() + TypePtr::hash();
-+  return java_add(klass()->hash(), TypePtr::hash());
- }
- 
- //------------------------------singleton--------------------------------------
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/runtime/advancedThresholdPolicy.cpp
---- openjdk/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -131,7 +131,8 @@
- }
- 
- double AdvancedThresholdPolicy::weight(Method* method) {
--  return (method->rate() + 1) * ((method->invocation_count() + 1) *  (method->backedge_count() + 1));
-+  return (double)(method->rate() + 1) *
-+    (method->invocation_count() + 1) * (method->backedge_count() + 1);
- }
- 
- // Apply heuristics and return true if x should be compiled before y
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/utilities/globalDefinitions.hpp
---- openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -1405,6 +1405,32 @@
- 
- #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
- 
-+//----------------------------------------------------------------------------------------------------
-+// Sum and product which can never overflow: they wrap, just like the
-+// Java operations.  Note that we don't intend these to be used for
-+// general-purpose arithmetic: their purpose is to emulate Java
-+// operations.
-+
-+// The goal of this code to avoid undefined or implementation-defined
-+// behaviour.  The use of an lvalue to reference cast is explicitly
-+// permitted by Lvalues and rvalues [basic.lval].  [Section 3.10 Para
-+// 15 in C++03]
-+#define JAVA_INTEGER_OP(OP, NAME, TYPE, UNSIGNED_TYPE)  \
-+inline TYPE NAME (TYPE in1, TYPE in2) {                 \
-+  UNSIGNED_TYPE ures = static_cast<UNSIGNED_TYPE>(in1); \
-+  ures OP ## = static_cast<UNSIGNED_TYPE>(in2);         \
-+  return reinterpret_cast<TYPE&>(ures);                 \
-+}
-+
-+JAVA_INTEGER_OP(+, java_add, jint, juint)
-+JAVA_INTEGER_OP(-, java_subtract, jint, juint)
-+JAVA_INTEGER_OP(*, java_multiply, jint, juint)
-+JAVA_INTEGER_OP(+, java_add, jlong, julong)
-+JAVA_INTEGER_OP(-, java_subtract, jlong, julong)
-+JAVA_INTEGER_OP(*, java_multiply, jlong, julong)
-+
-+#undef JAVA_INTEGER_OP
-+
- // Dereference vptr
- // All C++ compilers that we know of have the vtbl pointer in the first
- // word.  If there are exceptions, this function needs to be made compiler
--- a/patches/hotspot/aarch32/8184309-pr3596.patch	Thu Apr 25 05:42:42 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# HG changeset patch
-# User ysuenaga
-# Date 1527498573 -3600
-#      Mon May 28 10:09:33 2018 +0100
-# Node ID ef176cb429c49d1c330d9575938f66b04e3fb730
-# Parent  6915dc9ae18cce5625d3a3fc74b37da70a5b4215
-8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26
-Reviewed-by: kbarrett, vlivanov
-
-diff --git openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp openjdk/hotspot/src/share/vm/code/dependencies.cpp
---- openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp
-+++ openjdk/hotspot/src/share/vm/code/dependencies.cpp
-@@ -525,7 +525,7 @@
-         xtty->object("x", arg.metadata_value());
-       }
-     } else {
--      char xn[10]; sprintf(xn, "x%d", j);
-+      char xn[12]; sprintf(xn, "x%d", j);
-       if (arg.is_oop()) {
-         xtty->object(xn, arg.oop_value());
-       } else {
--- a/patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch	Thu Apr 25 05:42:42 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-# HG changeset patch
-# User aph
-# Date 1524109541 -3600
-#      Thu Apr 19 04:45:41 2018 +0100
-# Node ID 4e2adbc3d2b512f6b2bf318d2db60f4d1903f8c7
-# Parent  20a18751757aaac9782d8272dcfe22998001066f
-8197429, PR3546: Increased stack guard causes segfaults on x86-32
-Reviewed-by: dholmes
-
-diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp	2019-01-24 13:40:30.000000000 +0000
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2019-04-22 16:25:20.867022034 +0100
-@@ -732,6 +732,10 @@
-   }
- }
- 
-+void os::Linux::expand_stack_to(address bottom) {
-+  _expand_stack_to(bottom);
-+}
-+
- bool os::Linux::manually_expand_stack(JavaThread * t, address addr) {
-   assert(t!=NULL, "just checking");
-   assert(t->osthread()->expanding_stack(), "expand should be set");
-diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp openjdk/hotspot/src/os/linux/vm/os_linux.hpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp	2019-01-24 13:40:30.000000000 +0000
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp	2019-04-22 16:25:20.867022034 +0100
-@@ -251,6 +251,8 @@
-   static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime);
- 
- private:
-+  static void expand_stack_to(address bottom);
-+
-   typedef int (*sched_getcpu_func_t)(void);
-   typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen);
-   typedef int (*numa_max_node_func_t)(void);
-diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
---- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-01-24 13:40:30.000000000 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-04-22 16:25:51.886540639 +0100
-@@ -892,6 +892,25 @@
- void os::workaround_expand_exec_shield_cs_limit() {
- #if defined(IA32)
-   size_t page_size = os::vm_page_size();
-+
-+  /*
-+   * JDK-8197429
-+   *
-+   * Expand the stack mapping to the end of the initial stack before
-+   * attempting to install the codebuf.  This is needed because newer
-+   * Linux kernels impose a distance of a megabyte between stack
-+   * memory and other memory regions.  If we try to install the
-+   * codebuf before expanding the stack the installation will appear
-+   * to succeed but we'll get a segfault later if we expand the stack
-+   * in Java code.
-+   *
-+   */
-+  if (os::Linux::is_initial_thread()) {
-+    address limit = Linux::initial_thread_stack_bottom();
-+    limit += (StackYellowPages + StackRedPages) * page_size;
-+    os::Linux::expand_stack_to(limit);
-+  }
-+
-   /*
-    * Take the highest VA the OS will give us and exec
-    *
-@@ -910,6 +929,16 @@
-   char* hint = (char*) (Linux::initial_thread_stack_bottom() -
-                         ((StackYellowPages + StackRedPages + 1) * page_size));
-   char* codebuf = os::attempt_reserve_memory_at(page_size, hint);
-+
-+  if (codebuf == NULL) {
-+    // JDK-8197429: There may be a stack gap of one megabyte between
-+    // the limit of the stack and the nearest memory region: this is a
-+    // Linux kernel workaround for CVE-2017-1000364.  If we failed to
-+    // map our codebuf, try again at an address one megabyte lower.
-+    hint -= 1 * M;
-+    codebuf = os::attempt_reserve_memory_at(page_size, hint);
-+  }
-+
-   if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
-     return; // No matter, we tried, best effort.
-   }
-diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c openjdk/hotspot/test/runtime/StackGap/exestack-gap.c
---- openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/hotspot/test/runtime/StackGap/exestack-gap.c	2019-04-22 16:25:20.867022034 +0100
-@@ -0,0 +1,82 @@
-+/*
-+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code 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 General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, 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.
-+ */
-+
-+#include <jni.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+JNIEnv* create_vm(JavaVM **jvm, char *extra_option)
-+{
-+    JNIEnv* env;
-+    JavaVMInitArgs args;
-+    JavaVMOption options[4];
-+    args.version = JNI_VERSION_1_8;
-+    args.nOptions = 3 + (extra_option != NULL);
-+    options[0].optionString = "-Xss2048k";
-+    char classpath[4096];
-+    snprintf(classpath, sizeof classpath,
-+             "-Djava.class.path=%s", getenv("CLASSPATH"));
-+    options[1].optionString = classpath;
-+    options[2].optionString = "-XX:+UnlockExperimentalVMOptions";
-+    if (extra_option) {
-+      options[3].optionString = extra_option;
-+    }
-+    args.options = &options[0];
-+    args.ignoreUnrecognized = 0;
-+    int rv;
-+    rv = JNI_CreateJavaVM(jvm, (void**)&env, &args);
-+    if (rv < 0) return NULL;
-+    return env;
-+}
-+
-+void run(char *extra_arg) {
-+  JavaVM *jvm;
-+  jclass T_class;
-+  jmethodID test_method;
-+  JNIEnv *env = create_vm(&jvm, extra_arg);
-+  if (env == NULL)
-+    exit(1);
-+  T_class = (*env)->FindClass(env, "T");
-+  if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
-+    (*env)->ExceptionDescribe(env);
-+    exit(1);
-+  }
-+  test_method = (*env)->GetStaticMethodID(env, T_class, "test", "(I)V");
-+  if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
-+    (*env)->ExceptionDescribe(env);
-+    exit(1);
-+  }
-+  (*env)->CallStaticVoidMethod(env, T_class, test_method, 1000);
-+}
-+
-+
-+int main(int argc, char **argv)
-+{
-+  if (argc > 1) {
-+    run(argv[1]);
-+  } else {
-+    run(NULL);
-+  }
-+
-+  return 0;
-+}
-diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/testme.sh openjdk/hotspot/test/runtime/StackGap/testme.sh
---- openjdk.orig/hotspot/test/runtime/StackGap/testme.sh	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/hotspot/test/runtime/StackGap/testme.sh	2019-04-22 16:25:20.867022034 +0100
-@@ -0,0 +1,48 @@
-+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
-+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+#
-+# This code is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License version 2 only, as
-+# published by the Free Software Foundation.
-+#
-+# This code 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 General Public License
-+# version 2 for more details (a copy is included in the LICENSE file that
-+# accompanied this code).
-+#
-+# You should have received a copy of the GNU General Public License version
-+# 2 along with this work; if not, write to the Free Software Foundation,
-+# Inc., 51 Franklin St, 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.
-+#!/bin/sh
-+
-+#
-+# @test testme.sh
-+# @summary Linux kernel stack guard should not cause segfaults on x86-32
-+# @compile T.java
-+# @run shell testme.sh
-+#
-+
-+if [ "${TESTSRC}" = "" ]
-+then
-+  TESTSRC=${PWD}
-+  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
-+fi
-+echo "TESTSRC=${TESTSRC}"
-+## Adding common setup Variables for running shell tests.
-+. ${TESTSRC}/../../test_env.sh
-+
-+if [ "${VM_OS}" != "linux" ]
-+then
-+  echo "Test only valid for Linux"
-+  exit 0
-+fi
-+
-+LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
-+export LD_LIBRARY_PATH
-+
-+${TESTNATIVEPATH}/stack-gap || exit $?
-diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/T.java openjdk/hotspot/test/runtime/StackGap/T.java
---- openjdk.orig/hotspot/test/runtime/StackGap/T.java	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/hotspot/test/runtime/StackGap/T.java	2019-04-22 16:25:20.867022034 +0100
-@@ -0,0 +1,33 @@
-+/*
-+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code 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 General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, 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.
-+ */
-+
-+public class T {
-+
-+  public static void test(int n) {
-+    if (n == 0) return;
-+    System.out.println (n);
-+    test (n - 1);
-+
-+  }
-+
-+}
--- a/patches/hotspot/aarch32/8214059-pr3693.patch	Thu Apr 25 05:42:42 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-# HG changeset patch
-# User sgehwolf
-# Date 1549899806 0
-#      Mon Feb 11 15:43:26 2019 +0000
-# Node ID 4a1c2eb583ae102da922f204efd6dab1f8073c41
-# Parent  9087f96c9d956e0141741639445ebcb8bb20e3e6
-8214059, PR3693: Undefined behaviour in ADLC
-Reviewed-by: shade, kbarrett
-Contributed-by: Simon Tooke <stooke@redhat.com>
-
-diff --git openjdk.orig/hotspot/src/share/vm/adlc/adlparse.cpp openjdk/hotspot/src/share/vm/adlc/adlparse.cpp
---- openjdk.orig/hotspot/src/share/vm/adlc/adlparse.cpp
-+++ openjdk/hotspot/src/share/vm/adlc/adlparse.cpp
-@@ -2868,7 +2868,8 @@
-   const char* param = NULL;
-   inst._parameters.reset();
-   while ((param = inst._parameters.iter()) != NULL) {
--    OperandForm* opForm = (OperandForm*) inst._localNames[param];
-+    OpClassForm* opForm = inst._localNames[param]->is_opclass();
-+    assert(opForm != NULL, "sanity");
-     encoding->add_parameter(opForm->_ident, param);
-   }
- 
-@@ -3338,7 +3339,8 @@
-   const char* param = NULL;
-   inst._parameters.reset();
-   while ((param = inst._parameters.iter()) != NULL) {
--    OperandForm* opForm = (OperandForm*) inst._localNames[param];
-+    OpClassForm* opForm = inst._localNames[param]->is_opclass();
-+    assert(opForm != NULL, "sanity");
-     encoding->add_parameter(opForm->_ident, param);
-   }
- 
-diff --git openjdk.orig/hotspot/src/share/vm/adlc/dfa.cpp openjdk/hotspot/src/share/vm/adlc/dfa.cpp
---- openjdk.orig/hotspot/src/share/vm/adlc/dfa.cpp
-+++ openjdk/hotspot/src/share/vm/adlc/dfa.cpp
-@@ -757,19 +757,27 @@
- }
- 
- int Expr::compute_min(const Expr *c1, const Expr *c2) {
--  int result = c1->_min_value + c2->_min_value;
--  assert( result >= 0, "Invalid cost computation");
-+  int v1 = c1->_min_value;
-+  int v2 = c2->_min_value;
-+  assert(0 <= v2 && v2 <= Expr::Max, "sanity");
-+  assert(v1 <= Expr::Max - v2, "Invalid cost computation");
- 
--  return result;
-+  return v1 + v2;
- }
- 
-+
- int Expr::compute_max(const Expr *c1, const Expr *c2) {
--  int result = c1->_max_value + c2->_max_value;
--  if( result < 0 ) {  // check for overflow
--    result = Expr::Max;
-+  int v1 = c1->_max_value;
-+  int v2 = c2->_max_value;
-+
-+  // Check for overflow without producing UB. If v2 is positive
-+  // and not larger than Max, the subtraction cannot underflow.
-+  assert(0 <= v2 && v2 <= Expr::Max, "sanity");
-+  if (v1 > Expr::Max - v2) {
-+    return Expr::Max;
-   }
- 
--  return result;
-+  return v1 + v2;
- }
- 
- void Expr::print() const {
-diff --git openjdk.orig/hotspot/src/share/vm/adlc/formssel.cpp openjdk/hotspot/src/share/vm/adlc/formssel.cpp
---- openjdk.orig/hotspot/src/share/vm/adlc/formssel.cpp
-+++ openjdk/hotspot/src/share/vm/adlc/formssel.cpp
-@@ -921,7 +921,8 @@
-   const char *name;
-   const char *kill_name = NULL;
-   for (_parameters.reset(); (name = _parameters.iter()) != NULL;) {
--    OperandForm *opForm = (OperandForm*)_localNames[name];
-+    OpClassForm *opForm = _localNames[name]->is_opclass();
-+    assert(opForm != NULL, "sanity");
- 
-     Effect* e = NULL;
-     {
-@@ -938,7 +939,8 @@
-       // complex so simply enforce the restriction during parse.
-       if (kill_name != NULL &&
-           e->isa(Component::TEMP) && !e->isa(Component::DEF)) {
--        OperandForm* kill = (OperandForm*)_localNames[kill_name];
-+        OpClassForm* kill = _localNames[kill_name]->is_opclass();
-+        assert(kill != NULL, "sanity");
-         globalAD->syntax_err(_linenum, "%s: %s %s must be at the end of the argument list\n",
-                              _ident, kill->_ident, kill_name);
-       } else if (e->isa(Component::KILL) && !e->isa(Component::USE)) {
-@@ -2340,7 +2342,8 @@
-   // Add parameters that "do not appear in match rule".
-   const char *name;
-   for (_parameters.reset(); (name = _parameters.iter()) != NULL;) {
--    OperandForm *opForm = (OperandForm*)_localNames[name];
-+    OpClassForm *opForm = _localNames[name]->is_opclass();
-+    assert(opForm != NULL, "sanity");
- 
-     if ( _components.operand_position(name) == -1 ) {
-       _components.insert(name, opForm->_ident, Component::INVALID, false);
--- a/patches/hotspot/aarch32/8217753-pr3685.patch	Thu Apr 25 05:42:42 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1549859737 0
-#      Mon Feb 11 04:35:37 2019 +0000
-# Node ID 9087f96c9d956e0141741639445ebcb8bb20e3e6
-# Parent  9ecf75ce7c7056614f22ae32745c1f06fa312482
-8217753, PR3685: Enable HotSpot builds on 5.x Linux kernels
-Summary: Remove OS version check on Linux as very unlikely a 2.2.x kernel is still in use
-
-diff --git openjdk.orig/hotspot/make/linux/Makefile openjdk/hotspot/make/linux/Makefile
---- openjdk.orig/hotspot/make/linux/Makefile
-+++ openjdk/hotspot/make/linux/Makefile
-@@ -227,20 +227,7 @@
- 	@echo "  $(TARGETS_SHARK)"
- 	@echo "  $(TARGETS_MINIMAL1)"
- 
--checks: check_os_version check_j2se_version
--
--# We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
--# Solaris 2.5.1, 2.6).
--# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
--
--SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% 4%
--OS_VERSION := $(shell uname -r)
--EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
--
--check_os_version:
--ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
--	$(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
--endif
-+checks: check_j2se_version
- 
- # jvmti.make requires XSLT (J2SE 1.4.x or newer):
- XSLT_CHECK	= $(REMOTE) $(RUN.JAVAP) javax.xml.transform.TransformerFactory
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/aarch32/8222286-pr3727-s390.patch	Mon Apr 29 00:39:04 2019 +0100
@@ -0,0 +1,1 @@
+../shenandoah/8222286-pr3727-s390.patch
\ No newline at end of file
--- a/patches/hotspot/aarch32/crash_dump_bug_url.patch	Thu Apr 25 05:42:42 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2016-05-12 21:03:31.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2016-07-21 03:39:33.780462719 +0100
-@@ -67,7 +67,7 @@
- #endif // INCLUDE_ALL_GCS
- 
- // Note: This is a special bug reporting site for the JVM
--#define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
-+#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
- #define DEFAULT_JAVA_LAUNCHER  "generic"
- 
- // Disable options not supported in this release, with a warning if they
--- a/patches/hotspot/aarch32/pr1942.patch	Thu Apr 25 05:42:42 2019 +0100
+++ b/patches/hotspot/aarch32/pr1942.patch	Mon Apr 29 00:39:04 2019 +0100
@@ -1,80 +1,1 @@
-# HG changeset patch
-# User andrew
-# Date 1408661670 -3600
-#      Thu Aug 21 23:54:30 2014 +0100
-# Node ID 877471da7fbbe69d029b990b77a70e7fcf3d02ed
-# Parent  22d29c372fc4271930e4169a66818f67e27cf6e8
-PR1942: Bug reports lack IcedTea version & distribution packaging information
-
-diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
---- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make	2016-05-12 21:03:31.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/buildtree.make	2016-07-21 04:02:40.321948126 +0100
-@@ -221,6 +221,8 @@
- 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
- 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
- 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
-+	echo "DERIVATIVE_ID = $(DERIVATIVE_ID)"; \
-+	echo "DISTRIBUTION_ID = $(DISTRIBUTION_ID)"; \
- 	echo "OPENJDK = $(OPENJDK)"; \
- 	echo "$(LP64_SETTING/$(DATA_MODE))"; \
- 	echo; \
-diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make
---- openjdk.orig/hotspot/make/linux/makefiles/vm.make	2016-07-21 03:58:43.517786089 +0100
-+++ openjdk/hotspot/make/linux/makefiles/vm.make	2016-07-21 04:03:18.853320721 +0100
-@@ -91,11 +91,11 @@
- VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
- 
- ifdef DERIVATIVE_ID
--CPPFLAGS += -DDERIVATIVE_ID="\"$(DERIVATIVE_ID)\""
-+CXXFLAGS += -DDERIVATIVE_ID="\"$(DERIVATIVE_ID)\""
- endif
- 
- ifdef DISTRIBUTION_ID
--CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
-+CXXFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
- endif
- 
- CXXFLAGS =           \
-diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/vm.make openjdk/hotspot/make/solaris/makefiles/vm.make
---- openjdk.orig/hotspot/make/solaris/makefiles/vm.make	2016-07-21 03:58:43.973778706 +0100
-+++ openjdk/hotspot/make/solaris/makefiles/vm.make	2016-07-21 04:04:14.804409599 +0100
-@@ -85,6 +85,10 @@
-   ${HS_LIB_ARCH}     \
-   ${VM_DISTRO}
- 
-+ifdef DERIVATIVE_ID
-+CXXFLAGS += -DDERIVATIVE_ID="\"$(DERIVATIVE_ID)\""
-+endif
-+
- # This is VERY important! The version define must only be supplied to vm_version.o
- # If not, ccache will not re-use the cache at all, since the version string might contain
- # a time and date.
-@@ -100,6 +104,10 @@
- CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
- endif # ifneq ($(LP64), 1)
- 
-+ifdef DISTRIBUTION_ID
-+CXXFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
-+endif
-+
- # CFLAGS_WARN holds compiler options to suppress/enable warnings.
- CFLAGS += $(CFLAGS_WARN)
- 
-diff -Nru openjdk.orig/hotspot/make/windows/makefiles/vm.make openjdk/hotspot/make/windows/makefiles/vm.make
---- openjdk.orig/hotspot/make/windows/makefiles/vm.make	2016-05-12 21:03:31.000000000 +0100
-+++ openjdk/hotspot/make/windows/makefiles/vm.make	2016-07-21 04:04:46.347895899 +0100
-@@ -67,6 +67,14 @@
- # Define that so jni.h is on correct side
- CXX_FLAGS=$(CXX_FLAGS) /D "_JNI_IMPLEMENTATION_"
- 
-+!ifdef DERIVATIVE_ID
-+CXX_FLAGS = $(CPP_FLAGS) /D "DERIVATIVE_ID=\"$(DERIVATIVE_ID)\""
-+!endif
-+ 
-+!ifdef DISTRIBUTION_ID
-+CXX_FLAGS = $(CPP_FLAGS) /D "DISTRIBUTION_ID=\"$(DISTRIBUTION_ID)\""
-+!endif
-+
- !if "$(BUILDARCH)" == "ia64"
- STACK_SIZE="/STACK:1048576,262144"
- !else
+../shenandoah/pr1942.patch
\ No newline at end of file
--- a/patches/hotspot/aarch32/pr2777.patch	Thu Apr 25 05:42:42 2019 +0100
+++ b/patches/hotspot/aarch32/pr2777.patch	Mon Apr 29 00:39:04 2019 +0100
@@ -1,299 +1,1 @@
-# HG changeset patch
-# User andrew
-# Date 1453949410 0
-#      Thu Jan 28 02:50:10 2016 +0000
-# Node ID c313c4782bb33aa4ea49f1342c54b3138af418a1
-# Parent  be477dd4629d2155bde02047cc81ca4f8b657a49
-PR2777: Fix MAX/MIN template usage on s390
-Summary: The templates can't be used without casting on s390 as size_t != uintx
-
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2017-01-23 11:25:16.256881284 +0000
-@@ -2659,7 +2659,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 -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2017-01-22 22:57:03.693835101 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2017-01-23 11:25:16.256881284 +0000
-@@ -963,7 +963,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: ");
-@@ -6589,7 +6589,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() &&
-@@ -6887,7 +6887,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 -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2017-01-23 11:25:16.256881284 +0000
-@@ -3923,7 +3923,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;
-   }
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2017-01-23 11:25:16.256881284 +0000
-@@ -1726,7 +1726,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 -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	2017-01-23 11:25:16.256881284 +0000
-@@ -89,7 +89,7 @@
-   void pretouch_internal(size_t start_page, size_t end_page);
- 
-   // Returns the index of the page which contains the given address.
--  uintptr_t  addr_to_page_index(char* addr) const;
-+  size_t  addr_to_page_index(char* addr) const;
-   // Returns the address of the given page index.
-   char*  page_start(size_t index) const;
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2017-01-23 11:25:16.256881284 +0000
-@@ -38,7 +38,7 @@
-   _cancel(false),
-   _empty(true),
-   _dropped(0) {
--  _nqueues = MAX2(ParallelGCThreads, (size_t)1);
-+  _nqueues = MAX2((size_t) ParallelGCThreads, (size_t)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);
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2017-01-23 11:26:19.311842674 +0000
-@@ -120,7 +120,7 @@
- };
- 
- G1StringDedupEntryCache::G1StringDedupEntryCache(size_t max_size) :
--  _nlists(MAX2(ParallelGCThreads, (size_t)1)),
-+  _nlists(MAX2((size_t) ParallelGCThreads, (size_t)1)),
-   _max_list_length(0),
-   _cached(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)),
-   _overflowed(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)) {
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2017-01-23 11:25:16.256881284 +0000
-@@ -108,7 +108,7 @@
-   uintx region_size = G1HeapRegionSize;
-   if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
-     size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
--    region_size = MAX2(average_heap_size / HeapRegionBounds::target_number(),
-+    region_size = MAX2((uintx) (average_heap_size / HeapRegionBounds::target_number()),
-                        (uintx) HeapRegionBounds::min_size());
-   }
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2017-01-22 22:57:03.693835101 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2017-01-23 11:25:16.260881219 +0000
-@@ -920,8 +920,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 -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2017-01-22 22:57:03.697835035 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2017-01-23 11:25:16.260881219 +0000
-@@ -200,7 +200,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 -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2017-01-23 11:25:16.260881219 +0000
-@@ -385,7 +385,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((uintx) young_gen_size_lower_bound(), smaller_new_size));
-       _initial_gen0_size = NewSize;
- 
-       // OldSize is already aligned because above we aligned MaxHeapSize to
-@@ -423,7 +423,7 @@
- 
-   // Determine maximum size of gen0
- 
--  size_t max_new_size = 0;
-+  uintx max_new_size = 0;
-   if (!FLAG_IS_DEFAULT(MaxNewSize)) {
-     max_new_size = MaxNewSize;
-   } else {
-@@ -448,7 +448,7 @@
-     _initial_gen0_size = max_new_size;
-     _max_gen0_size = max_new_size;
-   } else {
--    size_t desired_new_size = 0;
-+    uintx desired_new_size = 0;
-     if (FLAG_IS_CMDLINE(NewSize)) {
-       // If NewSize is set on the command line, we must use it as
-       // the initial size and it also makes sense to use it as the
-@@ -461,7 +461,7 @@
-       // 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);
-+        MAX2((uintx) (scale_by_NewRatio_aligned(_initial_heap_byte_size)), NewSize);
-       max_new_size = MAX2(max_new_size, NewSize);
-     } else {
-       // For the case where NewSize is the default, use NewRatio
-@@ -469,9 +469,9 @@
-       // 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((uintx) (scale_by_NewRatio_aligned(_min_heap_byte_size)), NewSize);
-       desired_new_size =
--        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
-+        MAX2((uintx) (scale_by_NewRatio_aligned(_initial_heap_byte_size)), NewSize);
-     }
- 
-     assert(_min_gen0_size > 0, "Sanity check");
-@@ -573,7 +573,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(OldSize, (uintx) (_min_heap_byte_size - _min_gen0_size));
-     _initial_gen1_size = OldSize;
- 
-     // If the user has explicitly set an OldSize that is inconsistent
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp openjdk/hotspot/src/share/vm/memory/metaspace.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/metaspace.cpp	2017-01-23 11:25:16.260881219 +0000
-@@ -1455,7 +1455,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) {
-@@ -1515,7 +1515,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: ");
-@@ -1573,7 +1573,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"
-@@ -3285,7 +3285,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 -Nru openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
---- openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2017-01-23 11:25:16.260881219 +0000
-@@ -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 -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2017-01-22 22:57:03.429839455 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2017-01-23 11:25:16.260881219 +0000
-@@ -1270,7 +1270,7 @@
-     (ParallelGCThreads == 0 ? 1 : ParallelGCThreads);
-   const size_t preferred_max_new_size_unaligned =
-     MIN2(max_heap/(NewRatio+1), ScaleForWordSize(young_gen_per_worker * parallel_gc_threads));
--  size_t preferred_max_new_size =
-+  uintx preferred_max_new_size = (uintx)
-     align_size_up(preferred_max_new_size_unaligned, os::vm_page_size());
- 
-   // Unless explicitly requested otherwise, size young gen
-@@ -1301,7 +1301,7 @@
-            " max_heap: " SIZE_FORMAT,
-            min_heap_size(), InitialHeapSize, max_heap);
-     }
--    size_t min_new = preferred_max_new_size;
-+    uintx min_new = preferred_max_new_size;
-     if (FLAG_IS_CMDLINE(NewSize)) {
-       min_new = NewSize;
-     }
-@@ -1320,7 +1320,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(NewRatio*NewSize, (uintx) (max_heap - NewSize)));
-           if (PrintGCDetails && Verbose) {
-             // Too early to use gclog_or_tty
-             tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
+../shenandoah/pr2777.patch
\ No newline at end of file