< prev index next >
src/hotspot/share/gc/g1/g1IHOPControl.cpp
Print this page
rev 56997 : [mq]: 8227434-g1-predictions-overflow
@@ -111,19 +111,23 @@
G1CollectedHeap::heap()->max_capacity() * (100.0 - safe_total_heap_percentage) / 100.0,
_target_occupancy * (100.0 - _heap_waste_percent) / 100.0
);
}
+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);
}
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 =
pred_promotion_size +
// In reality we would need the maximum size of the young gen during
@@ -166,20 +170,20 @@
get_conc_mark_start_threshold(),
percent_of(get_conc_mark_start_threshold(), actual_target),
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");
}
void G1AdaptiveIHOPControl::send_trace_event(G1NewTracer* tracer) {
G1IHOPControl::send_trace_event(tracer);
tracer->report_adaptive_ihop_statistics(get_conc_mark_start_threshold(),
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());
}
< prev index next >