< prev index next >

src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.hpp

Print this page

 36 
 37   double sample(size_t allocated);
 38 
 39   double instantaneous_rate(size_t allocated) const;
 40   double upper_bound(double sds) const;
 41   bool is_spiking(double rate, double threshold) const;
 42 
 43  private:
 44 
 45   double instantaneous_rate(double time, size_t allocated) const;
 46 
 47   double _last_sample_time;
 48   size_t _last_sample_value;
 49   double _interval_sec;
 50   TruncatedSeq _rate;
 51   TruncatedSeq _rate_avg;
 52 };
 53 
 54 class ShenandoahAdaptiveHeuristics : public ShenandoahHeuristics {
 55 public:
 56   ShenandoahAdaptiveHeuristics();
 57 
 58   virtual ~ShenandoahAdaptiveHeuristics();
 59 
 60   virtual void choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
 61                                                      RegionData* data, size_t size,
 62                                                      size_t actual_free);
 63 
 64   void record_cycle_start();
 65   void record_success_concurrent();
 66   void record_success_degenerated();
 67   void record_success_full();
 68 
 69   virtual bool should_start_gc();
 70 
 71   virtual const char* name()     { return "Adaptive"; }
 72   virtual bool is_diagnostic()   { return false; }
 73   virtual bool is_experimental() { return false; }
 74 
 75  private:
 76   // These are used to adjust the margin of error and the spike threshold

 36 
 37   double sample(size_t allocated);
 38 
 39   double instantaneous_rate(size_t allocated) const;
 40   double upper_bound(double sds) const;
 41   bool is_spiking(double rate, double threshold) const;
 42 
 43  private:
 44 
 45   double instantaneous_rate(double time, size_t allocated) const;
 46 
 47   double _last_sample_time;
 48   size_t _last_sample_value;
 49   double _interval_sec;
 50   TruncatedSeq _rate;
 51   TruncatedSeq _rate_avg;
 52 };
 53 
 54 class ShenandoahAdaptiveHeuristics : public ShenandoahHeuristics {
 55 public:
 56   ShenandoahAdaptiveHeuristics(ShenandoahGeneration* generation);
 57 
 58   virtual ~ShenandoahAdaptiveHeuristics();
 59 
 60   virtual void choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset,
 61                                                      RegionData* data, size_t size,
 62                                                      size_t actual_free);
 63 
 64   void record_cycle_start();
 65   void record_success_concurrent();
 66   void record_success_degenerated();
 67   void record_success_full();
 68 
 69   virtual bool should_start_gc();
 70 
 71   virtual const char* name()     { return "Adaptive"; }
 72   virtual bool is_diagnostic()   { return false; }
 73   virtual bool is_experimental() { return false; }
 74 
 75  private:
 76   // These are used to adjust the margin of error and the spike threshold
< prev index next >