src/hotspot/share/gc/g1/g1IHOPControl.cpp
changeset 59320 11ff4e485670
parent 58002 01d31583f25c
--- a/src/hotspot/share/gc/g1/g1IHOPControl.cpp	Fri Nov 29 10:20:14 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1IHOPControl.cpp	Fri Nov 29 10:20:16 2019 +0100
@@ -113,6 +113,10 @@
     );
 }
 
+double G1AdaptiveIHOPControl::get_new_prediction(TruncatedSeq const* seq) const {
+  return _predictor->get_new_lower_zero_bound_prediction(seq);
+}
+
 bool G1AdaptiveIHOPControl::have_enough_data_for_prediction() const {
   return ((size_t)_marking_times_s.num() >= G1AdaptiveIHOPNumInitialSamples) &&
          ((size_t)_allocation_rate_s.num() >= G1AdaptiveIHOPNumInitialSamples);
@@ -120,8 +124,8 @@
 
 size_t G1AdaptiveIHOPControl::get_conc_mark_start_threshold() {
   if (have_enough_data_for_prediction()) {
-    double pred_marking_time = _predictor->get_new_prediction(&_marking_times_s);
-    double pred_promotion_rate = _predictor->get_new_prediction(&_allocation_rate_s);
+    double pred_marking_time = get_new_prediction(&_marking_times_s);
+    double pred_promotion_rate = get_new_prediction(&_allocation_rate_s);
     size_t pred_promotion_size = (size_t)(pred_marking_time * pred_promotion_rate);
 
     size_t predicted_needed_bytes_during_marking =
@@ -168,8 +172,8 @@
                       actual_target,
                       G1CollectedHeap::heap()->used(),
                       _last_unrestrained_young_size,
-                      _predictor->get_new_prediction(&_allocation_rate_s),
-                      _predictor->get_new_prediction(&_marking_times_s) * 1000.0,
+                      get_new_prediction(&_allocation_rate_s),
+                      get_new_prediction(&_marking_times_s) * 1000.0,
                       have_enough_data_for_prediction() ? "true" : "false");
 }
 
@@ -179,7 +183,7 @@
                                           actual_target_threshold(),
                                           G1CollectedHeap::heap()->used(),
                                           _last_unrestrained_young_size,
-                                          _predictor->get_new_prediction(&_allocation_rate_s),
-                                          _predictor->get_new_prediction(&_marking_times_s),
+                                          get_new_prediction(&_allocation_rate_s),
+                                          get_new_prediction(&_marking_times_s),
                                           have_enough_data_for_prediction());
 }