RFR: JDK-8282797: CompileCommand parsing errors should exit VM [v2]

Tobias Holenstein tholenstein at openjdk.org
Wed May 24 10:56:00 UTC 2023


> Currently, errors during compile command parsing just print an error but don't exit the VM. As a result, issues go unnoticed. 
> 
> With this PR the behavior is changed to exit the VM when an error occurs.
> 
> E.g. `java -XX:CompileCommand=compileonly,HashMap:: -version` will exit the VM after a parsing occurred.  
> 
> CompileCommand: An error occurred during parsing
> Error: Could not parse method pattern
> Line: 'compileonly,HashMap::'
> 
> Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
> Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
> Use:   '-XX:CompileCommand=help' for more information and to list all option.
> 
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> 
> 
> ### Updated Tests
> Updated all tests to now expect an error code `1` for wrong `CompileCommand`

Tobias Holenstein has updated the pull request incrementally with four additional commits since the last revision:

 - Update test/hotspot/jtreg/compiler/compilercontrol/share/scenario/Scenario.java
   
   Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
 - Update IntrinsicCommand.java
 - Update compilerOracle.cpp
 - Update src/hotspot/share/compiler/compilerOracle.cpp
   
   Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13753/files
  - new: https://git.openjdk.org/jdk/pull/13753/files/6de71f77..8aeef24d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13753&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13753&range=00-01

  Stats: 9 lines in 3 files changed: 3 ins; 2 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/13753.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13753/head:pull/13753

PR: https://git.openjdk.org/jdk/pull/13753


More information about the hotspot-dev mailing list