changeset 3598:9c930c24f9b0

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 af0c8a080851
children 69e0b33357cc
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	Fri Aug 31 16:17:41 2012 -0700
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Sep 13 21:20:26 2012 +0200
@@ -110,7 +110,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	Fri Aug 31 16:17:41 2012 -0700
+++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Thu Sep 13 21:20:26 2012 +0200
@@ -273,7 +273,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;
 
     assert(_fine_eviction_sample_size == 0
--- a/src/share/vm/memory/blockOffsetTable.hpp	Fri Aug 31 16:17:41 2012 -0700
+++ 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;