< prev index next >

src/share/vm/gc/g1/g1CollectionSet.cpp

Print this page
rev 11039 : 8155209: Move setting of young index in cset to G1CollectionSet
Reviewed-by:
rev 11040 : 8150393: Maintain the set of survivor regions in an array between GCs
Reviewed-by:

*** 299,317 **** uint survivor_region_length = young_list->survivor_length(); uint eden_region_length = young_list->eden_length(); init_region_lengths(eden_region_length, survivor_region_length); ! HeapRegion* hr = young_list->first_survivor_region(); ! while (hr != NULL) { assert(hr->is_survivor(), "badly formed young list"); // There is a convention that all the young regions in the CSet // are tagged as "eden", so we do this for the survivors here. We // use the special set_eden_pre_gc() as it doesn't check that the // region is free (which is not the case here). hr->set_eden_pre_gc(); - hr = hr->get_next_young_region(); } verify_young_cset_indices(); // Clear the fields that point to the survivor list - they are all young now. --- 299,319 ---- uint survivor_region_length = young_list->survivor_length(); uint eden_region_length = young_list->eden_length(); init_region_lengths(eden_region_length, survivor_region_length); ! const GrowableArray<HeapRegion*>* survivor_regions = _g1->young_list()->survivor_regions(); ! for (GrowableArrayIterator<HeapRegion*> it = survivor_regions->begin(); ! it != survivor_regions->end(); ! ++it) { ! HeapRegion* hr = *it; assert(hr->is_survivor(), "badly formed young list"); // There is a convention that all the young regions in the CSet // are tagged as "eden", so we do this for the survivors here. We // use the special set_eden_pre_gc() as it doesn't check that the // region is free (which is not the case here). hr->set_eden_pre_gc(); } verify_young_cset_indices(); // Clear the fields that point to the survivor list - they are all young now.
< prev index next >