JDK-8027314 : Java should recognize Diagnostic options if -XX:+UnlockDiagnosticVMOptions is not specified and print an informative message
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs25,8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-10-25
  • Updated: 2020-01-16
  • Resolved: 2014-01-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b03Fixed
Related Reports
Duplicate :  
Relates :  
Description
e.g. it is not possible to understand that I should specify -XX:+UnlockDiagnosticVMOptions to make -XX:+PrintInlining known:
./jdk1.8.0/bin/java -XX:+PrintInlining -version 
Improperly specified VM option 'PrintInlining' 
Error: Could not create the Java Virtual Machine. 
Error: A fatal exception has occurred. Program will exit.
Comments
This fix is for clarifying the error messages associated with vm options of type diagnostic, experimental, develop, and notproduct. Summary of fix: - added an optional boolean (return_flag) parameter in Flag::find_flag() so that Arguments::process_argument() can inspect the returned flag and call into get_locked_message(); - added new function is_product_build() in globals.[c|h]pp; - in get_locked_message(), issues the appropriate error message; - added a new test VMOptionWarning.java; - minor cleanup in the existing tests - ConfigFileWarning, CompilerConfigFileWarning. Sample output: --------------- Before fix: C:\jdk8_i586\jdk1.8.0\bin\java -XX:+PrintInlining -version Improperly specified VM option 'PrintInlining' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. After fix: C:\jdk8_i586\jdk1.8.0\bin\java -XX:+PrintInlining -version Error: VM option 'PrintInlining' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Before fix: c:\jdk9_i586\jdk1.9.0\bin\java -XX:+TraceJNICalls -version Unrecognized VM option 'TraceJNICalls' Did you mean '(+/-)TraceJNICalls'? Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. After fix: C:\jdk8_i586\jdk1.8.0\bin\java -XX:+TraceJNICalls -version Error: VM option 'TraceJNICalls' is develop and is available only in debug version of VM. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Testing: manual test via command line and the new test VMOptionWarning. Webrev: http://cr.openjdk.java.net/~ccheung/8027314/webrev/
16-01-2014

Changed to Enhancement request. It certainly seems strange to say "Improperly specified VM option XXX" instead of simply saying "VM option XXX is diagnostic and must enabled via -XX:+UnlockDiagnosticVMOptions
28-10-2013

I don't think that it's a compiler bug.
25-10-2013