RFR: 8365468: EagerJVMCI should only apply to the CompilerBroker JVMCI runtime

Doug Simon dnsimon at openjdk.org
Wed Aug 13 21:39:21 UTC 2025


The primary goal of [JDK-8356447](https://bugs.openjdk.org/browse/JDK-8356447) was to have initialization of the Graal JIT occur in the same phase as the rest of VM startup such that initialization problems are detected and reported prior to executing any user code.

This change caused a performance regression for Truffle when it is used in a JDK that includes both jargraal and libgraal. The problem is that Truffle needs jarjvmci but does not need jargraal when libgraal is available. Initializing jargraal in that configuration delays initialization of Truffle (not just Truffle compilation). Additionally, the jargraal instance created will never be used, wasting memory.

The solution in this PR is to make EagerJVMCI only apply when initializing jarjvmci on a CompileBroker thread.

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

Commit messages:
 - only apply EagerJVMCI on a CompileBroker thread

Changes: https://git.openjdk.org/jdk/pull/26768/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26768&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8365468
  Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26768.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26768/head:pull/26768

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


More information about the hotspot-compiler-dev mailing list