< prev index next >

src/hotspot/share/gc/g1/g1Policy.hpp

Print this page
rev 54086 : imported patch 8219100-cleanup-young-collection-prologue
rev 54087 : imported patch 8218668-reorganize-collection-set

@@ -42,10 +42,11 @@
 //   * choice of collection set.
 //   * when to collect.
 
 class HeapRegion;
 class G1CollectionSet;
+class G1CollectionSetCandidates;
 class G1CollectionSetChooser;
 class G1IHOPControl;
 class G1Analytics;
 class G1SurvivorRegions;
 class G1YoungGenSizer;

@@ -342,11 +343,28 @@
   }
 
   bool next_gc_should_be_mixed(const char* true_action_str,
                                const char* false_action_str) const;
 
-  uint finalize_collection_set(double target_pause_time_ms, G1SurvivorRegions* survivor);
+  // Select and return the number of initial and optional old gen regions from
+  // the given collection set candidates and the remaining time. Num_expensive_regions
+  // returns the number of regions taken within the initial region count because of
+  // the minimum old gen region requirement.
+  void select_old_collection_set_regions(G1CollectionSetCandidates* candidates,
+                                         double time_remaining_ms,
+                                         uint& num_expensive_regions,
+                                         uint& num_initial_regions,
+                                         uint& num_optional_regions);
+
+  // Select the number of optional regions from the given collection set candidates,
+  // the remaining time and the maximum number of these regions and return in
+  // num_optional_regions.
+  void select_optional_collection_set_regions(G1CollectionSetCandidates* candidates,
+                                              uint const max_optional_regions,
+                                              double time_remaining_ms,
+                                              uint& num_optional_regions);
+
 private:
   // Set the state to start a concurrent marking cycle and clear
   // _initiate_conc_mark_if_possible because it has now been
   // acted on.
   void initiate_conc_mark();

@@ -401,15 +419,17 @@
   uint _max_survivor_regions;
 
   AgeTable _survivors_age_table;
 
   size_t desired_survivor_size(uint max_regions) const;
-public:
+
   // Fraction used when predicting how many optional regions to include in
   // the CSet. This fraction of the available time is used for optional regions,
   // the rest is used to add old regions to the normal CSet.
   double optional_prediction_fraction() { return 0.2; }
+
+public:
   // Fraction used when evacuating the optional regions. This fraction of the
   // remaining time is used to choose what regions to include in the evacuation.
   double optional_evacuation_fraction() { return 0.75; }
 
   uint tenuring_threshold() const { return _tenuring_threshold; }
< prev index next >