Print this page
8236073: G1: Use SoftMaxHeapSize to guide GC heuristics


  40   const G1Analytics* _analytics;
  41 
  42   const uint _num_prev_pauses_for_heuristics;
  43   // Ratio check data for determining if heap growth is necessary.
  44   uint _ratio_over_threshold_count;
  45   double _ratio_over_threshold_sum;
  46   uint _pauses_since_start;
  47 
  48 
  49 protected:
  50   G1HeapSizingPolicy(const G1CollectedHeap* g1h, const G1Analytics* analytics);
  51 public:
  52 
  53   // If an expansion would be appropriate, because recent GC overhead had
  54   // exceeded the desired limit, return an amount to expand by.
  55   virtual size_t expansion_amount();
  56 
  57   // Clear ratio tracking data used by expansion_amount().
  58   void clear_ratio_check_data();
  59 



  60   static G1HeapSizingPolicy* create(const G1CollectedHeap* g1h, const G1Analytics* analytics);
  61 };
  62 
  63 #endif // SHARE_GC_G1_G1HEAPSIZINGPOLICY_HPP


  40   const G1Analytics* _analytics;
  41 
  42   const uint _num_prev_pauses_for_heuristics;
  43   // Ratio check data for determining if heap growth is necessary.
  44   uint _ratio_over_threshold_count;
  45   double _ratio_over_threshold_sum;
  46   uint _pauses_since_start;
  47 
  48 
  49 protected:
  50   G1HeapSizingPolicy(const G1CollectedHeap* g1h, const G1Analytics* analytics);
  51 public:
  52 
  53   // If an expansion would be appropriate, because recent GC overhead had
  54   // exceeded the desired limit, return an amount to expand by.
  55   virtual size_t expansion_amount();
  56 
  57   // Clear ratio tracking data used by expansion_amount().
  58   void clear_ratio_check_data();
  59 
  60   // Check if heap size can be shrinked
  61   bool can_shrink_heap_size_to(size_t heap_size);
  62 
  63   static G1HeapSizingPolicy* create(const G1CollectedHeap* g1h, const G1Analytics* analytics);
  64 };
  65 
  66 #endif // SHARE_GC_G1_G1HEAPSIZINGPOLICY_HPP