diff --git a/src/hotspot/share/gc/g1/g1SurvRateGroup.cpp b/src/hotspot/share/gc/g1/g1SurvRateGroup.cpp index c5c0ca992b078..d5fd50c4523cd 100644 --- a/src/hotspot/share/gc/g1/g1SurvRateGroup.cpp +++ b/src/hotspot/share/gc/g1/g1SurvRateGroup.cpp @@ -46,7 +46,7 @@ void G1SurvRateGroup::reset() { // The call to stop_adding_regions() will use "new" to refill // the _surv_rate_pred array, so we need to make sure to call // "delete". - for (size_t i = 0; i < _stats_arrays_length; ++i) { + for (uint i = 0; i < _stats_arrays_length; ++i) { delete _surv_rate_predictors[i]; } _stats_arrays_length = 0; @@ -76,7 +76,7 @@ void G1SurvRateGroup::stop_adding_regions() { ? _accum_surv_rate_pred[_stats_arrays_length - 1] - _accum_surv_rate_pred[_stats_arrays_length - 2] : InitialSurvivorRate; - for (size_t i = _stats_arrays_length; i < _num_added_regions; ++i) { + for (uint i = _stats_arrays_length; i < _num_added_regions; ++i) { // Initialize predictors and accumulated survivor rate predictions. _surv_rate_predictors[i] = new TruncatedSeq(10); if (i == 0) { @@ -123,7 +123,7 @@ double G1SurvRateGroup::accum_surv_rate_pred(uint age) const { void G1SurvRateGroup::fill_in_last_surv_rates() { if (_num_added_regions > 0) { // conservative double surv_rate = _surv_rate_predictors[_num_added_regions-1]->last(); - for (size_t i = _num_added_regions; i < _stats_arrays_length; ++i) { + for (uint i = _num_added_regions; i < _stats_arrays_length; ++i) { _surv_rate_predictors[i]->add(surv_rate); } } @@ -132,7 +132,7 @@ void G1SurvRateGroup::fill_in_last_surv_rates() { void G1SurvRateGroup::finalize_predictions(const G1Predictions& predictor) { double accum = 0.0; double pred = 0.0; - for (size_t i = 0; i < _stats_arrays_length; ++i) { + for (uint i = 0; i < _stats_arrays_length; ++i) { pred = predictor.predict_in_unit_interval(_surv_rate_predictors[i]); accum += pred; _accum_surv_rate_pred[i] = accum;