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

Gerard Ziemski gerard.ziemski at oracle.com
Fri May 6 16:02:02 UTC 2016


hi David,

> On May 5, 2016, at 3:55 PM, David Holmes <david.holmes at oracle.com> wrote:
> 
> Hi Gerard,
> 
> How does this relate to the existing Manageable and Product_rw flags ??

Good questions:

#1 Re: Manageable

There is some overlap when it comes to setting the flag during the runtime (ie. vie jcmd), which will need to be reconciled (in a follow up task), but this mechanism is more general (with possibly more writeable types added in the future) and applies to all stages of the VM runtime, including the startup.


#2 Re: product_rw

I don’t see that used anywhere, we should remove it (in a follow up task).


cheers


> 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