changeset 3622:87f0aa7a8f8f icedtea-2.3.4

7197906: BlockOffsetArray::power_to_cards_back() needs to handle > 32 bit shifts Reviewed-by: brutisso, johnc, ysr Contributed-by: Hal Mo <kungu.mjh@taobao.com>
author brutisso
date Thu, 13 Sep 2012 21:20:26 +0200
parents d2d0a106917c
children beecf0b9e760
files src/share/vm/gc_implementation/g1/concurrentMark.cpp src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp src/share/vm/memory/blockOffsetTable.hpp
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Oct 16 21:36:40 2012 +0100
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Sep 13 21:20:26 2012 +0200
@@ -116,7 +116,7 @@
 #ifndef PRODUCT
 bool CMBitMapRO::covers(ReservedSpace rs) const {
   // assert(_bm.map() == _virtual_space.low(), "map inconsistency");
-  assert(((size_t)_bm.size() * (size_t)(1 << _shifter)) == _bmWordSize,
+  assert(((size_t)_bm.size() * ((size_t)1 << _shifter)) == _bmWordSize,
          "size inconsistency");
   return _bmStartWord == (HeapWord*)(rs.base()) &&
          _bmWordSize  == rs.size()>>LogHeapWordSize;
--- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Tue Oct 16 21:36:40 2012 +0100
+++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Thu Sep 13 21:20:26 2012 +0200
@@ -520,7 +520,7 @@
   if (_max_fine_entries == 0) {
     assert(_mod_max_fine_entries_mask == 0, "Both or none.");
     size_t max_entries_log = (size_t)log2_long((jlong)G1RSetRegionEntries);
-    _max_fine_entries = (size_t)(1 << max_entries_log);
+    _max_fine_entries = (size_t)1 << max_entries_log;
     _mod_max_fine_entries_mask = _max_fine_entries - 1;
 #if SAMPLE_FOR_EVICTION
     assert(_fine_eviction_sample_size == 0
--- a/src/share/vm/memory/blockOffsetTable.hpp	Tue Oct 16 21:36:40 2012 +0100
+++ b/src/share/vm/memory/blockOffsetTable.hpp	Thu Sep 13 21:20:26 2012 +0200
@@ -289,7 +289,7 @@
   };
 
   static size_t power_to_cards_back(uint i) {
-    return (size_t)(1 << (LogBase * i));
+    return (size_t)1 << (LogBase * i);
   }
   static size_t power_to_words_back(uint i) {
     return power_to_cards_back(i) * N_words;