RFR: 8309136: [JVMCI] add -XX:+UseGraalJIT flag [v4]

Doug Simon dnsimon at openjdk.org
Fri Jun 2 16:20:49 UTC 2023


> Use of the Graal-based JIT in OpenJDK currently requires the following flag: `-XX:+EnableJVMCIProduct`
> 
> This has no direct association with Graal. If the JDK image happens to include a non-Graal JVMCI implementation, it will be automatically selected. This would come as a surprise to users who equate JVMCI with Graal.
> 
> This PR introduces a new flag, `-XX:+UseGraalJIT` to address these shortcomings. It is an alias for `-XX:+EnableJVMCIProduct -Djvmci.Compiler=graal`. 
> 
> When `-XX:+UseGraalJIT` is specified, the VM fails fast at startup if there is a non-Graal JVMCI implementation or no JVMCI implementation in the JDK image.

Doug Simon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:

 - [skip-ci] Merge remote-tracking branch 'openjdk-jdk/master' into JDK-8309136
 - improve error message when UseGraalJIT is used without -XX:+UnlockExperimentalVMOptions
 - use strncmp instead of strcmp
 - fix date in copyright header
 - set UseGraalJIT value in enable_jvmci_product_mode
 - added missing test of UseJVMCICompiler when adjusting JVMCI flags under -Xint
 - review based fixes
 - add UseGraalJIT VM flag

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14231/files
  - new: https://git.openjdk.org/jdk/pull/14231/files/28f0a8b8..bcbab075

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14231&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14231&range=02-03

  Stats: 12358 lines in 279 files changed: 10127 ins; 1114 del; 1117 mod
  Patch: https://git.openjdk.org/jdk/pull/14231.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14231/head:pull/14231

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


More information about the hotspot-dev mailing list