Request for review: 8006298: Specifying malformed JFR options (--XX:+FlightRecorderOptions) outputs non-sensical error

Nils Loodin nils.loodin at
Thu Jan 31 00:09:23 PST 2013

Looks good!

Something to think about: When we're able to detect a user error enough to actually tell the user what he should do, could we just.. do it ourselves?

Like when eclipse has detected that a source file has been updated and tells us we must press "refresh" in order to see it? When the error and fix is obvious to the application, perhaps we should just apply a fix and notify the user?

Nils Loodin

On Jan 30, 2013, at 19:51 , harold seigel <harold.seigel at> wrote:

> Hi,
> Please review the following change to fix bug 8006298.
> Summary:
> This change enables hotspot to emit more useful messages when Java options are specified incorrectly.
> This was tested using JCK, UTE, and JTREG tests, and by hand.  Below are the test cases that were run by hand.  Please let me know if you have any additional suggestions.  (The "Error:..." messages appeared in all cases but are only shown for the initial case.)
> $JAVA_HOME/bin/java -XX:UseLargePages -version
> Missing +/- setting for VM option 'UseLargePages'
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> $JAVA_HOME/bin/java -XX:+UseLargePages=8 -version
> Improperly specified VM option 'UseLargePages'
> $JAVA_HOME/bin/java -XX:ObjectAlignmentInBytes=v -version
> Improperly specified VM option 'ObjectAlignmentInBytes'
> $JAVA_HOME/bin/java -XX:-ObjectAlignmentInBytes=16 -version
> Unexpected +/- setting in VM option 'ObjectAlignmentInBytes'   <-- 64 bit VM's
> Unrecognized VM option 'ObjectAlignmentInBytes'                <-- 32 bit VM's
> $JAVA_HOME/bin/java -XX:bogus_option -version
> Unrecognized VM option 'bogus_option'
> Open webrev at
> Bug link at
> Thanks!  Harold 

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-runtime-dev mailing list