--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp Wed Dec 09 15:31:25 2015 +0530
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp Wed Dec 09 09:51:31 2015 -0500
@@ -201,6 +201,11 @@
TruncatedSeq* _concurrent_mark_remark_times_ms;
TruncatedSeq* _concurrent_mark_cleanup_times_ms;
+ // Ratio check data for determining if heap growth is necessary.
+ uint _ratio_over_threshold_count;
+ double _ratio_over_threshold_sum;
+ uint _pauses_since_start;
+
TraceYoungGenTimeData _trace_young_gen_time_data;
TraceOldGenTimeData _trace_old_gen_time_data;
@@ -224,7 +229,11 @@
enum PredictionConstants {
TruncatedSeqLength = 10,
- NumPrevPausesForHeuristics = 10
+ NumPrevPausesForHeuristics = 10,
+ // MinOverThresholdForGrowth must be less than NumPrevPausesForHeuristics,
+ // representing the minimum number of pause time ratios that exceed
+ // GCTimeRatio before a heap expansion will be triggered.
+ MinOverThresholdForGrowth = 4
};
TruncatedSeq* _alloc_rate_ms_seq;
@@ -483,8 +492,10 @@
G1GCPhaseTimes* _phase_times;
- // The ratio of gc time to elapsed time, computed over recent pauses.
+ // The ratio of gc time to elapsed time, computed over recent pauses,
+ // and the ratio for just the last pause.
double _recent_avg_pause_time_ratio;
+ double _last_pause_time_ratio;
double recent_avg_pause_time_ratio() const {
return _recent_avg_pause_time_ratio;
@@ -761,7 +772,10 @@
// If an expansion would be appropriate, because recent GC overhead had
// exceeded the desired limit, return an amount to expand by.
- virtual size_t expansion_amount() const;
+ virtual size_t expansion_amount();
+
+ // Clear ratio tracking data used by expansion_amount().
+ void clear_ratio_check_data();
// Print tracing information.
void print_tracing_info() const;