IgnoreUnrecognizedVMOptions and badly specified options
Dmitry Dmitriev
dmitry.dmitriev at oracle.com
Thu Jun 25 12:17:30 UTC 2015
Hello,
Working with JVM command line options I noticed that
"IgnoreUnrecognizedVMOptions" option allow to hide options with bad
values. "IgnoreUnrecognizedVMOptions" allow to ignore unrecognized
options, but it also allow to ignore improperly specified VM Options
which are processed in general way, i.e. "-XX:" options processed by
Arguments::process_argument
function(hotspot/src/share/vm/runtime/arguments.cpp module).
I will be very appreciated if someone can describe this behavior or
state that this is intentional.
Example for numeric and boolean options:
1) Bad numeric option with and without "-XX:+IgnoreUnrecongnizedVMOptions"
java -XX:MaxRAMFraction=-1 -version
Improperly specified VM option 'MaxRAMFraction=-1'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
java -XX:MaxRAMFraction=-1 -XX:+IgnoreUnrecognizedVMOptions -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
2) Bad boolean option with and without "-XX:+IgnoreUnrecongnizedVMOptions"
java -XX:UseG1GC -version
Missing +/- setting for VM option 'UseG1GC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
java -XX:UseG1GC -XX:+IgnoreUnrecognizedVMOptions -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
So, as we see when "-XX:+IgnoreUnrecongnizedVMOptions" is used, bad
"-XX:MaxRAMFraction=-1" and "-XX:UseG1GC" are ignored. I don't know is
this behavior intentional or not, but HotSpot works in that way.
So, can someone tell me this is intentional? Or this behavior is wrong?
Thank you,
Dmitry
More information about the hotspot-dev
mailing list