Blame SOURCES/jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch

935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -2689,7 +2689,7 @@
ecab97
   if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
ecab97
     size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
ecab97
     n_blks +=  CMSOldPLABReactivityFactor*multiple*n_blks;
ecab97
-    n_blks = MIN2(n_blks, CMSOldPLABMax);
ecab97
+    n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax);
ecab97
   }
ecab97
   assert(n_blks > 0, "Error");
ecab97
   _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -961,7 +961,7 @@
ecab97
   if (free_percentage < desired_free_percentage) {
ecab97
     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
ecab97
     assert(desired_capacity >= capacity(), "invalid expansion size");
ecab97
-    size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
ecab97
+    size_t expand_bytes = MAX2(desired_capacity - capacity(), (size_t)MinHeapDeltaBytes);
ecab97
     if (PrintGCDetails && Verbose) {
ecab97
       size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
ecab97
       gclog_or_tty->print_cr("\nFrom compute_new_size: ");
935881
@@ -6591,7 +6591,7 @@
ecab97
     HeapWord* curAddr = _markBitMap.startWord();
ecab97
     while (curAddr < _markBitMap.endWord()) {
ecab97
       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
ecab97
-      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
ecab97
+      MemRegion chunk(curAddr, MIN2((size_t)CMSBitMapYieldQuantum, remaining));
ecab97
       _markBitMap.clear_large_range(chunk);
ecab97
       if (ConcurrentMarkSweepThread::should_yield() &&
ecab97
           !foregroundGCIsActive() &&
935881
@@ -6889,7 +6889,7 @@
ecab97
     return;
ecab97
   }
ecab97
   // Double capacity if possible
ecab97
-  size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
ecab97
+  size_t new_capacity = MIN2(_capacity*2, (size_t)MarkStackSizeMax);
ecab97
   // Do not give up existing stack until we have managed to
ecab97
   // get the double capacity that we desired.
ecab97
   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/g1/concurrentMark.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -3916,7 +3916,7 @@
ecab97
   // of things to do) or totally (at the very end).
ecab97
   size_t target_size;
ecab97
   if (partially) {
ecab97
-    target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
935881
+    target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize);
ecab97
   } else {
ecab97
     target_size = 0;
ecab97
   }
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -78,7 +78,8 @@
935881
     size_t num_target_elems = pointer_delta(end, bottom, mapping_granularity_in_bytes);
935881
     idx_t bias = (uintptr_t)bottom / mapping_granularity_in_bytes;
935881
     address base = create_new_base_array(num_target_elems, target_elem_size_in_bytes);
935881
-    initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, log2_intptr(mapping_granularity_in_bytes));
935881
+    initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes,
935881
+		    log2_intptr((uintptr_t)mapping_granularity_in_bytes));
ecab97
   }
935881
 
935881
   size_t bias() const { return _bias; }
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Tue Sep 08 22:20:44 2020 -0400
ecab97
@@ -1729,7 +1729,7 @@
ecab97
 
ecab97
   verify_region_sets_optional();
ecab97
 
ecab97
-  size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes);
ecab97
+  size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes);
ecab97
   ergo_verbose1(ErgoHeapSizing,
ecab97
                 "attempt heap expansion",
ecab97
                 ergo_format_reason("allocation request failed")
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/g1/g1ConcurrentMarkObjArrayProcessor.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1ConcurrentMarkObjArrayProcessor.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1ConcurrentMarkObjArrayProcessor.cpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -41,7 +41,7 @@
ecab97
 }
ecab97
 
935881
 size_t G1CMObjArrayProcessor::process_array_slice(objArrayOop obj, HeapWord* start_from, size_t remaining) {
935881
-  size_t words_to_scan = MIN2(remaining, ObjArrayMarkingStride);
935881
+  size_t words_to_scan = MIN2(remaining, (size_t)ObjArrayMarkingStride);
935881
 
935881
   if (remaining > ObjArrayMarkingStride) {
935881
     push_array_slice(start_from + ObjArrayMarkingStride);
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -89,7 +89,7 @@
935881
   void pretouch_internal(size_t start_page, size_t end_page);
935881
 
935881
   // Returns the index of the page which contains the given address.
935881
-  uintptr_t  addr_to_page_index(char* addr) const;
935881
+  size_t  addr_to_page_index(char* addr) const;
935881
   // Returns the address of the given page index.
935881
   char*  page_start(size_t index) const;
ecab97
 
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	Tue Sep 08 22:20:44 2020 -0400
ecab97
@@ -38,7 +38,7 @@
ecab97
   _cancel(false),
ecab97
   _empty(true),
ecab97
   _dropped(0) {
ecab97
-  _nqueues = MAX2(ParallelGCThreads, (size_t)1);
ecab97
+  _nqueues = MAX2(ParallelGCThreads, (uintx)1);
ecab97
   _queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
ecab97
   for (size_t i = 0; i < _nqueues; i++) {
ecab97
     new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	Tue Sep 08 22:20:44 2020 -0400
ecab97
@@ -120,7 +120,7 @@
ecab97
 };
ecab97
 
ecab97
 G1StringDedupEntryCache::G1StringDedupEntryCache(size_t max_size) :
ecab97
-  _nlists(MAX2(ParallelGCThreads, (size_t)1)),
ecab97
+  _nlists(MAX2(ParallelGCThreads, (uintx)1)),
ecab97
   _max_list_length(0),
ecab97
   _cached(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)),
ecab97
   _overflowed(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)) {
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/g1/heapRegion.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -110,7 +110,7 @@
ecab97
   if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
ecab97
     size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
ecab97
     region_size = MAX2(average_heap_size / HeapRegionBounds::target_number(),
ecab97
-                       (uintx) HeapRegionBounds::min_size());
ecab97
+                       HeapRegionBounds::min_size());
ecab97
   }
ecab97
 
ecab97
   int region_size_log = log2_long((jlong) region_size);
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Tue Sep 08 22:20:44 2020 -0400
ecab97
@@ -194,7 +194,7 @@
ecab97
   const size_t num_overflow_elems = of_stack->size();
ecab97
   const size_t space_available = queue->max_elems() - queue->size();
ecab97
   const size_t num_take_elems = MIN3(space_available / 4,
ecab97
-                                     ParGCDesiredObjsFromOverflowList,
ecab97
+                                     (size_t)ParGCDesiredObjsFromOverflowList,
ecab97
                                      num_overflow_elems);
ecab97
   // Transfer the most recent num_take_elems from the overflow
ecab97
   // stack to our work queue.
935881
diff -r 4689eaf1a5c9 src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -912,7 +912,7 @@
935881
 
ecab97
 void PSParallelCompact::initialize_dead_wood_limiter()
ecab97
 {
935881
-  const size_t max = 100;
935881
+  const uintx max = 100;
935881
   _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
935881
   _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
ecab97
   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
935881
diff -r 4689eaf1a5c9 src/share/vm/memory/collectorPolicy.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	Tue Sep 08 22:20:44 2020 -0400
ecab97
@@ -385,7 +385,7 @@
ecab97
       uintx calculated_size = NewSize + OldSize;
ecab97
       double shrink_factor = (double) MaxHeapSize / calculated_size;
ecab97
       uintx smaller_new_size = align_size_down((uintx)(NewSize * shrink_factor), _gen_alignment);
ecab97
-      FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), smaller_new_size));
935881
+      FLAG_SET_ERGO(uintx, NewSize, MAX2((uintx)young_gen_size_lower_bound(), smaller_new_size));
ecab97
       _initial_gen0_size = NewSize;
ecab97
 
ecab97
       // OldSize is already aligned because above we aligned MaxHeapSize to
ecab97
@@ -433,7 +433,7 @@
ecab97
     // yield a size that is too small) and bound it by MaxNewSize above.
ecab97
     // Ergonomics plays here by previously calculating the desired
ecab97
     // NewSize and MaxNewSize.
ecab97
-    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
ecab97
+    max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize);
ecab97
   }
ecab97
   assert(max_new_size > 0, "All paths should set max_new_size");
ecab97
 
935881
@@ -455,23 +455,25 @@
ecab97
       // lower limit.
ecab97
       _min_gen0_size = NewSize;
ecab97
       desired_new_size = NewSize;
ecab97
-      max_new_size = MAX2(max_new_size, NewSize);
ecab97
+      max_new_size = MAX2(max_new_size, (size_t)NewSize);
ecab97
     } else if (FLAG_IS_ERGO(NewSize)) {
ecab97
       // If NewSize is set ergonomically, we should use it as a lower
ecab97
       // limit, but use NewRatio to calculate the initial size.
ecab97
       _min_gen0_size = NewSize;
ecab97
       desired_new_size =
ecab97
-        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
ecab97
-      max_new_size = MAX2(max_new_size, NewSize);
ecab97
+        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
ecab97
+      max_new_size = MAX2(max_new_size, (size_t)NewSize);
ecab97
     } else {
ecab97
       // For the case where NewSize is the default, use NewRatio
ecab97
       // to size the minimum and initial generation sizes.
ecab97
       // Use the default NewSize as the floor for these values.  If
ecab97
       // NewRatio is overly large, the resulting sizes can be too
ecab97
       // small.
ecab97
-      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
935881
+      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size),
935881
+			    (size_t)NewSize);
ecab97
       desired_new_size =
ecab97
-        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
935881
+        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size),
935881
+	     (size_t)NewSize);
935881
     }
ecab97
 
ecab97
     assert(_min_gen0_size > 0, "Sanity check");
935881
@@ -573,7 +575,7 @@
ecab97
   } else {
ecab97
     // It's been explicitly set on the command line.  Use the
ecab97
     // OldSize and then determine the consequences.
ecab97
-    _min_gen1_size = MIN2(OldSize, _min_heap_byte_size - _min_gen0_size);
ecab97
+    _min_gen1_size = MIN2((size_t)OldSize, _min_heap_byte_size - _min_gen0_size);
ecab97
     _initial_gen1_size = OldSize;
ecab97
 
ecab97
     // If the user has explicitly set an OldSize that is inconsistent
935881
diff -r 4689eaf1a5c9 src/share/vm/memory/metaspace.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/memory/metaspace.cpp	Tue Sep 08 22:20:44 2020 -0400
ecab97
@@ -1482,7 +1482,7 @@
ecab97
 
ecab97
 void MetaspaceGC::post_initialize() {
ecab97
   // Reset the high-water mark once the VM initialization is done.
ecab97
-  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
ecab97
+  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize);
ecab97
 }
ecab97
 
ecab97
 bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
ecab97
@@ -1542,7 +1542,7 @@
ecab97
     (size_t)MIN2(min_tmp, double(MaxMetaspaceSize));
ecab97
   // Don't shrink less than the initial generation size
ecab97
   minimum_desired_capacity = MAX2(minimum_desired_capacity,
ecab97
-                                  MetaspaceSize);
ecab97
+                                  (size_t)MetaspaceSize);
ecab97
 
ecab97
   if (PrintGCDetails && Verbose) {
ecab97
     gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
ecab97
@@ -1600,7 +1600,7 @@
ecab97
     const double max_tmp = used_after_gc / minimum_used_percentage;
ecab97
     size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(MaxMetaspaceSize));
ecab97
     maximum_desired_capacity = MAX2(maximum_desired_capacity,
ecab97
-                                    MetaspaceSize);
ecab97
+                                    (size_t)MetaspaceSize);
ecab97
     if (PrintGCDetails && Verbose) {
ecab97
       gclog_or_tty->print_cr("  "
ecab97
                              "  maximum_free_percentage: %6.2f"
935881
@@ -3320,7 +3320,7 @@
935881
     // Make the first class chunk bigger than a medium chunk so it's not put
ecab97
     // on the medium chunk list.   The next chunk will be small and progress
ecab97
     // from there.  This size calculated by -version.
935881
-    _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
935881
+    _first_class_chunk_word_size = MIN2((uintx)MediumChunk*6,
935881
                                        (CompressedClassSpaceSize/BytesPerWord)*2);
ecab97
     _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
ecab97
     // Arbitrarily set the initial virtual space to a multiple
935881
diff -r 4689eaf1a5c9 src/share/vm/oops/objArrayKlass.inline.hpp
935881
--- openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	Tue Sep 08 22:20:44 2020 -0400
ecab97
@@ -48,7 +48,7 @@
ecab97
   const size_t beg_index = size_t(index);
ecab97
   assert(beg_index < len || len == 0, "index too large");
ecab97
 
ecab97
-  const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
ecab97
+  const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
ecab97
   const size_t end_index = beg_index + stride;
ecab97
   T* const base = (T*)a->base();
ecab97
   T* const beg = base + beg_index;
ecab97
@@ -82,7 +82,7 @@
ecab97
   const size_t beg_index = size_t(index);
ecab97
   assert(beg_index < len || len == 0, "index too large");
ecab97
 
ecab97
-  const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
ecab97
+  const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
ecab97
   const size_t end_index = beg_index + stride;
ecab97
   T* const base = (T*)a->base();
ecab97
   T* const beg = base + beg_index;
935881
diff -r 4689eaf1a5c9 src/share/vm/runtime/arguments.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -1301,7 +1301,7 @@
ecab97
     // NewSize was set on the command line and it is larger than
ecab97
     // preferred_max_new_size.
ecab97
     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
ecab97
-      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
ecab97
+      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t)NewSize, preferred_max_new_size));
ecab97
     } else {
ecab97
       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
ecab97
     }
935881
@@ -1326,8 +1326,8 @@
ecab97
       // Unless explicitly requested otherwise, make young gen
ecab97
       // at least min_new, and at most preferred_max_new_size.
ecab97
       if (FLAG_IS_DEFAULT(NewSize)) {
ecab97
-        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
ecab97
-        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
ecab97
+        FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t)NewSize, min_new));
ecab97
+        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize));
ecab97
         if (PrintGCDetails && Verbose) {
ecab97
           // Too early to use gclog_or_tty
ecab97
           tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
935881
@@ -1337,7 +1337,7 @@
ecab97
       // so it's NewRatio x of NewSize.
ecab97
       if (FLAG_IS_DEFAULT(OldSize)) {
ecab97
         if (max_heap > NewSize) {
ecab97
-          FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize));
ecab97
+          FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize));
ecab97
           if (PrintGCDetails && Verbose) {
ecab97
             // Too early to use gclog_or_tty
ecab97
             tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
935881
diff -r 4689eaf1a5c9 src/share/vm/runtime/os.cpp
935881
--- openjdk.orig/hotspot/src/share/vm/runtime/os.cpp	Mon Aug 31 07:09:56 2020 +0100
935881
+++ openjdk/hotspot/src/share/vm/runtime/os.cpp	Tue Sep 08 22:20:44 2020 -0400
935881
@@ -1272,7 +1272,7 @@
56ca5d
 }
56ca5d
 
935881
 void os::set_memory_serialize_page(address page) {
935881
-  int count = log2_intptr(sizeof(class JavaThread)) - log2_int(64);
935881
+  int count = log2_intptr((uintptr_t)sizeof(class JavaThread)) - log2_int(64);
935881
   _mem_serialize_page = (volatile int32_t *)page;
935881
   // We initialize the serialization page shift count here
935881
   // We assume a cache line size of 64 bytes