< prev index next >
src/hotspot/share/gc/g1/g1Analytics.cpp
Print this page
rev 56992 : imported patch 8227739-merge-scan-rs-update-rs-cost
rev 56993 : [mq]: 8227739-sjohanss-review
rev 56997 : [mq]: 8227434-g1-predictions-overflow
@@ -122,16 +122,20 @@
bool G1Analytics::enough_samples_available(TruncatedSeq const* seq) const {
return seq->num() >= 3;
}
-double G1Analytics::get_new_prediction(TruncatedSeq const* seq) const {
- return _predictor->get_new_prediction(seq);
+double G1Analytics::get_new_unit_prediction(TruncatedSeq const* seq) const {
+ return _predictor->get_new_unit_prediction(seq);
}
size_t G1Analytics::get_new_size_prediction(TruncatedSeq const* seq) const {
- return (size_t)get_new_prediction(seq);
+ return (size_t)get_new_lower_zero_bound_prediction(seq);
+}
+
+double G1Analytics::get_new_lower_zero_bound_prediction(TruncatedSeq const* seq) const {
+ return _predictor->get_new_lower_zero_bound_prediction(seq);
}
int G1Analytics::num_alloc_rate_ms() const {
return _alloc_rate_ms_seq->num();
}
@@ -230,87 +234,87 @@
void G1Analytics::report_rs_length(double rs_length) {
_rs_length_seq->add(rs_length);
}
double G1Analytics::predict_alloc_rate_ms() const {
- return get_new_prediction(_alloc_rate_ms_seq);
+ return get_new_lower_zero_bound_prediction(_alloc_rate_ms_seq);
}
double G1Analytics::predict_concurrent_refine_rate_ms() const {
- return get_new_prediction(_concurrent_refine_rate_ms_seq);
+ return get_new_lower_zero_bound_prediction(_concurrent_refine_rate_ms_seq);
}
double G1Analytics::predict_logged_cards_rate_ms() const {
- return get_new_prediction(_logged_cards_rate_ms_seq);
+ return get_new_lower_zero_bound_prediction(_logged_cards_rate_ms_seq);
}
double G1Analytics::predict_young_card_merge_to_scan_ratio() const {
- return get_new_prediction(_young_card_merge_to_scan_ratio_seq);
+ return get_new_unit_prediction(_young_card_merge_to_scan_ratio_seq);
}
size_t G1Analytics::predict_scan_card_num(size_t rs_length, bool for_young_gc) const {
if (for_young_gc || !enough_samples_available(_mixed_card_merge_to_scan_ratio_seq)) {
- return (size_t) (rs_length * predict_young_card_merge_to_scan_ratio());
+ return (size_t)(rs_length * predict_young_card_merge_to_scan_ratio());
} else {
- return (size_t) (rs_length * get_new_prediction(_mixed_card_merge_to_scan_ratio_seq));
+ return (size_t)(rs_length * get_new_unit_prediction(_mixed_card_merge_to_scan_ratio_seq));
}
}
double G1Analytics::predict_card_merge_time_ms(size_t card_num, bool for_young_gc) const {
if (for_young_gc || !enough_samples_available(_mixed_cost_per_card_merge_ms_seq)) {
- return card_num * get_new_prediction(_young_cost_per_card_merge_ms_seq);
+ return card_num * get_new_lower_zero_bound_prediction(_young_cost_per_card_merge_ms_seq);
} else {
- return card_num * get_new_prediction(_mixed_cost_per_card_merge_ms_seq);
+ return card_num * get_new_lower_zero_bound_prediction(_mixed_cost_per_card_merge_ms_seq);
}
}
double G1Analytics::predict_card_scan_time_ms(size_t card_num, bool for_young_gc) const {
if (for_young_gc || !enough_samples_available(_mixed_cost_per_card_scan_ms_seq)) {
- return card_num * get_new_prediction(_young_cost_per_card_scan_ms_seq);
+ return card_num * get_new_lower_zero_bound_prediction(_young_cost_per_card_scan_ms_seq);
} else {
- return card_num * get_new_prediction(_mixed_cost_per_card_scan_ms_seq);
+ return card_num * get_new_lower_zero_bound_prediction(_mixed_cost_per_card_scan_ms_seq);
}
}
double G1Analytics::predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const {
if (!enough_samples_available(_cost_per_byte_ms_during_cm_seq)) {
- return (1.1 * bytes_to_copy) * get_new_prediction(_copy_cost_per_byte_ms_seq);
+ return (1.1 * bytes_to_copy) * get_new_lower_zero_bound_prediction(_copy_cost_per_byte_ms_seq);
} else {
- return bytes_to_copy * get_new_prediction(_cost_per_byte_ms_during_cm_seq);
+ return bytes_to_copy * get_new_lower_zero_bound_prediction(_cost_per_byte_ms_during_cm_seq);
}
}
double G1Analytics::predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const {
if (during_concurrent_mark) {
return predict_object_copy_time_ms_during_cm(bytes_to_copy);
} else {
- return bytes_to_copy * get_new_prediction(_copy_cost_per_byte_ms_seq);
+ return bytes_to_copy * get_new_lower_zero_bound_prediction(_copy_cost_per_byte_ms_seq);
}
}
double G1Analytics::predict_constant_other_time_ms() const {
- return get_new_prediction(_constant_other_time_ms_seq);
+ return get_new_lower_zero_bound_prediction(_constant_other_time_ms_seq);
}
double G1Analytics::predict_young_other_time_ms(size_t young_num) const {
- return young_num * get_new_prediction(_young_other_cost_per_region_ms_seq);
+ return young_num * get_new_lower_zero_bound_prediction(_young_other_cost_per_region_ms_seq);
}
double G1Analytics::predict_non_young_other_time_ms(size_t non_young_num) const {
- return non_young_num * get_new_prediction(_non_young_other_cost_per_region_ms_seq);
+ return non_young_num * get_new_lower_zero_bound_prediction(_non_young_other_cost_per_region_ms_seq);
}
double G1Analytics::predict_remark_time_ms() const {
- return get_new_prediction(_concurrent_mark_remark_times_ms);
+ return get_new_lower_zero_bound_prediction(_concurrent_mark_remark_times_ms);
}
double G1Analytics::predict_cleanup_time_ms() const {
- return get_new_prediction(_concurrent_mark_cleanup_times_ms);
+ return get_new_lower_zero_bound_prediction(_concurrent_mark_cleanup_times_ms);
}
size_t G1Analytics::predict_rs_length() const {
- return get_new_size_prediction(_rs_length_seq) + get_new_prediction(_rs_length_diff_seq);
+ return get_new_size_prediction(_rs_length_seq) + get_new_size_prediction(_rs_length_diff_seq);
}
size_t G1Analytics::predict_pending_cards() const {
return get_new_size_prediction(_pending_cards_seq);
}
< prev index next >