8232776: G1 should always take rs_length_diff into account when predicting rs_lengths
Reviewed-by: sangheki, kbarrett
This commit is contained in:
parent
9ae0d5f81f
commit
ba9ce48bd8
@ -229,10 +229,6 @@ void G1Analytics::report_rs_length(double rs_length) {
|
||||
_rs_length_seq->add(rs_length);
|
||||
}
|
||||
|
||||
size_t G1Analytics::predict_rs_length_diff() const {
|
||||
return get_new_size_prediction(_rs_length_diff_seq);
|
||||
}
|
||||
|
||||
double G1Analytics::predict_alloc_rate_ms() const {
|
||||
return get_new_prediction(_alloc_rate_ms_seq);
|
||||
}
|
||||
@ -334,7 +330,7 @@ double G1Analytics::predict_cleanup_time_ms() const {
|
||||
}
|
||||
|
||||
size_t G1Analytics::predict_rs_length() const {
|
||||
return get_new_size_prediction(_rs_length_seq);
|
||||
return get_new_size_prediction(_rs_length_seq) + get_new_prediction(_rs_length_diff_seq);
|
||||
}
|
||||
|
||||
size_t G1Analytics::predict_pending_cards() const {
|
||||
|
@ -115,8 +115,6 @@ public:
|
||||
void report_pending_cards(double pending_cards);
|
||||
void report_rs_length(double rs_length);
|
||||
|
||||
size_t predict_rs_length_diff() const;
|
||||
|
||||
double predict_alloc_rate_ms() const;
|
||||
int num_alloc_rate_ms() const;
|
||||
|
||||
|
@ -330,8 +330,7 @@ G1Policy::calculate_young_list_target_length(size_t rs_length,
|
||||
const double target_pause_time_ms = _mmu_tracker->max_gc_time() * 1000.0;
|
||||
const double survivor_regions_evac_time = predict_survivor_regions_evac_time();
|
||||
const size_t pending_cards = _analytics->predict_pending_cards();
|
||||
const size_t adj_rs_length = rs_length + _analytics->predict_rs_length_diff();
|
||||
const size_t scanned_cards = _analytics->predict_card_num(adj_rs_length, true /* for_young_gc */);
|
||||
const size_t scanned_cards = _analytics->predict_card_num(rs_length, true /* for_young_gc */);
|
||||
const double base_time_ms =
|
||||
predict_base_elapsed_time_ms(pending_cards, scanned_cards) +
|
||||
survivor_regions_evac_time;
|
||||
@ -951,7 +950,7 @@ double G1Policy::predict_base_elapsed_time_ms(size_t pending_cards,
|
||||
}
|
||||
|
||||
double G1Policy::predict_base_elapsed_time_ms(size_t pending_cards) const {
|
||||
size_t rs_length = _analytics->predict_rs_length() + _analytics->predict_rs_length_diff();
|
||||
size_t rs_length = _analytics->predict_rs_length();
|
||||
size_t card_num = _analytics->predict_card_num(rs_length, collector_state()->in_young_only_phase());
|
||||
return predict_base_elapsed_time_ms(pending_cards, card_num);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user