< prev index next >

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

Print this page
rev 9312 : imported patch 8136678-implement-adaptive-sizing-algorithm-for-IHOP


  64 
  65   size_t get_conc_mark_start_threshold() { return (size_t) (_ihop_percent * _target_occupancy / 100.0); }
  66 
  67   virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size) {
  68     assert(allocation_time_s >= 0.0, "Allocation time must be positive but is %.3f", allocation_time_s);
  69     _last_allocation_time_s = allocation_time_s;
  70     _last_allocated_bytes = allocated_bytes;
  71   }
  72 
  73   virtual void update_time_to_mixed(double marking_length_s) {
  74    assert(marking_length_s > 0.0, "Marking length must be larger than zero but is %.3f", marking_length_s);
  75     _last_marking_length_s = marking_length_s;
  76   }
  77 
  78   virtual void print();
  79 #ifndef PRODUCT
  80   static void test();
  81 #endif
  82 };
  83 































  84 #endif // SHARE_VM_GC_G1_G1IHOPCONTROL_HPP


  64 
  65   size_t get_conc_mark_start_threshold() { return (size_t) (_ihop_percent * _target_occupancy / 100.0); }
  66 
  67   virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size) {
  68     assert(allocation_time_s >= 0.0, "Allocation time must be positive but is %.3f", allocation_time_s);
  69     _last_allocation_time_s = allocation_time_s;
  70     _last_allocated_bytes = allocated_bytes;
  71   }
  72 
  73   virtual void update_time_to_mixed(double marking_length_s) {
  74    assert(marking_length_s > 0.0, "Marking length must be larger than zero but is %.3f", marking_length_s);
  75     _last_marking_length_s = marking_length_s;
  76   }
  77 
  78   virtual void print();
  79 #ifndef PRODUCT
  80   static void test();
  81 #endif
  82 };
  83 
  84 class G1AdaptiveIHOPControl : public G1IHOPControl {
  85   G1Predictions const * _predictor;
  86 
  87   TruncatedSeq _marking_times_s;
  88   TruncatedSeq _allocation_rate_s;
  89 
  90   size_t _last_allocation_bytes; // Most recent mutator allocation since last GC.
  91   size_t _prev_unrestrained_young_size;
  92 
  93   size_t _current_threshold;
  94 
  95   // Updates _current_threshold according to internal state.
  96   void recalculate();
  97 
  98   bool have_enough_data_for_prediction() const;
  99  public:
 100   G1AdaptiveIHOPControl(double ihop_percent, size_t initial_target_occupancy, G1Predictions const* predictor);
 101 
 102   virtual void set_target_occupancy(size_t target_occupancy);
 103 
 104   virtual size_t get_conc_mark_start_threshold();
 105 
 106   virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size);
 107   virtual void update_time_to_mixed(double marking_length_s);
 108 
 109   virtual void print();
 110 #ifndef PRODUCT
 111   static void test();
 112 #endif
 113 };
 114 
 115 #endif // SHARE_VM_GC_G1_G1IHOPCONTROL_HPP
< prev index next >