hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp
changeset 37070 a2b389f23bac
parent 37051 b02a3fb98142
child 37080 6f33de00485c
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Fri Mar 11 10:06:30 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Fri Mar 11 10:18:11 2016 +0100
@@ -118,9 +118,6 @@
   _max_survivor_regions(0),
 
   // add here any more surv rate groups
-  _recorded_survivor_regions(0),
-  _recorded_survivor_head(NULL),
-  _recorded_survivor_tail(NULL),
   _survivors_age_table(true),
 
   _gc_overhead_perc(0.0),
@@ -430,7 +427,7 @@
   // Calculate the absolute and desired min bounds first.
 
   // This is how many young regions we already have (currently: the survivors).
-  uint base_min_length = recorded_survivor_regions();
+  const uint base_min_length = _g1->young_list()->survivor_length();
   uint desired_min_length = calculate_young_list_desired_min_length(base_min_length);
   // This is the absolute minimum young length. Ensure that we
   // will at least have one eden region available for allocation.
@@ -481,7 +478,7 @@
     young_list_target_length = desired_min_length;
   }
 
-  assert(young_list_target_length > recorded_survivor_regions(),
+  assert(young_list_target_length > base_min_length,
          "we should be able to allocate at least one eden region");
   assert(young_list_target_length >= absolute_min_length, "post-condition");
 
@@ -595,8 +592,8 @@
 
 double G1CollectorPolicy::predict_survivor_regions_evac_time() const {
   double survivor_regions_evac_time = 0.0;
-  for (HeapRegion * r = _recorded_survivor_head;
-       r != NULL && r != _recorded_survivor_tail->get_next_young_region();
+  for (HeapRegion * r = _g1->young_list()->first_survivor_region();
+       r != NULL && r != _g1->young_list()->last_survivor_region()->get_next_young_region();
        r = r->get_next_young_region()) {
     survivor_regions_evac_time += predict_region_elapsed_time_ms(r, collector_state()->gcs_are_young());
   }
@@ -700,8 +697,6 @@
   _short_lived_surv_rate_group->start_adding_regions();
   // also call this on any additional surv rate groups
 
-  record_survivor_regions(0, NULL, NULL);
-
   _free_regions_at_end_of_collection = _g1->num_free_regions();
   // Reset survivors SurvRateGroup.
   _survivor_surv_rate_group->reset();