Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/sparsePRT.hpp @ 10182:5c93c1f61226
8011724: G1: Stack allocate instances of HeapRegionRemSetIterator
Summary: Stack allocate instances of HeapRegionRemSetIterator during RSet scanning.
Reviewed-by: brutisso, jwilhelm
author | johnc |
---|---|
date | Thu, 18 Apr 2013 10:09:23 -0700 |
parents | b9a9ed0f8eeb |
children | de6a9e811145 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/sparsePRT.hpp Tue Apr 23 08:39:55 2013 +0200 +++ b/src/share/vm/gc_implementation/g1/sparsePRT.hpp Thu Apr 18 10:09:23 2013 -0700 @@ -192,18 +192,11 @@ size_t compute_card_ind(CardIdx_t ci); public: - RSHashTableIter() : - _tbl_ind(RSHashTable::NullEntry), + RSHashTableIter(RSHashTable* rsht) : + _tbl_ind(RSHashTable::NullEntry), // So that first increment gets to 0. _bl_ind(RSHashTable::NullEntry), _card_ind((SparsePRTEntry::cards_num() - 1)), - _rsht(NULL) {} - - void init(RSHashTable* rsht) { - _rsht = rsht; - _tbl_ind = -1; // So that first increment gets to 0. - _bl_ind = RSHashTable::NullEntry; - _card_ind = (SparsePRTEntry::cards_num() - 1); - } + _rsht(rsht) {} bool has_next(size_t& card_index); }; @@ -284,8 +277,6 @@ static void cleanup_all(); RSHashTable* cur() const { return _cur; } - void init_iterator(SparsePRTIter* sprt_iter); - static void add_to_expanded_list(SparsePRT* sprt); static SparsePRT* get_from_expanded_list(); @@ -321,9 +312,9 @@ class SparsePRTIter: public RSHashTableIter { public: - void init(const SparsePRT* sprt) { - RSHashTableIter::init(sprt->cur()); - } + SparsePRTIter(const SparsePRT* sprt) : + RSHashTableIter(sprt->cur()) {} + bool has_next(size_t& card_index) { return RSHashTableIter::has_next(card_index); }