RFR: 8345826: Do not automatically resolve jdk.internal.vm.ci when libgraal is used [v3]

Doug Simon dnsimon at openjdk.org
Fri May 16 15:28:53 UTC 2025


On Fri, 16 May 2025 15:16:15 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> If you have an app that wants to use the jdk.internal.vm.ci API, you must specify both -XX:+EnableJVMCI and  --add-modules=jdk.internal.vm.ci.

You should only have to specify `--add-modules=jdk.internal.vm.ci` and that now sets `+EnableJVMCI`. If you also want libgraal to be used as the JIT (instead of C2), then you need to add `-XX:+UseGraalJIT`.

For the Truffle on Oracle JDK, this means:
* `--add-modules=jdk.internal.vm.ci`: Use C2 for JIT ("hosted") compilation and libgraal for Truffle ("guest") compilation
* `--add-modules=jdk.internal.vm.ci -XX:+UseGraalJIT`: Use libgraal for both JIT and Truffle compilation

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25240#discussion_r2093262720


More information about the graal-dev mailing list