RFR (M): 8142510: -XX:+PrintFlagsRanges should print default range value for those flags that have constraint and an implicit range.

Dmitry Dmitriev dmitry.dmitriev at oracle.com
Fri Mar 11 20:46:29 UTC 2016


Hi Gerard,

Few comments, otherwise looks good. Thank you for doing that!
1) src/share/vm/runtime/globals.cpp
I think that it's unnecessary to declare string_length and range_string 
as static in create_range_str function.

2) src/share/vm/runtime/commandLineFlagConstraintList.cpp
New function CommandLineFlagConstraintList::find looks very similar to 
the existing one CommandLineFlagConstraintList::find_if_needs_check. I 
think that you can remove duplicated logic by refactoring 
CommandLineFlagConstraintList::find_if_needs_check as follows:
   CommandLineFlagConstraint* 
CommandLineFlagConstraintList::find_if_needs_check(const char* name) {
     CommandLineFlagConstraint* found = find(name);
       if ((found != NULL) &&
           (found->type() > _validating_type)) {
***        Please add appropriate comment here, why found is set back to 
NULL  ***
         found = NULL;
       }
     return found;
   }

Thanks,
Dmitry

On 09.03.2016 20:33, Gerard Ziemski wrote:
> hi all,
>
> Please review this enhancement to Command Line Options Validation JEP-245, which prints default ranges for those flags, that only have constraints (ie. no range, but a constraint, implies default range)
>
> bug https://bugs.openjdk.java.net/browse/JDK-8142510
> webrev http://cr.openjdk.java.net/~gziemski/8142510_rev0
>
> tested with JPRT hotspot, RBT hotspot/test/runtime and local test/runtime/CommandLine/OptionsValidation
>
>
> cheers



More information about the hotspot-runtime-dev mailing list