# HG changeset patch # User brutisso # Date 1347564026 -7200 # Node ID 92f03fcf979a8ca4a7dd29b1a9f3aa614e44dc2a # Parent 7fd047780d473ba2decf0a1b4c2f829ab1ce6d05 7197906: BlockOffsetArray::power_to_cards_back() needs to handle > 32 bit shifts Reviewed-by: brutisso, johnc, ysr Contributed-by: Hal Mo diff -r 7fd047780d47 -r 92f03fcf979a hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Fri Sep 14 22:00:41 2012 -0700 +++ b/hotspot/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; diff -r 7fd047780d47 -r 92f03fcf979a hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp Fri Sep 14 22:00:41 2012 -0700 +++ b/hotspot/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 diff -r 7fd047780d47 -r 92f03fcf979a hotspot/src/share/vm/memory/blockOffsetTable.hpp --- a/hotspot/src/share/vm/memory/blockOffsetTable.hpp Fri Sep 14 22:00:41 2012 -0700 +++ b/hotspot/src/share/vm/memory/blockOffsetTable.hpp Thu Sep 13 21:20:26 2012 +0200 @@ -285,7 +285,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;