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

Coleen Phillimore coleen.phillimore at oracle.com
Thu May 5 21:01:29 UTC 2016


Hi,   This looks good.  I only have minor comments for which I don't 
need to see another webrev.

http://cr.openjdk.java.net/~gziemski/8073500_rev1/src/share/vm/runtime/globals.cpp.udiff.html

*+ if (writeable) {*


This should be if (writeable != NULL).

http://cr.openjdk.java.net/~gziemski/8073500_rev1/src/share/vm/runtime/commandLineFlagWriteableList.hpp.html

   48   CommandLineFlagWriteable(const char* name, WriteableType type) { _name=name; _type=type; _writeable=true; _startup_done=false; }


C++ initializers are preferred here.

   48   CommandLineFlagWriteable(const char* name, WriteableType type) : _name(name), _type(type), _writeable(true), _startup_done(false) { }


http://cr.openjdk.java.net/~gziemski/8073500_rev1/src/share/vm/runtime/commandLineFlagWriteableList.cpp.html

Does this really need all of these #includes?

Copyright date should be only 2016.

Thanks,
Coleen


On 5/2/16 12:29 PM, 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