RFR: 8257872: UL: -Xlog does not check number of options

David Holmes dholmes at openjdk.java.net
Thu Dec 10 01:43:39 UTC 2020


On Wed, 9 Dec 2020 03:04:32 GMT, Koichi Sakata <ksakata at openjdk.org> wrote:

>> Should this be a warning or an error? The behavior seems inconsistent:
>> 
>> $ java -Xlog:gc=error:::foo -version
>> [0.000s][warning][logging] Output options for existing outputs are ignored.
>> java version "16-internal" 2021-03-16
>> Java(TM) SE Runtime Environment (build 16-internal+0-adhoc.iklam.open)
>> Java HotSpot(TM) 64-Bit Server VM (build 16-internal+0-adhoc.iklam.open, mixed mode, sharing)
>> 
>> $ java -Xlog:gc=error::foo -version
>> [0.000s][error][logging] Invalid decorator 'foo'.
>> Invalid -Xlog option '-Xlog:gc=error::foo', see error log for details.
>> Error: Could not create the Java Virtual Machine.
>> Error: A fatal exception has occurred. Program will exit.
>
> In this PR I chose a warning level to ignore the invalid option and run a application. It isn't serious thing and some people might run with invalid option already. 
> 
> The fourth option is for output-option and can be described relatively free. So I suspect that it is ignored even when it is invalid.

I think a warning is okay in this context.

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

PR: https://git.openjdk.java.net/jdk/pull/1685


More information about the hotspot-runtime-dev mailing list