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

Gerard Ziemski gerard.ziemski at oracle.com
Thu May 5 15:52:22 UTC 2016


PING


> On May 2, 2016, at 11:29 AM, Gerard Ziemski <gerard.ziemski at oracle.com> 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