Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/sparsePRT.hpp @ 617:0db4adb6e914
6810698: G1: two small bugs in the sparse remembered sets
Summary: The _expanded flag of the sparse RSets is not reset and this can leave a RSet in an inconsistent state if it is expanded more than once. Also, we should be iterating over the _cur, instead of the _next, sparse table
Reviewed-by: apetrusenko, iveresov
author | tonyp |
---|---|
date | Sat, 07 Mar 2009 11:07:36 -0500 |
parents | fe3d7c11b4b7 |
children | 7bb995fbd3c0 |
comparison
equal
deleted
inserted
replaced
616:4f360ec815ba | 617:0db4adb6e914 |
---|---|
272 // Ensure that "_cur" and "_next" point to the same table. | 272 // Ensure that "_cur" and "_next" point to the same table. |
273 void cleanup(); | 273 void cleanup(); |
274 | 274 |
275 // Clean up all tables on the expanded list. Called single threaded. | 275 // Clean up all tables on the expanded list. Called single threaded. |
276 static void cleanup_all(); | 276 static void cleanup_all(); |
277 RSHashTable* next() const { return _next; } | 277 RSHashTable* cur() const { return _cur; } |
278 | 278 |
279 | 279 |
280 void init_iterator(SparsePRTIter* sprt_iter); | 280 void init_iterator(SparsePRTIter* sprt_iter); |
281 | 281 |
282 static void add_to_expanded_list(SparsePRT* sprt); | 282 static void add_to_expanded_list(SparsePRT* sprt); |
298 SparsePRTIter(size_t heap_bot_card_ind) : | 298 SparsePRTIter(size_t heap_bot_card_ind) : |
299 /* RSHashTable:: */RSHashTableIter(heap_bot_card_ind) | 299 /* RSHashTable:: */RSHashTableIter(heap_bot_card_ind) |
300 {} | 300 {} |
301 | 301 |
302 void init(const SparsePRT* sprt) { | 302 void init(const SparsePRT* sprt) { |
303 RSHashTableIter::init(sprt->next()); | 303 RSHashTableIter::init(sprt->cur()); |
304 } | 304 } |
305 bool has_next(size_t& card_index) { | 305 bool has_next(size_t& card_index) { |
306 return RSHashTableIter::has_next(card_index); | 306 return RSHashTableIter::has_next(card_index); |
307 } | 307 } |
308 }; | 308 }; |