@@ -80,14 +80,13 @@ G1Analytics::G1Analytics(const G1Predictions* predictor) :
80
80
_card_scan_to_merge_ratio_seq(TruncatedSeqLength),
81
81
_cost_per_card_scan_ms_seq(TruncatedSeqLength),
82
82
_cost_per_card_merge_ms_seq(TruncatedSeqLength),
83
+ _cost_per_byte_copied_ms_seq(TruncatedSeqLength),
83
84
_pending_cards_seq(TruncatedSeqLength),
84
85
_rs_length_seq(TruncatedSeqLength),
85
86
_rs_length_diff_seq(TruncatedSeqLength),
86
- _copy_cost_per_byte_ms_seq(TruncatedSeqLength),
87
87
_constant_other_time_ms_seq(TruncatedSeqLength),
88
88
_young_other_cost_per_region_ms_seq(TruncatedSeqLength),
89
89
_non_young_other_cost_per_region_ms_seq(TruncatedSeqLength),
90
- _cost_per_byte_ms_during_cm_seq(TruncatedSeqLength),
91
90
_recent_prev_end_times_for_all_gcs_sec(NumPrevPausesForHeuristics),
92
91
_long_term_pause_time_ratio(0.0 ),
93
92
_short_term_pause_time_ratio(0.0 ) {
@@ -107,8 +106,8 @@ G1Analytics::G1Analytics(const G1Predictions* predictor) :
107
106
_cost_per_card_scan_ms_seq.set_initial (young_only_cost_per_card_scan_ms_defaults[index ]);
108
107
_rs_length_seq.set_initial (0 );
109
108
_rs_length_diff_seq.set_initial (0.0 );
109
+ _cost_per_byte_copied_ms_seq.set_initial (cost_per_byte_ms_defaults[index ]);
110
110
111
- _copy_cost_per_byte_ms_seq.add (cost_per_byte_ms_defaults[index ]);
112
111
_constant_other_time_ms_seq.add (constant_other_time_ms_defaults[index ]);
113
112
_young_other_cost_per_region_ms_seq.add (young_other_cost_per_region_ms_defaults[index ]);
114
113
_non_young_other_cost_per_region_ms_seq.add (non_young_other_cost_per_region_ms_defaults[index ]);
@@ -197,12 +196,8 @@ void G1Analytics::report_rs_length_diff(double rs_length_diff, bool for_young_on
197
196
_rs_length_diff_seq.add (rs_length_diff, for_young_only_phase);
198
197
}
199
198
200
- void G1Analytics::report_cost_per_byte_ms (double cost_per_byte_ms, bool mark_or_rebuild_in_progress) {
201
- if (mark_or_rebuild_in_progress) {
202
- _cost_per_byte_ms_during_cm_seq.add (cost_per_byte_ms);
203
- } else {
204
- _copy_cost_per_byte_ms_seq.add (cost_per_byte_ms);
205
- }
199
+ void G1Analytics::report_cost_per_byte_ms (double cost_per_byte_ms, bool for_young_only_phase) {
200
+ _cost_per_byte_copied_ms_seq.add (cost_per_byte_ms, for_young_only_phase);
206
201
}
207
202
208
203
void G1Analytics::report_young_other_cost_per_region_ms (double other_cost_per_region_ms) {
@@ -257,20 +252,8 @@ double G1Analytics::predict_card_scan_time_ms(size_t card_num, bool for_young_on
257
252
return card_num * predict_zero_bounded (&_cost_per_card_scan_ms_seq, for_young_only_phase);
258
253
}
259
254
260
- double G1Analytics::predict_object_copy_time_ms_during_cm (size_t bytes_to_copy) const {
261
- if (!enough_samples_available (&_cost_per_byte_ms_during_cm_seq)) {
262
- return (1.1 * bytes_to_copy) * predict_zero_bounded (&_copy_cost_per_byte_ms_seq);
263
- } else {
264
- return bytes_to_copy * predict_zero_bounded (&_cost_per_byte_ms_during_cm_seq);
265
- }
266
- }
267
-
268
- double G1Analytics::predict_object_copy_time_ms (size_t bytes_to_copy, bool during_concurrent_mark) const {
269
- if (during_concurrent_mark) {
270
- return predict_object_copy_time_ms_during_cm (bytes_to_copy);
271
- } else {
272
- return bytes_to_copy * predict_zero_bounded (&_copy_cost_per_byte_ms_seq);
273
- }
255
+ double G1Analytics::predict_object_copy_time_ms (size_t bytes_to_copy, bool for_young_only_phase) const {
256
+ return bytes_to_copy * predict_zero_bounded (&_cost_per_byte_copied_ms_seq, for_young_only_phase);
274
257
}
275
258
276
259
double G1Analytics::predict_constant_other_time_ms () const {
0 commit comments