RFR: 8214278: Cleanup process_completed_threshold and related state

Kim Barrett kim.barrett at oracle.com
Mon Nov 26 21:17:15 UTC 2018


> On Nov 26, 2018, at 3:15 PM, Stefan Johansson <stefan.johansson at oracle.com> wrote:
> On 2018-11-26 13:43, Thomas Schatzl wrote:
>>> […]
>>> CR:
>>> https://bugs.openjdk.java.net/browse/JDK-8214278
>>> https://bugs.openjdk.java.net/browse/JDK-8156696
>>> 
>>> Webrev:
>>> http://cr.openjdk.java.net/~kbarrett/8214278/open.00/
> Looks good. I agree with Thomas about the constants, I would also prefer camel case.

Thanks for reviewing.

> Cheers,
> Stefan
> 
>>> 
>>> Testing:
>>> mach5 tier1-5
>>> 
>> Thanks for doing this cleanup.
>> 
>> Some minor nits:
>> 
>> […]
>> - not sure if static consts like
>> _process_completed_buffers_threshold_never should be named like a
>> member. I think at some point we agreed on (but did not write down) to
>> use CamelCase for those.

This came up in Thomas's review of another change of mine recently.  I
don't have a strong preference.  I'm merely attempting to follow the
Style Guide:

Top Ten List:
9. #Names Instance variable names start with underscore ...

Naming:
- Local names (fields, variables) ... are lower-case.
- Constant names in upper-case or mixed-case are *tolerated* [emphasis mine], according to historical necessity.
- Constant names ... must have a distinct appearance from other names in related APIs.

The first and second suggest the convention I used, e.g. lower case
with leading underscore.  The third argues against the proposed use of
mixed-case (with or without leading underscore?).  The last, having
distinct appearance, seems inconsistent with the others.  (Although
who really knows, since the terminology in these rules is not standard
C++ terminology, so it can be hard to be certain what is being
referred to.)

And of course, examples of all of these mentioned styles (and probably
more) can be found in our code base.

Anyone feel like proposing some modifications to the Style Guide?




More information about the hotspot-gc-dev mailing list