RFR (L): 8073500: Prevent certain commercial flags from being changed at runtime
Gerard Ziemski
gerard.ziemski at oracle.com
Fri May 6 16:40:32 UTC 2016
hi Coleen,
Thank you for the review.
> On May 5, 2016, at 4:01 PM, Coleen Phillimore <coleen.phillimore at oracle.com> wrote:
>
>
> 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).
Fixed.
>
> 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) { }
Fixed.
>
>
> http://cr.openjdk.java.net/~gziemski/8073500_rev1/src/share/vm/runtime/commandLineFlagWriteableList.cpp.html
>
> Does this really need all of these #includes?
I removed:
#include “gc/cms/concurrentMarkSweepGeneration.inline.hpp”
#include “gc/g1/heapRegionBounds.inline.hpp”
#include “gc/shared/plab.hpp
The rest are needed I believe.
>
> Copyright date should be only 2016.
Fixed.
Tank you.
>
> 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