RFR: 8372802: PrintFlagsFinal should also print locked flags

Frederic Thevenet fthevenet at openjdk.org
Mon Dec 1 20:18:48 UTC 2025


On Mon, 1 Dec 2025 19:23:52 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> This change aims to provide a way to print all flags including "locked" ones (e.g. Diagnostic and Experimental) without having to explicitly set `+UnlockExperimentalVMOptions` or `+UnlockDiagnosticVMOptions` 
>> 
>> This applies to the following VM options: `PrintFlagsFinal` , `PrintFlagsRanges`, `PrintFlagsInitial`, `PrintFlagsWithComments`, `-XprintFlags`, as well as the `PrintVMFlagsDCmd` diagnostic command (when set to show all flags).
>> 
>> Places that print out only flags that have been changed (i.e. that skip flags with default values), like when during the generation of hs_err reports, are not affected by this.
>
> test/hotspot/jtreg/runtime/CommandLine/PrintAllFlags.java line 30:
> 
>> 28:  *  +UnlockDiagnosticVMOptions are set than when they aren't.
>> 29:  * @requires vm.flagless
>> 30:  * @modules java.base/jdk.internal.misc
> 
> Is it needed? I don't see internal API usage.

You're right of course, it isn't needed.
Thanks.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28579#discussion_r2578496052


More information about the hotspot-runtime-dev mailing list