< prev index next >

src/hotspot/share/gc/g1/g1Analytics.hpp

Print this page
rev 56992 : imported patch 8227739-merge-scan-rs-update-rs-cost
rev 56993 : [mq]: 8227739-sjohanss-review

@@ -78,10 +78,14 @@
   // The ratio of gc time to elapsed time, computed over recent pauses,
   // and the ratio for just the last pause.
   double _recent_avg_pause_time_ratio;
   double _last_pause_time_ratio;
 
+  // Returns whether the sequence have enough samples to get a "good" prediction.
+  // The constant used is random but "small".
+  bool enough_samples_available(TruncatedSeq const* seq) const { return seq->num() >= 3; }
+
   double get_new_prediction(TruncatedSeq const* seq) const;
   size_t get_new_size_prediction(TruncatedSeq const* seq) const;
 
 public:
   G1Analytics(const G1Predictions* predictor);
< prev index next >