RFR (L): 8073500: Prevent certain commercial flags from being changed at runtime

David Holmes david.holmes at oracle.com
Thu May 5 20:55:37 UTC 2016


Hi Gerard,

How does this relate to the existing Manageable and Product_rw flags ??

Thanks,
David

On 3/05/2016 2:29 AM, Gerard Ziemski wrote:
> hi all,
>
> Please review this fix (large code change, but relatively straightforward implementation wise), which implements a mechanism for enforcing when and how a runtime flag may be modified. There are 3 new types, which can be assigned:
>
> - writeable(Always) is optional and default value, which places no limits on when or how often a flag may be changed
>
> - writeable(Once) denotes that a flag may be >> changed << only once. We allow case such as “java -XX:+UnlockCommercialFeatures ... -XX:+UnlockCommercialFeatures ...” to support existing usage. This is OK, because here the flag only changes its value >> once << , ie. from false to true.
>
> - writeable(CommandLineOnly) denotes that a flag may only be changed from the command line (tools like jcmd may not change such a flag during the runtime)
>
> The implementation is based on the same mechanism as that in JEP-245 (https://bugs.openjdk.java.net/browse/JDK-8059557)
>
>
> bug:    https://bugs.openjdk.java.net/browse/JDK-8073500
> webrev: http://cr.openjdk.java.net/~gziemski/8073500_rev1/
>
> Tested with “JPRT hotspot” and “RBT hs-nightly-runtime”
>
>
> cheers
>


More information about the hotspot-runtime-dev mailing list