-
Bug
-
Resolution: Fixed
-
P3
-
17, 19
-
b23
In G1Policy::calculate_optional_collection_set_regions there is this code:
double prediction_ms = 0;
[...]
while (num_optional_regions < max_optional_regions) {
[...]
prediction_ms += predict_region_total_time_ms(r, false); // note the +=
if (prediction_ms > time_remaining_ms) {
[...]
break;
}
// This region will be included in the next optional evacuation.
time_remaining_ms -= prediction_ms; // and then we subtract that sum of sum...
[...]
}
As you can see, the code subtracts the prediction from the remaining time that in itself is accumulated over all times the recently added optional regions take.
This causes too few optional regions to be taken in optional evacuation.
double prediction_ms = 0;
[...]
while (num_optional_regions < max_optional_regions) {
[...]
prediction_ms += predict_region_total_time_ms(r, false); // note the +=
if (prediction_ms > time_remaining_ms) {
[...]
break;
}
// This region will be included in the next optional evacuation.
time_remaining_ms -= prediction_ms; // and then we subtract that sum of sum...
[...]
}
As you can see, the code subtracts the prediction from the remaining time that in itself is accumulated over all times the recently added optional regions take.
This causes too few optional regions to be taken in optional evacuation.