diff --git a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp index c4c8732748480bf89691246fd30221d6eb915e30..5d055f65597fee4faa639c7514302f3f26411077 100644 --- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp +++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @@ -1159,9 +1159,7 @@ HeapRegionRemSetIterator() : _hrrs(NULL), _g1h(G1CollectedHeap::heap()), _bosa(NULL), - _sparse_iter(size_t(G1CollectedHeap::heap()->reserved_region().start()) - >> CardTableModRefBS::card_shift) -{} + _sparse_iter() { } void HeapRegionRemSetIterator::initialize(const HeapRegionRemSet* hrrs) { _hrrs = hrrs; diff --git a/src/share/vm/gc_implementation/g1/sparsePRT.cpp b/src/share/vm/gc_implementation/g1/sparsePRT.cpp index 5bc3ab29c70f38753b970b6906338269c2e9c21f..86eaa729d3fa528c7ec8d5cb2c4e6a0354481347 100644 --- a/src/share/vm/gc_implementation/g1/sparsePRT.cpp +++ b/src/share/vm/gc_implementation/g1/sparsePRT.cpp @@ -323,10 +323,7 @@ CardIdx_t /* RSHashTable:: */ RSHashTableIter::find_first_card_in_list() { } size_t /* RSHashTable:: */ RSHashTableIter::compute_card_ind(CardIdx_t ci) { - return - _heap_bot_card_ind - + (_rsht->entry(_bl_ind)->r_ind() * HeapRegion::CardsPerRegion) - + ci; + return (_rsht->entry(_bl_ind)->r_ind() * HeapRegion::CardsPerRegion) + ci; } bool /* RSHashTable:: */ RSHashTableIter::has_next(size_t& card_index) { diff --git a/src/share/vm/gc_implementation/g1/sparsePRT.hpp b/src/share/vm/gc_implementation/g1/sparsePRT.hpp index 7812ac4fb53cb7db63529f85f77d4e68435be782..92a69b4d5cc0d84d30da6231909aed65f05388e9 100644 --- a/src/share/vm/gc_implementation/g1/sparsePRT.hpp +++ b/src/share/vm/gc_implementation/g1/sparsePRT.hpp @@ -169,7 +169,6 @@ class RSHashTableIter VALUE_OBJ_CLASS_SPEC { int _bl_ind; // [-1, 0.._rsht->_capacity) short _card_ind; // [0..SparsePRTEntry::cards_num()) RSHashTable* _rsht; - size_t _heap_bot_card_ind; // If the bucket list pointed to by _bl_ind contains a card, sets // _bl_ind to the index of that entry, and returns the card. @@ -183,13 +182,11 @@ class RSHashTableIter VALUE_OBJ_CLASS_SPEC { size_t compute_card_ind(CardIdx_t ci); public: - RSHashTableIter(size_t heap_bot_card_ind) : + RSHashTableIter() : _tbl_ind(RSHashTable::NullEntry), _bl_ind(RSHashTable::NullEntry), _card_ind((SparsePRTEntry::cards_num() - 1)), - _rsht(NULL), - _heap_bot_card_ind(heap_bot_card_ind) - {} + _rsht(NULL) {} void init(RSHashTable* rsht) { _rsht = rsht; @@ -280,19 +277,12 @@ public: bool contains_card(RegionIdx_t region_id, CardIdx_t card_index) const { return _next->contains_card(region_id, card_index); } - -#if 0 - void verify_is_cleared(); - void print(); -#endif }; -class SparsePRTIter: public /* RSHashTable:: */RSHashTableIter { +class SparsePRTIter: public RSHashTableIter { public: - SparsePRTIter(size_t heap_bot_card_ind) : - /* RSHashTable:: */RSHashTableIter(heap_bot_card_ind) - {} + SparsePRTIter() : RSHashTableIter() { } void init(const SparsePRT* sprt) { RSHashTableIter::init(sprt->cur());