RFR: 8242901: Duplicate PSYoung/OldGen max size functions

Stefan Karlsson stefan.karlsson at oracle.com
Mon May 11 09:15:06 UTC 2020


Looks good.

I think I would have preferred to get rid of the _gen infix, since it's 
redundant.

_init_gen_size => _init_size
_min_gen_size => _min_size
_max_gen_size => _max_size

min_gen_size() => min_size()
max_size() => max_size()

I'll leave it up to you to decide if you want to do that change.

Thanks,
StefanK

On 2020-05-08 21:48, Kim Barrett wrote:
> Please review this cleanup of ParallelGC max generation size
> accessors.  There are some lingering inconsistencies left over after
> the removal of UseAdaptiveGCBoundary and associated cleanups.
> 
> We had the following:
> 
> PSYoungGen: max_size(), gen_size_limit()
> Their values were calculated differently but (after removal of
> UseAdaptiveGCBoundary) always have the same value.
> 
> PSOldGen: max_gen_size(), gen_size_limit()
> They were virtual, but that's no longer needed or useful, as there are
> no longer any derived classes.  They were both returning the value of
> _max_gen_size.
> 
> Both classes have min_gen_size(), an accessor for _min_gen_size.
> 
> These have been made consistent for both classes:
> 
> min_gen_size() -- as before
> max_gen_size() -- accessor for _max_gen_size
> 
> There are some assertions involving max_gen_size and the reserved size
> for the generations that are perhaps redundant or could be tightend
> to equality tests, but I've left them as is for now.
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8242901
> 
> Webrev:
> https://cr.openjdk.java.net/~kbarrett/8242901/open.00/
> 
> Testing:
> mach5 tier1-5
> 


More information about the hotspot-gc-dev mailing list