hotspot/src/share/vm/gc/g1/g1CollectionSet.cpp
changeset 38162 4e2c3433a3ae
parent 38109 6503703df058
child 38183 cb68e4923223
equal deleted inserted replaced
38159:dd85f2d97400 38162:4e2c3433a3ae
   299 
   299 
   300   uint survivor_region_length = young_list->survivor_length();
   300   uint survivor_region_length = young_list->survivor_length();
   301   uint eden_region_length = young_list->eden_length();
   301   uint eden_region_length = young_list->eden_length();
   302   init_region_lengths(eden_region_length, survivor_region_length);
   302   init_region_lengths(eden_region_length, survivor_region_length);
   303 
   303 
   304   HeapRegion* hr = young_list->first_survivor_region();
   304   const GrowableArray<HeapRegion*>* survivor_regions = _g1->young_list()->survivor_regions();
   305   while (hr != NULL) {
   305   for (GrowableArrayIterator<HeapRegion*> it = survivor_regions->begin();
       
   306        it != survivor_regions->end();
       
   307        ++it) {
       
   308     HeapRegion* hr = *it;
   306     assert(hr->is_survivor(), "badly formed young list");
   309     assert(hr->is_survivor(), "badly formed young list");
   307     // There is a convention that all the young regions in the CSet
   310     // There is a convention that all the young regions in the CSet
   308     // are tagged as "eden", so we do this for the survivors here. We
   311     // are tagged as "eden", so we do this for the survivors here. We
   309     // use the special set_eden_pre_gc() as it doesn't check that the
   312     // use the special set_eden_pre_gc() as it doesn't check that the
   310     // region is free (which is not the case here).
   313     // region is free (which is not the case here).
   311     hr->set_eden_pre_gc();
   314     hr->set_eden_pre_gc();
   312     hr = hr->get_next_young_region();
       
   313   }
   315   }
   314 
   316 
   315   verify_young_cset_indices();
   317   verify_young_cset_indices();
   316 
   318 
   317   // Clear the fields that point to the survivor list - they are all young now.
   319   // Clear the fields that point to the survivor list - they are all young now.