--- old/src/share/vm/gc/g1/g1IHOPControl.hpp 2015-11-11 10:07:39.596922307 +0100 +++ new/src/share/vm/gc/g1/g1IHOPControl.hpp 2015-11-11 10:07:39.516919931 +0100 @@ -81,4 +81,35 @@ #endif }; +class G1AdaptiveIHOPControl : public G1IHOPControl { + G1Predictions const * _predictor; + + TruncatedSeq _marking_times_s; + TruncatedSeq _allocation_rate_s; + + size_t _last_allocation_bytes; // Most recent mutator allocation since last GC. + size_t _prev_unrestrained_young_size; + + size_t _current_threshold; + + // Updates _current_threshold according to internal state. + void recalculate(); + + bool have_enough_data_for_prediction() const; + public: + G1AdaptiveIHOPControl(double ihop_percent, size_t initial_target_occupancy, G1Predictions const* predictor); + + virtual void set_target_occupancy(size_t target_occupancy); + + virtual size_t get_conc_mark_start_threshold(); + + virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size); + virtual void update_time_to_mixed(double marking_length_s); + + virtual void print(); +#ifndef PRODUCT + static void test(); +#endif +}; + #endif // SHARE_VM_GC_G1_G1IHOPCONTROL_HPP