--- old/src/hotspot/share/gc/g1/g1Policy.hpp 2020-06-15 11:18:25.968460961 +0200 +++ new/src/hotspot/share/gc/g1/g1Policy.hpp 2020-06-15 11:18:25.872459739 +0200 @@ -60,7 +60,6 @@ // Update the IHOP control with necessary statistics. void update_ihop_prediction(double mutator_time_s, size_t mutator_alloc_bytes, - size_t young_gen_size, bool this_gc_was_young_only); void report_ihop_statistics(); @@ -76,6 +75,7 @@ jlong _collection_pause_end_millis; + uint _young_list_desired_length; uint _young_list_target_length; // The max number of regions we can extend the eden by while the GC @@ -192,18 +192,11 @@ double _mark_remark_start_sec; double _mark_cleanup_start_sec; - // Updates the internal young gen maximum and target lengths. Returns the - // unbounded young target length. If no rs_length parameter is passed, - // predict the RS length using the prediction model, otherwise use the - // given rs_length as the prediction. - uint update_young_max_and_target_length(); - uint update_young_max_and_target_length(size_t rs_length); - - // Update the young list target length either by setting it to the - // desired fixed value or by calculating it using G1's pause - // prediction model. - // Returns the unbounded young list target length. - uint update_young_target_length(size_t rs_length); + // Updates the internal young gen maximum and target and desired lengths. + // If no rs_length parameter is passed, predict the RS length using the + // prediction model, otherwise use the given rs_length as the prediction. + void update_young_length_bounds(); + void update_young_length_bounds(size_t rs_length); // Calculate and return the minimum desired eden length based on the MMU target. uint calculate_desired_eden_length_by_mmu() const; @@ -228,6 +221,9 @@ uint calculate_young_desired_length(size_t rs_length) const; // Limit the given desired young length to available free regions. uint calculate_young_target_length(uint desired_young_length) const; + // The GCLocker might cause us to need more regions than the target. Calculate + // the maximum number of regions to use in that case. + uint calculate_young_max_length(uint target_young_length) const; void update_rs_length_prediction(); void update_rs_length_prediction(size_t prediction); @@ -372,6 +368,7 @@ // the initial-mark work and start a marking cycle. void decide_on_conc_mark_initiation(); + uint young_list_desired_length() const { return _young_list_desired_length; } size_t young_list_target_length() const { return _young_list_target_length; } bool should_allocate_mutator_region() const; @@ -432,8 +429,6 @@ void print_age_table(); - void update_max_gc_locker_expansion(); - void update_survivors_policy(); virtual bool force_upgrade_to_full() {