RFR(S): JDK-8028093 - Initial young size is smaller than minimum young size

Bengt Rutisson bengt.rutisson at oracle.com
Mon Nov 11 09:32:14 UTC 2013

Hi Jesper,

This looks wrong to me.

adjust_gen0_sizes() is first called with the min values to adjust them. 
Then called with the initial values to adjust them. With your suggested 
change we suddenly mix min and initial values when we adjust. That seems 
very strange to me.

If the issue is that the min and initial values don't match I think we 
should add a third step where we explicitly adjust them to match. 
Something like:

adjust_gen0_sizes(&_min_gen0_size, &_min_gen1_size, _min_heap_byte_size, 
adjust_gen0_sizes(&_initial_gen0_size, &_initial_gen1_size, 
_initial_heap_byte_size, _initial_gen1_size);


On 2013-11-10 00:17, Jesper Wilhelmsson wrote:
> Hi,
> Can I have a couple of reviews of this small bugfix.
> Bug JDK-8028093: https://bugs.openjdk.java.net/browse/JDK-8028093
> The problem is that TwoGenerationCollectorPolicy::adjust_gen0_sizes() 
> is called with the wrong argument in one place. The last argument 
> should always be the value of _min_gen1_size, but in one call it is 
> the _initial_gen1_size.
> Since these variables are class local I see no reason to take 
> _min_gen1_size as an argument at all. Apparently it is error prone. 
> The proposed fix is therefore to remove the argument and use 
> _min_gen1_size directly in adjust_gen0_sizes().
> Webrev: http://cr.openjdk.java.net/~jwilhelm/8028093/webrev/
> Thanks!
> /Jesper

More information about the hotspot-gc-dev mailing list