RFR: 8356447: Change default for EagerJVMCI to true [v2]
Yudi Zheng
yzheng at openjdk.org
Tue May 13 12:39:55 UTC 2025
On Tue, 13 May 2025 06:52:27 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> By default, JVMCI and Graal initialization only occurs on the first top-tier (i.e. tier 4) JIT compilation request. This made sense prior to libgraal where the initialization was interpreted and so noticeably contributed to VM startup. However, with libgraal the initialization is sufficiently fast to not impact startup noticeably.
>>
>> The motivation for JVMCI and Graal eager initialization by default is to make Graal command line option processing happen in the same VM phase as handling of all other VM command line flags. That is, errors in Graal options should:
>> 1. Happen deterministically, not just for apps that run long enough to trigger a top tier JIT compilation. For example: `java -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT --version`. In a JDK build that does not include Graal, this may succeed (and print out the version info) or result in a VM error ("Cannot use JVMCI compiler: No JVMCI compiler found").
>> 2. Stop the VM before any application code can be executed. This is just good hygiene.
>>
>> This PR makes JVMCI initialization eager by default if `UseJVMCICompiler` is true.
>> This is done for both libgraal and jargraal so that the behavior is uniform. Since jargraal is now a development configuration, VM startup costs are not critical.
>
> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>
> use FLAG_SET_ERGO_IF_DEFAULT
LGTM
-------------
Marked as reviewed by yzheng (Committer).
PR Review: https://git.openjdk.org/jdk/pull/25121#pullrequestreview-2836595615
More information about the graal-dev
mailing list