7102191: G1: assert(_min_desired_young_length <= initial_region_num) failed: Initial young gen size too small
Summary: initial_region_num actually not needed.
Reviewed-by: tonyp, johnc
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Tue Oct 25 20:15:41 2011 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Wed Oct 26 08:44:53 2011 +0200
@@ -498,7 +498,6 @@
initialize_gc_policy_counters();
G1YoungGenSizer sizer;
- size_t initial_region_num = sizer.initial_young_region_num();
_min_desired_young_length = sizer.min_young_region_num();
_max_desired_young_length = sizer.max_young_region_num();
@@ -512,17 +511,14 @@
}
}
- // GenCollectorPolicy guarantees that min <= initial <= max.
- // Asserting here just to state that we rely on this property.
assert(_min_desired_young_length <= _max_desired_young_length, "Invalid min/max young gen size values");
- assert(initial_region_num <= _max_desired_young_length, "Initial young gen size too large");
- assert(_min_desired_young_length <= initial_region_num, "Initial young gen size too small");
set_adaptive_young_list_length(_min_desired_young_length < _max_desired_young_length);
if (adaptive_young_list_length()) {
_young_list_fixed_length = 0;
} else {
- _young_list_fixed_length = initial_region_num;
+ assert(_min_desired_young_length == _max_desired_young_length, "Min and max young size differ");
+ _young_list_fixed_length = _min_desired_young_length;
}
_free_regions_at_end_of_collection = _g1->free_regions();
update_young_list_target_length();