hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp
changeset 37051 b02a3fb98142
parent 37041 803d638420d5
child 37070 a2b389f23bac
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Wed Mar 09 14:18:12 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Wed Mar 09 11:08:49 2016 -0800
@@ -409,7 +409,7 @@
 }
 
 uint G1CollectorPolicy::update_young_list_max_and_target_length() {
-  return update_young_list_max_and_target_length(get_new_size_prediction(_rs_lengths_seq));
+  return update_young_list_max_and_target_length(predict_rs_lengths());
 }
 
 uint G1CollectorPolicy::update_young_list_max_and_target_length(size_t rs_lengths) {
@@ -616,7 +616,7 @@
 }
 
 void G1CollectorPolicy::update_rs_lengths_prediction() {
-  update_rs_lengths_prediction(get_new_size_prediction(_rs_lengths_seq));
+  update_rs_lengths_prediction(predict_rs_lengths());
 }
 
 void G1CollectorPolicy::update_rs_lengths_prediction(size_t prediction) {
@@ -1150,6 +1150,10 @@
   dcqs.notify_if_necessary();
 }
 
+size_t G1CollectorPolicy::predict_rs_lengths() const {
+  return get_new_size_prediction(_rs_lengths_seq);
+}
+
 size_t G1CollectorPolicy::predict_rs_length_diff() const {
   return get_new_size_prediction(_rs_length_diff_seq);
 }
@@ -1269,7 +1273,7 @@
 }
 
 double G1CollectorPolicy::predict_base_elapsed_time_ms(size_t pending_cards) const {
-  size_t rs_length = predict_rs_length_diff();
+  size_t rs_length = predict_rs_lengths() + predict_rs_length_diff();
   size_t card_num;
   if (collector_state()->gcs_are_young()) {
     card_num = predict_young_card_num(rs_length);