< prev index next >
src/hotspot/share/gc/g1/g1Analytics.cpp
Print this page
rev 57223 : imported patch 8225484-changes-to-survivor-calculation
@@ -92,10 +92,11 @@
_non_young_other_cost_per_region_ms_seq(new TruncatedSeq(TruncatedSeqLength)),
_pending_cards_seq(new TruncatedSeq(TruncatedSeqLength)),
_rs_length_seq(new TruncatedSeq(TruncatedSeqLength)),
_cost_per_byte_ms_during_cm_seq(new TruncatedSeq(TruncatedSeqLength)),
_recent_prev_end_times_for_all_gcs_sec(new TruncatedSeq(NumPrevPausesForHeuristics)),
+ _survivor_ratio(new TruncatedSeq(TruncatedSeqLength)),
_recent_avg_pause_time_ratio(0.0),
_last_pause_time_ratio(0.0) {
// Seed sequences with initial values.
_recent_prev_end_times_for_all_gcs_sec->add(os::elapsedTime());
@@ -117,10 +118,12 @@
_non_young_other_cost_per_region_ms_seq->add(non_young_other_cost_per_region_ms_defaults[index]);
// start conservatively (around 50ms is about right)
_concurrent_mark_remark_times_ms->add(0.05);
_concurrent_mark_cleanup_times_ms->add(0.20);
+
+ _survivor_ratio->add(0.5);
}
bool G1Analytics::enough_samples_available(TruncatedSeq const* seq) const {
return seq->num() >= 3;
}
@@ -226,10 +229,14 @@
void G1Analytics::report_rs_length(double rs_length) {
_rs_length_seq->add(rs_length);
}
+void G1Analytics::report_survivor_ratio(double ratio) {
+ _survivor_ratio->add(ratio);
+}
+
double G1Analytics::predict_alloc_rate_ms() const {
return predict_zero_bounded(_alloc_rate_ms_seq);
}
double G1Analytics::predict_concurrent_refine_rate_ms() const {
@@ -282,10 +289,14 @@
} else {
return bytes_to_copy * predict_zero_bounded(_copy_cost_per_byte_ms_seq);
}
}
+double G1Analytics::predict_survivor_ratio() const {
+ return predict_in_unit_interval(_survivor_ratio);
+}
+
double G1Analytics::predict_constant_other_time_ms() const {
return predict_zero_bounded(_constant_other_time_ms_seq);
}
double G1Analytics::predict_young_other_time_ms(size_t young_num) const {
< prev index next >