0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2015-01-09 15:57:32.423809100 -0500
0c8dc1f
@@ -2659,7 +2659,7 @@ void CFLS_LAB::get_from_global_pool(size
ff9254e
   if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
ff9254e
     size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
ff9254e
     n_blks +=  CMSOldPLABReactivityFactor*multiple*n_blks;
ff9254e
-    n_blks = MIN2(n_blks, CMSOldPLABMax);
ff9254e
+    n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax);
ff9254e
   }
ff9254e
   assert(n_blks > 0, "Error");
ff9254e
   _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2015-01-09 15:57:32.423809100 -0500
0c8dc1f
@@ -951,7 +951,7 @@ void ConcurrentMarkSweepGeneration::comp
6962f74
   if (free_percentage < desired_free_percentage) {
6962f74
     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
6962f74
     assert(desired_capacity >= capacity(), "invalid expansion size");
6962f74
-    size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
6962f74
+    size_t expand_bytes = MAX2(desired_capacity - capacity(), (size_t)MinHeapDeltaBytes);
6962f74
     if (PrintGCDetails && Verbose) {
6962f74
       size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
6962f74
       gclog_or_tty->print_cr("\nFrom compute_new_size: ");
0c8dc1f
@@ -6569,7 +6569,7 @@ void CMSCollector::reset(bool asynch) {
6962f74
     HeapWord* curAddr = _markBitMap.startWord();
6962f74
     while (curAddr < _markBitMap.endWord()) {
6962f74
       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
6962f74
-      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
6962f74
+      MemRegion chunk(curAddr, MIN2((size_t)CMSBitMapYieldQuantum, remaining));
6962f74
       _markBitMap.clear_large_range(chunk);
6962f74
       if (ConcurrentMarkSweepThread::should_yield() &&
6962f74
           !foregroundGCIsActive() &&
0c8dc1f
@@ -6868,7 +6868,7 @@ void CMSMarkStack::expand() {
6962f74
     return;
6962f74
   }
6962f74
   // Double capacity if possible
6962f74
-  size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
6962f74
+  size_t new_capacity = MIN2(_capacity*2, (size_t)MarkStackSizeMax);
6962f74
   // Do not give up existing stack until we have managed to
6962f74
   // get the double capacity that we desired.
6962f74
   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2015-01-09 15:57:32.423809100 -0500
0c8dc1f
@@ -3891,7 +3891,7 @@ void CMTask::drain_local_queue(bool part
ff9254e
   // of things to do) or totally (at the very end).
ff9254e
   size_t target_size;
ff9254e
   if (partially) {
ff9254e
-    target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
ff9254e
+    target_size = MIN2((size_t)(_task_queue->max_elems()/3), (size_t) GCDrainStackTargetSize);
ff9254e
   } else {
ff9254e
     target_size = 0;
ff9254e
   }
0c8dc1f
@@ -4717,7 +4717,7 @@ size_t G1PrintRegionLivenessInfoClosure:
ff9254e
   // The > 0 check is to deal with the prev and next live bytes which
ff9254e
   // could be 0.
ff9254e
   if (*hum_bytes > 0) {
ff9254e
-    bytes = MIN2(HeapRegion::GrainBytes, *hum_bytes);
ff9254e
+    bytes = MIN2(HeapRegion::GrainBytes, (size_t)*hum_bytes);
ff9254e
     *hum_bytes -= bytes;
ff9254e
   }
ff9254e
   return bytes;
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2015-01-09 15:57:32.423809100 -0500
0c8dc1f
@@ -1737,7 +1737,7 @@ HeapWord* G1CollectedHeap::expand_and_al
ff9254e
 
ff9254e
   verify_region_sets_optional();
ff9254e
 
ff9254e
-  size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes);
ff9254e
+  size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes);
ff9254e
   ergo_verbose1(ErgoHeapSizing,
ff9254e
                 "attempt heap expansion",
ff9254e
                 ergo_format_reason("allocation request failed")
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp.s390	2015-01-09 16:12:23.063809100 -0500
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2015-01-09 16:13:02.213809100 -0500
0c8dc1f
@@ -38,7 +38,7 @@ G1StringDedupQueue::G1StringDedupQueue()
0c8dc1f
   _cancel(false),
0c8dc1f
   _empty(true),
0c8dc1f
   _dropped(0) {
0c8dc1f
-  _nqueues = MAX2(ParallelGCThreads, (size_t)1);
0c8dc1f
+  _nqueues = MAX2(ParallelGCThreads, (uintx)1);
0c8dc1f
   _queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
0c8dc1f
   for (size_t i = 0; i < _nqueues; i++) {
0c8dc1f
     new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp.s390	2015-01-09 16:13:29.713809100 -0500
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2015-01-09 16:13:57.713809100 -0500
0c8dc1f
@@ -110,7 +110,7 @@ public:
0c8dc1f
 };
0c8dc1f
 
0c8dc1f
 G1StringDedupEntryCache::G1StringDedupEntryCache() {
0c8dc1f
-  _nlists = MAX2(ParallelGCThreads, (size_t)1);
0c8dc1f
+  _nlists = MAX2(ParallelGCThreads, (uintx)1);
0c8dc1f
   _lists = PaddedArray<G1StringDedupEntryFreeList, mtGC>::create_unfreeable((uint)_nlists);
0c8dc1f
 }
0c8dc1f
 
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp.s390	2015-01-09 16:14:57.193809100 -0500
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2015-01-09 16:15:41.163809100 -0500
0c8dc1f
@@ -147,7 +147,7 @@ void HeapRegion::setup_heap_region_size(
ea67b67
   if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
ea67b67
     size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
0c8dc1f
     region_size = MAX2(average_heap_size / HeapRegionBounds::target_number(),
0c8dc1f
-                       (uintx) HeapRegionBounds::min_size());
0c8dc1f
+                       HeapRegionBounds::min_size());
ea67b67
   }
ea67b67
 
ea67b67
   int region_size_log = log2_long((jlong) region_size);
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2015-01-09 16:16:27.533809100 -0500
0c8dc1f
@@ -833,7 +833,7 @@ OtherRegionsTable::do_cleanup_work(HRRSC
ff9254e
 // This can be done by either mutator threads together with the
ff9254e
 // concurrent refinement threads or GC threads.
cf544ea
 uint HeapRegionRemSet::num_par_rem_sets() {
cf544ea
-  return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (uint)ParallelGCThreads);
0c8dc1f
+  return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
ff9254e
 }
ff9254e
 
ff9254e
 HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2015-01-09 15:57:32.423809100 -0500
0c8dc1f
@@ -910,8 +910,8 @@ void PSParallelCompact::initialize_space
6962f74
 void PSParallelCompact::initialize_dead_wood_limiter()
6962f74
 {
6962f74
   const size_t max = 100;
6962f74
-  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
6962f74
-  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
6962f74
+  _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0;
6962f74
+  _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
6962f74
   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
6962f74
   DEBUG_ONLY(_dwl_initialized = true;)
6962f74
   _dwl_adjustment = normal_distribution(1.0);
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.s390 jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2015-01-09 15:57:32.423809100 -0500
0c8dc1f
@@ -194,7 +194,7 @@ bool ParScanThreadState::take_from_overf
337e4b1
   const size_t num_overflow_elems = of_stack->size();
337e4b1
   const size_t space_available = queue->max_elems() - queue->size();
337e4b1
   const size_t num_take_elems = MIN3(space_available / 4,
337e4b1
-                                     ParGCDesiredObjsFromOverflowList,
337e4b1
+                                     (size_t)ParGCDesiredObjsFromOverflowList,
337e4b1
                                      num_overflow_elems);
337e4b1
   // Transfer the most recent num_take_elems from the overflow
337e4b1
   // stack to our work queue.
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.s390 jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp	2015-01-09 16:05:36.093809100 -0500
0c8dc1f
@@ -389,7 +389,7 @@ void TwoGenerationCollectorPolicy::initi
ea67b67
       uintx calculated_size = NewSize + OldSize;
ea67b67
       double shrink_factor = (double) MaxHeapSize / calculated_size;
ea67b67
       uintx smaller_new_size = align_size_down((uintx)(NewSize * shrink_factor), _gen_alignment);
ea67b67
-      FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), smaller_new_size));
ea67b67
+      FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), (size_t)smaller_new_size));
ea67b67
       _initial_gen0_size = NewSize;
ea67b67
 
ea67b67
       // OldSize is already aligned because above we aligned MaxHeapSize to
0c8dc1f
@@ -437,7 +437,7 @@ void GenCollectorPolicy::initialize_size
6962f74
     // yield a size that is too small) and bound it by MaxNewSize above.
6962f74
     // Ergonomics plays here by previously calculating the desired
6962f74
     // NewSize and MaxNewSize.
6962f74
-    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
6962f74
+    max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize);
6962f74
   }
6962f74
   assert(max_new_size > 0, "All paths should set max_new_size");
6962f74
 
0c8dc1f
@@ -459,24 +459,23 @@ void GenCollectorPolicy::initialize_size
cf544ea
       // lower limit.
ff9254e
       _min_gen0_size = NewSize;
ff9254e
       desired_new_size = NewSize;
ff9254e
-      max_new_size = MAX2(max_new_size, NewSize);
ff9254e
+      max_new_size = MAX2(max_new_size, (size_t)NewSize);
cf544ea
     } else if (FLAG_IS_ERGO(NewSize)) {
cf544ea
       // If NewSize is set ergonomically, we should use it as a lower
cf544ea
       // limit, but use NewRatio to calculate the initial size.
0c8dc1f
       _min_gen0_size = NewSize;
0c8dc1f
       desired_new_size =
0c8dc1f
-        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
0c8dc1f
-      max_new_size = MAX2(max_new_size, NewSize);
0c8dc1f
+        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
0c8dc1f
+      max_new_size = MAX2(max_new_size, (size_t)NewSize);
0c8dc1f
     } else {
0c8dc1f
       // For the case where NewSize is the default, use NewRatio
0c8dc1f
       // to size the minimum and initial generation sizes.
ea67b67
       // Use the default NewSize as the floor for these values.  If
ff9254e
       // NewRatio is overly large, the resulting sizes can be too
ff9254e
       // small.
ea67b67
-      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
ea67b67
+      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), (size_t)NewSize);
ff9254e
       desired_new_size =
ea67b67
-        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
cf544ea
-    }
cf544ea
+        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);    }
ff9254e
 
ff9254e
     assert(_min_gen0_size > 0, "Sanity check");
cf544ea
     _initial_gen0_size = desired_new_size;
0c8dc1f
@@ -577,7 +576,7 @@ void TwoGenerationCollectorPolicy::initi
ff9254e
   } else {
ea67b67
     // It's been explicitly set on the command line.  Use the
ea67b67
     // OldSize and then determine the consequences.
ea67b67
-    _min_gen1_size = MIN2(OldSize, _min_heap_byte_size - _min_gen0_size);
ea67b67
+    _min_gen1_size = MIN2((size_t)OldSize, _min_heap_byte_size - _min_gen0_size);
ea67b67
     _initial_gen1_size = OldSize;
ea67b67
 
ea67b67
     // If the user has explicitly set an OldSize that is inconsistent
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/memory/metaspace.cpp.s390 jdk8/hotspot/src/share/vm/memory/metaspace.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/memory/metaspace.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp	2015-01-09 16:18:54.233809100 -0500
0c8dc1f
@@ -1455,7 +1455,7 @@ void MetaspaceGC::initialize() {
0c8dc1f
 
0c8dc1f
 void MetaspaceGC::post_initialize() {
0c8dc1f
   // Reset the high-water mark once the VM initialization is done.
0c8dc1f
-  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
0c8dc1f
+  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize);
0c8dc1f
 }
0c8dc1f
 
0c8dc1f
 bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
0c8dc1f
@@ -1515,7 +1515,7 @@ void MetaspaceGC::compute_new_size() {
6962f74
     (size_t)MIN2(min_tmp, double(max_uintx));
6962f74
   // Don't shrink less than the initial generation size
6962f74
   minimum_desired_capacity = MAX2(minimum_desired_capacity,
6962f74
-                                  MetaspaceSize);
6962f74
+                                  (size_t)MetaspaceSize);
6962f74
 
6962f74
   if (PrintGCDetails && Verbose) {
ea67b67
     gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
0c8dc1f
@@ -1573,7 +1573,7 @@ void MetaspaceGC::compute_new_size() {
6962f74
     const double max_tmp = used_after_gc / minimum_used_percentage;
6962f74
     size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
6962f74
     maximum_desired_capacity = MAX2(maximum_desired_capacity,
6962f74
-                                    MetaspaceSize);
6962f74
+                                    (size_t)MetaspaceSize);
ea67b67
     if (PrintGCDetails && Verbose) {
6962f74
       gclog_or_tty->print_cr("  "
6962f74
                              "  maximum_free_percentage: %6.2f"
0c8dc1f
@@ -3235,7 +3235,7 @@ void Metaspace::global_initialize() {
6962f74
     // on the medium chunk list.   The next chunk will be small and progress
6962f74
     // from there.  This size calculated by -version.
6962f74
     _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
ea67b67
-                                       (CompressedClassSpaceSize/BytesPerWord)*2);
ea67b67
+                                       (size_t)(CompressedClassSpaceSize/BytesPerWord)*2);
6962f74
     _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
6962f74
     // Arbitrarily set the initial virtual space to a multiple
6962f74
     // of the boot class loader size.
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.s390 jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2015-01-09 15:57:32.423809100 -0500
0c8dc1f
@@ -238,7 +238,7 @@ size_t ThreadLocalAllocBuffer::initial_d
6962f74
   size_t init_sz;
6962f74
 
6962f74
   if (TLABSize > 0) {
6962f74
-    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
6962f74
+    init_sz = MIN2((size_t)(TLABSize / HeapWordSize), max_size());
6962f74
   } else if (global_stats() == NULL) {
6962f74
     // Startup issue - main thread initialized before heap initialized.
6962f74
     init_sz = min_size();
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.s390 jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2015-01-09 15:57:32.423809100 -0500
337e4b1
@@ -48,7 +48,7 @@ void ObjArrayKlass::objarray_follow_cont
ff9254e
   const size_t beg_index = size_t(index);
ff9254e
   assert(beg_index < len || len == 0, "index too large");
ff9254e
 
ff9254e
-  const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
ff9254e
+  const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
ff9254e
   const size_t end_index = beg_index + stride;
ff9254e
   T* const base = (T*)a->base();
ff9254e
   T* const beg = base + beg_index;
337e4b1
@@ -82,7 +82,7 @@ void ObjArrayKlass::objarray_follow_cont
ff9254e
   const size_t beg_index = size_t(index);
ff9254e
   assert(beg_index < len || len == 0, "index too large");
ff9254e
 
ff9254e
-  const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
ff9254e
+  const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
ff9254e
   const size_t end_index = beg_index + stride;
ff9254e
   T* const base = (T*)a->base();
ff9254e
   T* const beg = base + beg_index;
0c8dc1f
diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.s390 jdk8/hotspot/src/share/vm/runtime/arguments.cpp
0c8dc1f
--- jdk8/hotspot/src/share/vm/runtime/arguments.cpp.s390	2014-10-23 18:32:14.000000000 -0400
0c8dc1f
+++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp	2015-01-09 15:57:32.423809100 -0500
0c8dc1f
@@ -1250,7 +1250,7 @@ void Arguments::set_cms_and_parnew_gc_fl
6962f74
     // NewSize was set on the command line and it is larger than
6962f74
     // preferred_max_new_size.
6962f74
     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
6962f74
-      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
6962f74
+      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t)NewSize, preferred_max_new_size));
6962f74
     } else {
6962f74
       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
6962f74
     }
0c8dc1f
@@ -1275,8 +1275,8 @@ void Arguments::set_cms_and_parnew_gc_fl
6962f74
       // Unless explicitly requested otherwise, make young gen
6962f74
       // at least min_new, and at most preferred_max_new_size.
6962f74
       if (FLAG_IS_DEFAULT(NewSize)) {
6962f74
-        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
6962f74
-        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
6962f74
+        FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t)NewSize, min_new));
6962f74
+        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize));
6962f74
         if (PrintGCDetails && Verbose) {
6962f74
           // Too early to use gclog_or_tty
6962f74
           tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
0c8dc1f
@@ -1286,7 +1286,7 @@ void Arguments::set_cms_and_parnew_gc_fl
ff9254e
       // so it's NewRatio x of NewSize.
ff9254e
       if (FLAG_IS_DEFAULT(OldSize)) {
ff9254e
         if (max_heap > NewSize) {
ff9254e
-          FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize));
ff9254e
+          FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize));
ff9254e
           if (PrintGCDetails && Verbose) {
ff9254e
             // Too early to use gclog_or_tty
ff9254e
             tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);