RFR (S): 8143958: CDS Shared flags need constraint function
Gerard Ziemski
gerard.ziemski at oracle.com
Mon Mar 28 19:13:57 UTC 2016
hi Ioi,
Thank you for there review.
I have factored out the common code as you suggested and I like it now much better.
Updated webrev at http://cr.openjdk.java.net/~gziemski/8143958_rev2
cheers
>>
> On Mar 25, 2016, at 3:47 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
>
> Hi Gerard,
>
> This looks OK. I have a general comment about commandLineFlagConstraintsRuntime.cpp. There's a lot of boiler-plate code like this:
>
> 136 if (value > max) {
> 137 CommandLineError::print(verbose,
> 138 "SharedReadWriteSize (" SIZE_FORMAT ") must be "
> 139 "smaller than (" SIZE_FORMAT ")\n",
> 140 value, max);
> 141 return Flag::VIOLATES_CONSTRAINT;
> 142 } else {
> 143 return Flag::SUCCESS;
> 144 }
>
>
> Should that be wrapped in a helper function like this?
>
> return CommandLineError::check_max(value, max, "SharedReadWriteSize");
>
> Thanks
> - Ioi
>
> On 3/25/16 9:26 AM, Gerard Ziemski wrote:
>> hi all,
>>
>> Please review this small fix which adds constraints to CDS flags. Please note that the max range value is based on the sum of min values of the other 3 flags, so setting one flag’s value to max while leaving the other 3 flags at their defaults will trigger constraint failure, which test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java accounts for.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8143958
>> http://cr.openjdk.java.net/~gziemski/8143958_rev1
>>
>> Passes JPRT hotspot and RBT CommandLine/OptionsValidation/TestOptionsWithRanges on all platforms.
>>
>
More information about the hotspot-runtime-dev
mailing list