Skip to content

Commit

Permalink
8289800: G1: G1CollectionSet::finalize_young_part clears survivor lis…
Browse files Browse the repository at this point in the history
…t too early

Reviewed-by: ayang, tschatzl
  • Loading branch information
Ivan Walulya committed Jul 7, 2022
1 parent 86f63f9 commit 74ca6ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/g1/g1CollectionSet.cpp
Expand Up @@ -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
Expand All @@ -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;
Expand Down

1 comment on commit 74ca6ca

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.