8347923: Parallel: Simplify compute_survivor_space_size_and_threshold

Reviewed-by: tschatzl
This commit is contained in:
Albert Mingkun Yang 2025-01-20 09:51:45 +00:00
parent 4b4b1e912a
commit c207cc7e70

View File

@ -947,12 +947,10 @@ uint PSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
// Finally, increment or decrement the tenuring threshold, as decided above.
// We test for decrementing first, as we might have hit the target size
// limit.
if (decr_tenuring_threshold && !(AlwaysTenure || NeverTenure)) {
if (tenuring_threshold > 1) {
if (!(AlwaysTenure || NeverTenure)) {
if (decr_tenuring_threshold && tenuring_threshold > 1) {
tenuring_threshold--;
}
} else if (incr_tenuring_threshold && !(AlwaysTenure || NeverTenure)) {
if (tenuring_threshold < MaxTenuringThreshold) {
} else if (incr_tenuring_threshold && tenuring_threshold < MaxTenuringThreshold) {
tenuring_threshold++;
}
}