RFR: 8242901: Duplicate PSYoung/OldGen max size functions
stefan.karlsson at oracle.com
Mon May 11 17:26:32 UTC 2020
On 2020-05-11 18:43, Kim Barrett wrote:
>> On May 11, 2020, at 5:15 AM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>> 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.
> I thought about doing that earlier, and revisited the question because
> of your comment. There are a number of min/max_mumble_size and mumble_size
> names, so that I think an unadorned min/max_size ends up being somewhat
There's no other max/min in PSOldGen/PSYoungGen, so I don't understand
what you have been looking at.
All I see is that a lot of places where the word gen is mentioned twice.
which I think makes perfectly sense as:
> While I was looking at that I noticed a few places that were being
> inconsistent with nearby code by directly accessing _min/max_gen_size
> rather than using the accessor functions. I tidied those up.
OK. I tend to move class-internal code in the other direction and remove
calls to getters.
> It seems _init_gen_size is only used during initialization and never
> accessed again (for either generation), so could just be passed from
> the constructor argument into the initialization functions as an
> argument rather than via a member variable. I tidied that up too.
> New webrevs:
> full: https://cr.openjdk.java.net/~kbarrett/8242901/open.01/
> incr: https://cr.openjdk.java.net/~kbarrett/8242901/open.01.inc/
> Local (linux-x64) hotspot:tier1 with -XX:+UseParallelGC.
More information about the hotspot-gc-dev