71 TruncatedSeq* _rs_length_seq;
72
73 TruncatedSeq* _cost_per_byte_ms_during_cm_seq;
74
75 // Statistics kept per GC stoppage, pause or full.
76 TruncatedSeq* _recent_prev_end_times_for_all_gcs_sec;
77
78 // Cached values for long and short term pause time ratios. See
79 // compute_pause_time_ratios() for how they are computed.
80 double _long_term_pause_time_ratio;
81 double _short_term_pause_time_ratio;
82
83 // Returns whether the sequence have enough samples to get a "good" prediction.
84 // The constant used is random but "small".
85 bool enough_samples_available(TruncatedSeq const* seq) const;
86
87 double predict_in_unit_interval(TruncatedSeq const* seq) const;
88 size_t predict_size(TruncatedSeq const* seq) const;
89 double predict_zero_bounded(TruncatedSeq const* seq) const;
90
91 public:
92 G1Analytics(const G1Predictions* predictor);
93
94 double prev_collection_pause_end_ms() const {
95 return _prev_collection_pause_end_ms;
96 }
97
98 double long_term_pause_time_ratio() const {
99 return _long_term_pause_time_ratio;
100 }
101
102 double short_term_pause_time_ratio() const {
103 return _short_term_pause_time_ratio;
104 }
105
106 uint number_of_recorded_pause_times() const {
107 return NumPrevPausesForHeuristics;
108 }
109
110 void append_prev_collection_pause_end_ms(double ms) {
143
144 double predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const;
145
146 double predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const;
147
148 double predict_constant_other_time_ms() const;
149
150 double predict_young_other_time_ms(size_t young_num) const;
151
152 double predict_non_young_other_time_ms(size_t non_young_num) const;
153
154 double predict_remark_time_ms() const;
155
156 double predict_cleanup_time_ms() const;
157
158 size_t predict_rs_length() const;
159 size_t predict_pending_cards() const;
160
161 // Add a new GC of the given duration and end time to the record.
162 void update_recent_gc_times(double end_time_sec, double elapsed_ms);
163 void compute_pause_time_ratio(double interval_ms, double pause_time_ms);
164
165 double last_known_gc_end_time_sec() const;
166 };
167
168 #endif // SHARE_GC_G1_G1ANALYTICS_HPP
|
71 TruncatedSeq* _rs_length_seq;
72
73 TruncatedSeq* _cost_per_byte_ms_during_cm_seq;
74
75 // Statistics kept per GC stoppage, pause or full.
76 TruncatedSeq* _recent_prev_end_times_for_all_gcs_sec;
77
78 // Cached values for long and short term pause time ratios. See
79 // compute_pause_time_ratios() for how they are computed.
80 double _long_term_pause_time_ratio;
81 double _short_term_pause_time_ratio;
82
83 // Returns whether the sequence have enough samples to get a "good" prediction.
84 // The constant used is random but "small".
85 bool enough_samples_available(TruncatedSeq const* seq) const;
86
87 double predict_in_unit_interval(TruncatedSeq const* seq) const;
88 size_t predict_size(TruncatedSeq const* seq) const;
89 double predict_zero_bounded(TruncatedSeq const* seq) const;
90
91 double oldest_known_gc_end_time_sec() const;
92 double most_recent_gc_end_time_sec() const;
93
94 public:
95 G1Analytics(const G1Predictions* predictor);
96
97 double prev_collection_pause_end_ms() const {
98 return _prev_collection_pause_end_ms;
99 }
100
101 double long_term_pause_time_ratio() const {
102 return _long_term_pause_time_ratio;
103 }
104
105 double short_term_pause_time_ratio() const {
106 return _short_term_pause_time_ratio;
107 }
108
109 uint number_of_recorded_pause_times() const {
110 return NumPrevPausesForHeuristics;
111 }
112
113 void append_prev_collection_pause_end_ms(double ms) {
146
147 double predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const;
148
149 double predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const;
150
151 double predict_constant_other_time_ms() const;
152
153 double predict_young_other_time_ms(size_t young_num) const;
154
155 double predict_non_young_other_time_ms(size_t non_young_num) const;
156
157 double predict_remark_time_ms() const;
158
159 double predict_cleanup_time_ms() const;
160
161 size_t predict_rs_length() const;
162 size_t predict_pending_cards() const;
163
164 // Add a new GC of the given duration and end time to the record.
165 void update_recent_gc_times(double end_time_sec, double elapsed_ms);
166 void compute_pause_time_ratios(double end_time_sec, double pause_time_ms);
167 };
168
169 #endif // SHARE_GC_G1_G1ANALYTICS_HPP
|