Request for review (S): 7102191 G1: assert(_min_desired_young_length <= initial_region_num) failed: Initial young gen size too small
john.cuthbertson at oracle.com
Tue Oct 25 23:23:28 UTC 2011
This looks good to me. One suggestion - replace the body of
G1YoungGenSize::initial_young_region_num() with "ShouldNotCallThis();"
and add a comment summarizing your explanation below.
On 10/24/2011 1:54 PM, Bengt Rutisson wrote:
> Hi all,
> Could I have a couple of reviews for this small change?
> When we use the NewRatio flag we set the min and max values for the
> young gen to the same value. We do this just after we have let the GC
> policy calculate min, initial and max values. However, if NewRatio is
> being used we only care about the min and max values. Thus, the
> update_young_list_size_using_newratio() method does not update any
> initial value.
> This is what triggers the assert. In G1CollectorPolicy::init() first
> calculates the "default" min, initial and max values, then we detect
> that NewRatio is being used and we update min and max, but forget
> about initial.
> Looking a bit closer at the calculations it turns out that the initial
> value is not needed. We only use it when we have a fixed young gen. In
> this case min == initial == max per definition. So, either min or max
> can be used instead of initial.
> The fix is to delete the initial value calculation and the local
> 7102191 G1: assert(_min_desired_young_length <= initial_region_num)
> failed: Initial young gen size too small
More information about the hotspot-gc-dev