< prev index next >

src/share/vm/gc/g1/g1DefaultPolicy.hpp

Print this page
rev 13332 : [mq]: webrev.4


  27 
  28 #include "gc/g1/g1CollectorState.hpp"
  29 #include "gc/g1/g1GCPhaseTimes.hpp"
  30 #include "gc/g1/g1InCSetState.hpp"
  31 #include "gc/g1/g1InitialMarkToMixedTimeTracker.hpp"
  32 #include "gc/g1/g1MMUTracker.hpp"
  33 #include "gc/g1/g1Predictions.hpp"
  34 #include "gc/g1/g1Policy.hpp"
  35 #include "gc/g1/g1YoungGenSizer.hpp"
  36 #include "gc/shared/gcCause.hpp"
  37 #include "utilities/pair.hpp"
  38 
  39 class HeapRegion;
  40 class G1CollectionSet;
  41 class CollectionSetChooser;
  42 class G1IHOPControl;
  43 class G1Analytics;
  44 class G1SurvivorRegions;
  45 class G1YoungGenSizer;
  46 class GCPolicyCounters;

  47 
  48 class G1DefaultPolicy: public G1Policy {
  49  private:
  50 
  51   static G1IHOPControl* create_ihop_control(const G1Predictions* predictor);
  52   // Update the IHOP control with necessary statistics.
  53   void update_ihop_prediction(double mutator_time_s,
  54                               size_t mutator_alloc_bytes,
  55                               size_t young_gen_size);
  56   void report_ihop_statistics();
  57 
  58   G1Predictions _predictor;
  59   G1Analytics* _analytics;
  60   G1MMUTracker* _mmu_tracker;
  61   G1IHOPControl* _ihop_control;
  62 
  63   GCPolicyCounters* _policy_counters;
  64 
  65   double _full_collection_start_sec;
  66 


 247 
 248   // The kind of STW pause.
 249   enum PauseKind {
 250     FullGC,
 251     YoungOnlyGC,
 252     MixedGC,
 253     LastYoungGC,
 254     InitialMarkGC,
 255     Cleanup,
 256     Remark
 257   };
 258 
 259   // Calculate PauseKind from internal state.
 260   PauseKind young_gc_pause_kind() const;
 261   // Record the given STW pause with the given start and end times (in s).
 262   void record_pause(PauseKind kind, double start, double end);
 263   // Indicate that we aborted marking before doing any mixed GCs.
 264   void abort_time_to_mixed_tracking();
 265 public:
 266 
 267   G1DefaultPolicy();
 268 
 269   virtual ~G1DefaultPolicy();
 270 
 271   G1CollectorState* collector_state() const;
 272 
 273   G1GCPhaseTimes* phase_times() const { return _phase_times; }
 274 
 275   void revise_young_list_target_length_if_necessary(size_t rs_lengths);
 276 
 277   void record_new_heap_size(uint new_number_of_regions);
 278 
 279   void init(G1CollectedHeap* g1h, G1CollectionSet* collection_set);
 280 
 281   virtual void note_gc_start();
 282 
 283   bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
 284 
 285   bool about_to_start_mixed_phase() const;
 286 
 287   void record_collection_pause_start(double start_time_sec);




  27 
  28 #include "gc/g1/g1CollectorState.hpp"
  29 #include "gc/g1/g1GCPhaseTimes.hpp"
  30 #include "gc/g1/g1InCSetState.hpp"
  31 #include "gc/g1/g1InitialMarkToMixedTimeTracker.hpp"
  32 #include "gc/g1/g1MMUTracker.hpp"
  33 #include "gc/g1/g1Predictions.hpp"
  34 #include "gc/g1/g1Policy.hpp"
  35 #include "gc/g1/g1YoungGenSizer.hpp"
  36 #include "gc/shared/gcCause.hpp"
  37 #include "utilities/pair.hpp"
  38 
  39 class HeapRegion;
  40 class G1CollectionSet;
  41 class CollectionSetChooser;
  42 class G1IHOPControl;
  43 class G1Analytics;
  44 class G1SurvivorRegions;
  45 class G1YoungGenSizer;
  46 class GCPolicyCounters;
  47 class STWGCTimer;
  48 
  49 class G1DefaultPolicy: public G1Policy {
  50  private:
  51 
  52   static G1IHOPControl* create_ihop_control(const G1Predictions* predictor);
  53   // Update the IHOP control with necessary statistics.
  54   void update_ihop_prediction(double mutator_time_s,
  55                               size_t mutator_alloc_bytes,
  56                               size_t young_gen_size);
  57   void report_ihop_statistics();
  58 
  59   G1Predictions _predictor;
  60   G1Analytics* _analytics;
  61   G1MMUTracker* _mmu_tracker;
  62   G1IHOPControl* _ihop_control;
  63 
  64   GCPolicyCounters* _policy_counters;
  65 
  66   double _full_collection_start_sec;
  67 


 248 
 249   // The kind of STW pause.
 250   enum PauseKind {
 251     FullGC,
 252     YoungOnlyGC,
 253     MixedGC,
 254     LastYoungGC,
 255     InitialMarkGC,
 256     Cleanup,
 257     Remark
 258   };
 259 
 260   // Calculate PauseKind from internal state.
 261   PauseKind young_gc_pause_kind() const;
 262   // Record the given STW pause with the given start and end times (in s).
 263   void record_pause(PauseKind kind, double start, double end);
 264   // Indicate that we aborted marking before doing any mixed GCs.
 265   void abort_time_to_mixed_tracking();
 266 public:
 267 
 268   G1DefaultPolicy(STWGCTimer* gc_timer);
 269 
 270   virtual ~G1DefaultPolicy();
 271 
 272   G1CollectorState* collector_state() const;
 273 
 274   G1GCPhaseTimes* phase_times() const { return _phase_times; }
 275 
 276   void revise_young_list_target_length_if_necessary(size_t rs_lengths);
 277 
 278   void record_new_heap_size(uint new_number_of_regions);
 279 
 280   void init(G1CollectedHeap* g1h, G1CollectionSet* collection_set);
 281 
 282   virtual void note_gc_start();
 283 
 284   bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
 285 
 286   bool about_to_start_mixed_phase() const;
 287 
 288   void record_collection_pause_start(double start_time_sec);


< prev index next >