diff src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 3920:af2ab04e0038

6929868: G1: introduce min / max young gen size bounds Summary: Make G1 handle young gen size command line flags more consistently Reviewed-by: tonyp, jwilhelm
author brutisso
date Thu, 08 Sep 2011 16:29:41 +0200
parents 4f41766176cf
children 4dfb2df418f2
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Thu Sep 08 05:16:49 2011 -0400
+++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Thu Sep 08 16:29:41 2011 +0200
@@ -185,6 +185,7 @@
   bool _adaptive_young_list_length;
   size_t _young_list_target_length;
   size_t _young_list_fixed_length;
+  size_t _prev_eden_capacity; // used for logging
 
   // The max number of regions we can extend the eden by while the GC
   // locker is active. This should be >= _young_list_target_length;
@@ -245,6 +246,10 @@
 
   TruncatedSeq* _max_conc_overhead_seq;
 
+  bool   _using_new_ratio_calculations;
+  size_t _min_desired_young_length; // as set on the command line or default calculations
+  size_t _max_desired_young_length; // as set on the command line or default calculations
+
   size_t _recorded_young_regions;
   size_t _recorded_non_young_regions;
   size_t _recorded_region_num;
@@ -826,9 +831,8 @@
     return _all_pause_times_ms->num() + 1;
   }
 
-  // Recalculate the reserve region number. This should be called
-  // after the heap is resized.
-  void calculate_reserve(size_t all_regions);
+  // This should be called after the heap is resized.
+  void record_new_heap_size(size_t new_number_of_regions);
 
 protected:
 
@@ -841,6 +845,8 @@
                                                 size_t max_live_bytes);
   void record_concurrent_mark_cleanup_end_work2();
 
+  void update_young_list_size_using_newratio(size_t number_of_heap_regions);
+
 public:
 
   virtual void init();