src/hotspot/share/gc/g1/g1Policy.hpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54843 25c329958c70
child 58679 9c3209ff7550
--- a/src/hotspot/share/gc/g1/g1Policy.hpp	Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1Policy.hpp	Thu Oct 17 20:53:35 2019 +0100
@@ -96,11 +96,15 @@
 
   uint _free_regions_at_end_of_collection;
 
-  size_t _max_rs_lengths;
+  size_t _max_rs_length;
+
+  size_t _rs_length_prediction;
 
-  size_t _rs_lengths_prediction;
-
-  size_t _pending_cards;
+  size_t _pending_cards_at_gc_start;
+  size_t _pending_cards_at_prev_gc_end;
+  size_t _total_mutator_refined_cards;
+  size_t _total_concurrent_refined_cards;
+  Tickspan _total_concurrent_refinement_time;
 
   // The amount of allocated bytes in old gen during the last mutator and the following
   // young GC phase.
@@ -111,6 +115,8 @@
   bool should_update_surv_rate_group_predictors() {
     return collector_state()->in_young_only_phase() && !collector_state()->mark_or_rebuild_in_progress();
   }
+
+  double logged_cards_processing_time() const;
 public:
   const G1Predictions& predictor() const { return _predictor; }
   const G1Analytics* analytics()   const { return const_cast<const G1Analytics*>(_analytics); }
@@ -130,8 +136,8 @@
     hr->install_surv_rate_group(_survivor_surv_rate_group);
   }
 
-  void record_max_rs_lengths(size_t rs_lengths) {
-    _max_rs_lengths = rs_lengths;
+  void record_max_rs_length(size_t rs_length) {
+    _max_rs_length = rs_length;
   }
 
   double predict_base_elapsed_time_ms(size_t pending_cards) const;
@@ -192,17 +198,17 @@
   double _mark_cleanup_start_sec;
 
   // Updates the internal young list maximum and target lengths. Returns the
-  // unbounded young list target length.
+  // unbounded young list target length. If no rs_length parameter is passed,
+  // predict the RS length using the prediction model, otherwise use the
+  // given rs_length as the prediction.
   uint update_young_list_max_and_target_length();
-  uint update_young_list_max_and_target_length(size_t rs_lengths);
+  uint update_young_list_max_and_target_length(size_t rs_length);
 
   // Update the young list target length either by setting it to the
   // desired fixed value or by calculating it using G1's pause
-  // prediction model. If no rs_lengths parameter is passed, predict
-  // the RS lengths using the prediction model, otherwise use the
-  // given rs_lengths as the prediction.
+  // prediction model.
   // Returns the unbounded young list target length.
-  uint update_young_list_target_length(size_t rs_lengths);
+  uint update_young_list_target_length(size_t rs_length);
 
   // Calculate and return the minimum desired young list target
   // length. This is the minimum desired young list length according
@@ -215,12 +221,12 @@
   uint calculate_young_list_desired_max_length() const;
 
   // Calculate and return the maximum young list target length that
-  // can fit into the pause time goal. The parameters are: rs_lengths
+  // can fit into the pause time goal. The parameters are: rs_length
   // represent the prediction of how large the young RSet lengths will
   // be, base_min_length is the already existing number of regions in
   // the young list, min_length and max_length are the desired min and
   // max young list length according to the user's inputs.
-  uint calculate_young_list_target_length(size_t rs_lengths,
+  uint calculate_young_list_target_length(size_t rs_length,
                                           uint base_min_length,
                                           uint desired_min_length,
                                           uint desired_max_length) const;
@@ -228,10 +234,10 @@
   // Result of the bounded_young_list_target_length() method, containing both the
   // bounded as well as the unbounded young list target lengths in this order.
   typedef Pair<uint, uint, StackObj> YoungTargetLengths;
-  YoungTargetLengths young_list_target_lengths(size_t rs_lengths) const;
+  YoungTargetLengths young_list_target_lengths(size_t rs_length) const;
 
-  void update_rs_lengths_prediction();
-  void update_rs_lengths_prediction(size_t prediction);
+  void update_rs_length_prediction();
+  void update_rs_length_prediction(size_t prediction);
 
   // Check whether a given young length (young_length) fits into the
   // given target pause time and whether the prediction for the amount
@@ -242,7 +248,15 @@
                         uint base_free_regions, double target_pause_time_ms) const;
 
 public:
-  size_t pending_cards() const { return _pending_cards; }
+  size_t pending_cards_at_gc_start() const { return _pending_cards_at_gc_start; }
+
+  size_t total_concurrent_refined_cards() const {
+    return _total_concurrent_refined_cards;
+  }
+
+  size_t total_mutator_refined_cards() const {
+    return _total_mutator_refined_cards;
+  }
 
   // Calculate the minimum number of old regions we'll add to the CSet
   // during a mixed GC.
@@ -281,6 +295,9 @@
   void record_pause(PauseKind kind, double start, double end);
   // Indicate that we aborted marking before doing any mixed GCs.
   void abort_time_to_mixed_tracking();
+
+  void record_concurrent_refinement_data(bool is_full_collection);
+
 public:
 
   G1Policy(STWGCTimer* gc_timer);
@@ -293,10 +310,10 @@
 
   G1GCPhaseTimes* phase_times() const { return _phase_times; }
 
-  // Check the current value of the young list RSet lengths and
+  // Check the current value of the young list RSet length and
   // compare it against the last prediction. If the current value is
   // higher, recalculate the young list target length prediction.
-  void revise_young_list_target_length_if_necessary(size_t rs_lengths);
+  void revise_young_list_target_length_if_necessary(size_t rs_length);
 
   // This should be called after the heap is resized.
   void record_new_heap_size(uint new_number_of_regions);
@@ -311,7 +328,7 @@
 
   // Record the start and end of an evacuation pause.
   void record_collection_pause_start(double start_time_sec);
-  virtual void record_collection_pause_end(double pause_time_ms, size_t cards_scanned, size_t heap_used_bytes_before_gc);
+  virtual void record_collection_pause_end(double pause_time_ms, size_t heap_used_bytes_before_gc);
 
   // Record the start and end of a full collection.
   void record_full_collection_start();