Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/hotspot/share/gc/g1/g1Policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,6 @@ void G1Policy::calculate_old_collection_set_regions(G1CollectionSetCandidates* c
num_optional_regions = 0;
uint num_expensive_regions = 0;

double predicted_old_time_ms = 0.0;
double predicted_initial_time_ms = 0.0;
double predicted_optional_time_ms = 0.0;

Expand Down Expand Up @@ -1330,7 +1329,7 @@ void G1Policy::calculate_old_collection_set_regions(G1CollectionSetCandidates* c
time_remaining_ms = MAX2(time_remaining_ms - predicted_time_ms, 0.0);
// Add regions to old set until we reach the minimum amount
if (num_initial_regions < min_old_cset_length) {
predicted_old_time_ms += predicted_time_ms;
predicted_initial_time_ms += predicted_time_ms;
num_initial_regions++;
// Record the number of regions added with no time remaining
if (time_remaining_ms == 0.0) {
Expand All @@ -1344,7 +1343,7 @@ void G1Policy::calculate_old_collection_set_regions(G1CollectionSetCandidates* c
} else {
// Keep adding regions to old set until we reach the optional threshold
if (time_remaining_ms > optional_threshold_ms) {
predicted_old_time_ms += predicted_time_ms;
predicted_initial_time_ms += predicted_time_ms;
num_initial_regions++;
} else if (time_remaining_ms > 0) {
// Keep adding optional regions until time is up.
Expand All @@ -1368,7 +1367,7 @@ void G1Policy::calculate_old_collection_set_regions(G1CollectionSetCandidates* c
}

log_debug(gc, ergo, cset)("Finish choosing collection set old regions. Initial: %u, optional: %u, "
"predicted old time: %1.2fms, predicted optional time: %1.2fms, time remaining: %1.2f",
"predicted initial time: %1.2fms, predicted optional time: %1.2fms, time remaining: %1.2f",
num_initial_regions, num_optional_regions,
predicted_initial_time_ms, predicted_optional_time_ms, time_remaining_ms);
}
Expand Down