< prev index next >

src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp

Print this page
rev 7696 : 8030646: track collection set membership in one place

*** 1615,1629 **** void G1CollectorPolicy::add_old_region_to_cset(HeapRegion* hr) { assert(_inc_cset_build_state == Active, "Precondition"); assert(hr->is_old(), "the region should be old"); assert(!hr->in_collection_set(), "should not already be in the CSet"); ! hr->set_in_collection_set(true); hr->set_next_in_collection_set(_collection_set); _collection_set = hr; _collection_set_bytes_used_before += hr->used(); - _g1->register_old_region_with_in_cset_fast_test(hr); size_t rs_length = hr->rem_set()->occupied(); _recorded_rs_lengths += rs_length; _old_cset_region_length += 1; } --- 1615,1628 ---- void G1CollectorPolicy::add_old_region_to_cset(HeapRegion* hr) { assert(_inc_cset_build_state == Active, "Precondition"); assert(hr->is_old(), "the region should be old"); assert(!hr->in_collection_set(), "should not already be in the CSet"); ! _g1->register_old_region_with_in_cset_fast_test(hr); hr->set_next_in_collection_set(_collection_set); _collection_set = hr; _collection_set_bytes_used_before += hr->used(); size_t rs_length = hr->rem_set()->occupied(); _recorded_rs_lengths += rs_length; _old_cset_region_length += 1; }
*** 1749,1762 **** HeapWord* hr_end = hr->end(); _inc_cset_max_finger = MAX2(_inc_cset_max_finger, hr_end); assert(!hr->in_collection_set(), "invariant"); - hr->set_in_collection_set(true); - assert( hr->next_in_collection_set() == NULL, "invariant"); - _g1->register_young_region_with_in_cset_fast_test(hr); } // Add the region at the RHS of the incremental cset void G1CollectorPolicy::add_region_to_incremental_cset_rhs(HeapRegion* hr) { // We should only ever be appending survivors at the end of a pause --- 1748,1759 ---- HeapWord* hr_end = hr->end(); _inc_cset_max_finger = MAX2(_inc_cset_max_finger, hr_end); assert(!hr->in_collection_set(), "invariant"); _g1->register_young_region_with_in_cset_fast_test(hr); + assert( hr->next_in_collection_set() == NULL, "invariant"); } // Add the region at the RHS of the incremental cset void G1CollectorPolicy::add_region_to_incremental_cset_rhs(HeapRegion* hr) { // We should only ever be appending survivors at the end of a pause
< prev index next >