Skip to content

Commit

Permalink
8322287: Parallel: Remove unused arg in adjust_eden_for_pause_time an…
Browse files Browse the repository at this point in the history
…d adjust_eden_for_minor_pause_time

Reviewed-by: tschatzl
  • Loading branch information
albertnetymk committed Dec 18, 2023
1 parent 5584ba3 commit 7e1d26d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
27 changes: 12 additions & 15 deletions src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ void PSAdaptiveSizePolicy::compute_eden_space_size(
//
// Make changes only to affect one of the pauses (the larger)
// at a time.
adjust_eden_for_pause_time(is_full_gc, &desired_promo_size, &desired_eden_size);
adjust_eden_for_pause_time(&desired_promo_size, &desired_eden_size);

} else if (_avg_minor_pause->padded_average() > gc_minor_pause_goal_sec()) {
// Adjust only for the minor pause time goal
adjust_eden_for_minor_pause_time(is_full_gc, &desired_eden_size);
adjust_eden_for_minor_pause_time(&desired_eden_size);

} else if(adjusted_mutator_cost() < _throughput_goal) {
// This branch used to require that (mutator_cost() > 0.0 in 1.4.2.
Expand Down Expand Up @@ -570,9 +570,7 @@ void PSAdaptiveSizePolicy::decay_supplemental_growth(bool is_full_gc) {
}
}

void PSAdaptiveSizePolicy::adjust_eden_for_minor_pause_time(bool is_full_gc,
size_t* desired_eden_size_ptr) {

void PSAdaptiveSizePolicy::adjust_eden_for_minor_pause_time(size_t* desired_eden_size_ptr) {
// Adjust the young generation size to reduce pause time of
// of collections.
//
Expand All @@ -585,12 +583,12 @@ void PSAdaptiveSizePolicy::adjust_eden_for_minor_pause_time(bool is_full_gc,
decrease_young_gen_for_min_pauses_true);
*desired_eden_size_ptr = *desired_eden_size_ptr -
eden_decrement_aligned_down(*desired_eden_size_ptr);
} else {
// EXPERIMENTAL ADJUSTMENT
// Only record that the estimator indicated such an action.
// *desired_eden_size_ptr = *desired_eden_size_ptr + eden_heap_delta;
set_change_young_gen_for_min_pauses(
increase_young_gen_for_min_pauses_true);
} else {
// EXPERIMENTAL ADJUSTMENT
// Only record that the estimator indicated such an action.
// *desired_eden_size_ptr = *desired_eden_size_ptr + eden_heap_delta;
set_change_young_gen_for_min_pauses(
increase_young_gen_for_min_pauses_true);
}
}

Expand Down Expand Up @@ -630,16 +628,15 @@ void PSAdaptiveSizePolicy::adjust_promo_for_pause_time(bool is_full_gc,
*desired_promo_size_ptr, promo_heap_delta);
}

void PSAdaptiveSizePolicy::adjust_eden_for_pause_time(bool is_full_gc,
size_t* desired_promo_size_ptr,
size_t* desired_eden_size_ptr) {
void PSAdaptiveSizePolicy::adjust_eden_for_pause_time(size_t* desired_promo_size_ptr,
size_t* desired_eden_size_ptr) {

size_t eden_heap_delta = 0;
// Add some checks for a threshold for a change. For example,
// a change less than the required alignment is probably not worth
// attempting.
if (_avg_minor_pause->padded_average() > _avg_major_pause->padded_average()) {
adjust_eden_for_minor_pause_time(is_full_gc, desired_eden_size_ptr);
adjust_eden_for_minor_pause_time(desired_eden_size_ptr);
}
log_trace(gc, ergo)(
"PSAdaptiveSizePolicy::adjust_eden_for_pause_time "
Expand Down
7 changes: 2 additions & 5 deletions src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,13 @@ class PSAdaptiveSizePolicy : public AdaptiveSizePolicy {
// Accessors
double gc_minor_pause_goal_sec() const { return _gc_minor_pause_goal_sec; }

void adjust_eden_for_minor_pause_time(bool is_full_gc,
size_t* desired_eden_size_ptr);
void adjust_eden_for_minor_pause_time(size_t* desired_eden_size_ptr);
// Change the generation sizes to achieve a GC pause time goal
// Returned sizes are not necessarily aligned.
void adjust_promo_for_pause_time(bool is_full_gc,
size_t* desired_promo_size_ptr,
size_t* desired_eden_size_ptr);
void adjust_eden_for_pause_time(bool is_full_gc,
size_t* desired_promo_size_ptr,
size_t* desired_eden_size_ptr);
void adjust_eden_for_pause_time(size_t* desired_promo_size_ptr, size_t* desired_eden_size_ptr);
// Change the generation sizes to achieve an application throughput goal
// Returned sizes are not necessarily aligned.
void adjust_promo_for_throughput(bool is_full_gc,
Expand Down

1 comment on commit 7e1d26d

@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.