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

Doug Simon dnsimon at openjdk.org
Wed May 31 08:30:55 UTC 2023

On Wed, 31 May 2023 08:08:34 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> 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. 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 incrementally with one additional commit since the last revision:
>   review based fixes

The logic in arguments.cpp only ensures the value of `jvmci.Compiler` is consistent with `-XX:+UseGraalJIT`. Actually checking the availability of Graal can only be done in the code I linked to and it's only done on the first Graal JIT compilation (JVMCI compiler initialization is lazy to reduce impact to VM startup time).


PR Comment: https://git.openjdk.org/jdk/pull/14231#issuecomment-1569732162

More information about the graal-dev mailing list