8289800: G1: G1CollectionSet::finalize_young_part clears survivor list too early

Reviewed-by: ayang, tschatzl
This commit is contained in:
Ivan Walulya 2022-07-07 15:09:30 +00:00
parent 86f63f9703
commit 74ca6ca25b

View File

@ -415,9 +415,6 @@ double G1CollectionSet::finalize_young_part(double target_pause_time_ms, G1Survi
verify_young_cset_indices();
// Clear the fields that point to the survivor list - they are all young now.
survivors->convert_to_eden();
_bytes_used_before = _inc_bytes_used_before;
// The number of recorded young regions is the incremental
@ -433,6 +430,9 @@ double G1CollectionSet::finalize_young_part(double target_pause_time_ms, G1Survi
eden_region_length, survivor_region_length,
predicted_eden_time, predicted_base_time_ms, target_pause_time_ms, remaining_time_ms);
// Clear the fields that point to the survivor list - they are all young now.
survivors->convert_to_eden();
phase_times()->record_young_cset_choice_time_ms((Ticks::now() - start_time).seconds() * 1000.0);
return remaining_time_ms;