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), have_enough_data_for_prediction()); }
void G1AdaptiveIHOPControl::print() { G1IHOPControl::print(); size_t actual_target = actual_target_threshold(); log_debug(gc, ihop)("Adaptive IHOP information (value update), threshold: " SIZE_FORMAT "B (%1.2f), internal target occupancy: " SIZE_FORMAT "B," " predicted old gen allocation rate: %1.2f, predicted marking phase length: %1.2f, prediction active: %s", get_conc_mark_start_threshold(), percent_of(get_conc_mark_start_threshold(), actual_target), actual_target, _predictor->get_new_prediction(&_allocation_rate_s), _predictor->get_new_prediction(&_marking_times_s), have_enough_data_for_prediction() ? "true" : "false"); }
void G1AdaptiveIHOPControl::print() { G1IHOPControl::print(); size_t actual_target = actual_target_threshold(); log_debug(gc, ihop)("Adaptive IHOP information (value update), threshold: " SIZE_FORMAT "B (%1.2f), internal target occupancy: " SIZE_FORMAT "B, " "occupancy: " SIZE_FORMAT "B, additional buffer size: " SIZE_FORMAT "B, predicted old gen allocation rate: %1.2fB/s, " "predicted marking phase length: %1.2fms, prediction active: %s", 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, have_enough_data_for_prediction() ? "true" : "false"); }
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); 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 // marking. This is a conservative estimate. _last_unrestrained_young_size; size_t internal_threshold = actual_target_threshold(); size_t predicted_initiating_threshold = predicted_needed_bytes_during_marking < internal_threshold ? internal_threshold - predicted_needed_bytes_during_marking : 0; return predicted_initiating_threshold; } else { // Use the initial value. return (size_t)(_initial_ihop_percent * _target_occupancy / 100.0); } }