--- old/src/share/vm/gc/g1/g1IHOPControl.cpp 2015-11-06 11:44:32.887608359 +0100 +++ new/src/share/vm/gc/g1/g1IHOPControl.cpp 2015-11-06 11:44:32.805605967 +0100 @@ -27,6 +27,7 @@ #include "gc/g1/g1ErgoVerbose.hpp" #include "gc/g1/g1IHOPControl.hpp" #include "gc/g1/g1Predictions.hpp" +#include "gc/shared/gcTrace.hpp" G1IHOPControl::G1IHOPControl(double initial_ihop_percent, size_t target_occupancy) : _ihop_percent(initial_ihop_percent), @@ -59,6 +60,15 @@ _last_marking_length_s * 1000.0); } +void G1StaticIHOPControl::send_jfr_event(G1NewTracer* tracer) { + tracer->report_basic_ihop_statistics(get_conc_mark_start_threshold(), + _target_occupancy, + G1CollectedHeap::heap()->used(), + _last_allocated_bytes, + _last_allocation_time_s, + _last_marking_length_s); +} + #ifndef PRODUCT static void test_update(G1IHOPControl* ctrl, double alloc_time, size_t alloc_amount, size_t young_size, double mark_time) { for (int i = 0; i < 100; i++) { @@ -184,6 +194,19 @@ ); } +void G1AdaptiveIHOPControl::send_jfr_event(G1NewTracer* tracer) { + tracer->report_basic_ihop_statistics(get_conc_mark_start_threshold(), + _target_occupancy, + G1CollectedHeap::heap()->used(), + _last_allocation_bytes, + _allocation_rate_s.last(), + _marking_times_s.last()); + tracer->report_adaptive_ihop_statistics(_prev_unrestrained_young_size, + _predictor->get_new_prediction(&_allocation_rate_s), + _predictor->get_new_prediction(&_marking_times_s), + have_enough_data_for_prediction()); +} + #ifndef PRODUCT void G1AdaptiveIHOPControl::test() { size_t const initial_threshold = 45;