/hg/release/icedtea7-forest-2.4/hotspot: 3 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Wed Sep 18 16:00:45 PDT 2013


changeset af221c82682c in /hg/release/icedtea7-forest-2.4/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/hotspot?cmd=changeset;node=af221c82682c
author: andrew
date: Wed Sep 18 21:34:50 2013 +0100

	Cast should use same type as GCDrainStackTargetSize (uintx).


changeset c39d06e6c10d in /hg/release/icedtea7-forest-2.4/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/hotspot?cmd=changeset;node=c39d06e6c10d
author: tschatzl
date: Tue Sep 17 12:04:11 2013 +0200

	8024914: Swapped usage of idx_t and bm_word_t types in bitMap.inline.hpp
	Summary: Incorrect usage of idx_t where bm_word_t is appropriate.
	Reviewed-by: tschatzl, brutisso
	Contributed-by: Dan Horak <dhorak at redhat.com>


changeset b732355257e3 in /hg/release/icedtea7-forest-2.4/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/hotspot?cmd=changeset;node=b732355257e3
author: andrew
date: Thu Sep 19 00:00:25 2013 +0100

	Add casts to fix build on S390


diffstat:

 src/share/vm/compiler/methodLiveness.cpp                                        |  12 +++---
 src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp |   2 +-
 src/share/vm/gc_implementation/g1/concurrentMark.cpp                            |   2 +-
 src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp                           |   2 +-
 src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp                          |   2 +-
 src/share/vm/gc_implementation/parNew/parNewGeneration.cpp                      |   2 +-
 src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp               |   2 +-
 src/share/vm/memory/collectorPolicy.cpp                                         |  16 ++++----
 src/share/vm/oops/objArrayKlass.inline.hpp                                      |   4 +-
 src/share/vm/runtime/arguments.cpp                                              |   2 +-
 src/share/vm/utilities/bitMap.inline.hpp                                        |  20 +++++-----
 11 files changed, 33 insertions(+), 33 deletions(-)

diffs (250 lines):

diff -r 4fc9d4d964ad -r b732355257e3 src/share/vm/compiler/methodLiveness.cpp
--- a/src/share/vm/compiler/methodLiveness.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/compiler/methodLiveness.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -572,15 +572,15 @@
 
 
 MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) :
-         _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+         _gen((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
                          analyzer->bit_map_size_bits()),
-         _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+         _kill((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
                          analyzer->bit_map_size_bits()),
-         _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+         _entry((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
                          analyzer->bit_map_size_bits()),
-         _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+         _normal_exit((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
                          analyzer->bit_map_size_bits()),
-         _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+         _exception_exit((BitMap::bm_word_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
                          analyzer->bit_map_size_bits()),
          _last_bci(-1) {
   _analyzer = analyzer;
@@ -998,7 +998,7 @@
 }
 
 MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) {
-  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()),
+  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(BitMap::bm_word_t, _analyzer->bit_map_size_words()),
                 _analyzer->bit_map_size_bits());
   answer.set_is_valid();
 
diff -r 4fc9d4d964ad -r b732355257e3 src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -2678,7 +2678,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 -r 4fc9d4d964ad -r b732355257e3 src/share/vm/gc_implementation/g1/concurrentMark.cpp
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -3632,7 +3632,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((uintx)_task_queue->max_elems()/3, GCDrainStackTargetSize);
   } else {
     target_size = 0;
   }
diff -r 4fc9d4d964ad -r b732355257e3 src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -1735,7 +1735,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 -r 4fc9d4d964ad -r b732355257e3 src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
--- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -840,7 +840,7 @@
 // This can be done by either mutator threads together with the
 // concurrent refinement threads or GC threads.
 int HeapRegionRemSet::num_par_rem_sets() {
-  return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
+  return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (size_t)ParallelGCThreads);
 }
 
 HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
diff -r 4fc9d4d964ad -r b732355257e3 src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
--- a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -192,7 +192,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 -r 4fc9d4d964ad -r b732355257e3 src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
--- a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -69,7 +69,7 @@
   if (_virtual_space != NULL && _virtual_space->expand_by(_reserved_byte_size)) {
     _region_start = covered_region.start();
     _region_size = covered_region.word_size();
-    idx_t* map = (idx_t*)_virtual_space->reserved_low_addr();
+    BitMap::bm_word_t* map = (BitMap::bm_word_t*)_virtual_space->reserved_low_addr();
     _beg_bits.set_map(map);
     _beg_bits.set_size(bits / 2);
     _end_bits.set_map(map + words / 2);
diff -r 4fc9d4d964ad -r b732355257e3 src/share/vm/memory/collectorPolicy.cpp
--- a/src/share/vm/memory/collectorPolicy.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/memory/collectorPolicy.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -361,7 +361,7 @@
       // generally small compared to the NewRatio calculation.
       _min_gen0_size = NewSize;
       desired_new_size = NewSize;
-      max_new_size = MAX2(max_new_size, NewSize);
+      max_new_size = MAX2(max_new_size, (size_t)NewSize);
     } else {
       // For the case where NewSize is the default, use NewRatio
       // to size the minimum and initial generation sizes.
@@ -369,10 +369,10 @@
       // NewRatio is overly large, the resulting sizes can be too
       // small.
       _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()),
-                          NewSize);
+                          (size_t)NewSize);
       desired_new_size =
         MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()),
-             NewSize);
+             (size_t)NewSize);
     }
 
     assert(_min_gen0_size > 0, "Sanity check");
@@ -427,14 +427,14 @@
       // Adjust gen0 down to accomodate OldSize
       *gen0_size_ptr = heap_size - min_gen0_size;
       *gen0_size_ptr =
-        MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()),
+        MAX2((size_t)align_size_down(*gen0_size_ptr, min_alignment()),
              min_alignment());
       assert(*gen0_size_ptr > 0, "Min gen0 is too large");
       result = true;
     } else {
       *gen1_size_ptr = heap_size - *gen0_size_ptr;
       *gen1_size_ptr =
-        MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()),
+        MAX2((size_t)align_size_down(*gen1_size_ptr, min_alignment()),
                        min_alignment());
     }
   }
@@ -458,7 +458,7 @@
   // for setting the gen1 maximum.
   _max_gen1_size = max_heap_byte_size() - _max_gen0_size;
   _max_gen1_size =
-    MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()),
+    MAX2((size_t)align_size_down(_max_gen1_size, min_alignment()),
          min_alignment());
   // If no explicit command line flag has been set for the
   // gen1 size, use what is left for gen1.
@@ -472,11 +472,11 @@
       "gen0 has an unexpected minimum size");
     set_min_gen1_size(min_heap_byte_size() - min_gen0_size());
     set_min_gen1_size(
-      MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()),
+      MAX2((size_t)align_size_down(_min_gen1_size, min_alignment()),
            min_alignment()));
     set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size());
     set_initial_gen1_size(
-      MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()),
+      MAX2((size_t)align_size_down(_initial_gen1_size, min_alignment()),
            min_alignment()));
 
   } else {
diff -r 4fc9d4d964ad -r b732355257e3 src/share/vm/oops/objArrayKlass.inline.hpp
--- a/src/share/vm/oops/objArrayKlass.inline.hpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/oops/objArrayKlass.inline.hpp	Thu Sep 19 00:00:25 2013 +0100
@@ -46,7 +46,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;
@@ -80,7 +80,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 -r 4fc9d4d964ad -r b732355257e3 src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/runtime/arguments.cpp	Thu Sep 19 00:00:25 2013 +0100
@@ -1240,7 +1240,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((size_t)(NewRatio*NewSize), max_heap - NewSize));
           if (PrintGCDetails && Verbose) {
             // Too early to use gclog_or_tty
             tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
diff -r 4fc9d4d964ad -r b732355257e3 src/share/vm/utilities/bitMap.inline.hpp
--- a/src/share/vm/utilities/bitMap.inline.hpp	Thu Sep 12 15:52:17 2013 +0100
+++ b/src/share/vm/utilities/bitMap.inline.hpp	Thu Sep 19 00:00:25 2013 +0100
@@ -52,16 +52,16 @@
 
 inline bool BitMap::par_set_bit(idx_t bit) {
   verify_index(bit);
-  volatile idx_t* const addr = word_addr(bit);
-  const idx_t mask = bit_mask(bit);
-  idx_t old_val = *addr;
+  volatile bm_word_t* const addr = word_addr(bit);
+  const bm_word_t mask = bit_mask(bit);
+  bm_word_t old_val = *addr;
 
   do {
-    const idx_t new_val = old_val | mask;
+    const bm_word_t new_val = old_val | mask;
     if (new_val == old_val) {
       return false;     // Someone else beat us to it.
     }
-    const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val,
+    const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val,
                                                       (volatile void*) addr,
                                                       (void*) old_val);
     if (cur_val == old_val) {
@@ -73,16 +73,16 @@
 
 inline bool BitMap::par_clear_bit(idx_t bit) {
   verify_index(bit);
-  volatile idx_t* const addr = word_addr(bit);
-  const idx_t mask = ~bit_mask(bit);
-  idx_t old_val = *addr;
+  volatile bm_word_t* const addr = word_addr(bit);
+  const bm_word_t mask = ~bit_mask(bit);
+  bm_word_t old_val = *addr;
 
   do {
-    const idx_t new_val = old_val & mask;
+    const bm_word_t new_val = old_val & mask;
     if (new_val == old_val) {
       return false;     // Someone else beat us to it.
     }
-    const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val,
+    const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val,
                                                       (volatile void*) addr,
                                                       (void*) old_val);
     if (cur_val == old_val) {



More information about the distro-pkg-dev mailing list