< prev index next >

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

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

@@ -79,6 +79,37 @@
 #ifndef PRODUCT
   static void test();
 #endif
 };
 
+class G1AdaptiveIHOPControl : public G1IHOPControl {
+  G1Predictions const * _predictor;
+
+  TruncatedSeq _marking_times_s;
+  TruncatedSeq _allocation_rate_s;
+
+  size_t _last_allocation_bytes; // Most recent mutator allocation since last GC.
+  size_t _prev_unrestrained_young_size;
+
+  size_t _current_threshold;
+
+  // Updates _current_threshold according to internal state.
+  void recalculate();
+
+  bool have_enough_data_for_prediction() const;
+ public:
+  G1AdaptiveIHOPControl(double ihop_percent, size_t initial_target_occupancy, G1Predictions const* predictor);
+
+  virtual void set_target_occupancy(size_t target_occupancy);
+
+  virtual size_t get_conc_mark_start_threshold();
+
+  virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size);
+  virtual void update_time_to_mixed(double marking_length_s);
+
+  virtual void print();
+#ifndef PRODUCT
+  static void test();
+#endif
+};
+
 #endif // SHARE_VM_GC_G1_G1IHOPCONTROL_HPP
< prev index next >