RFR: 8345826: Do not automatically resolve jdk.internal.vm.ci when libgraal is used [v2]
Doug Simon
dnsimon at openjdk.org
Fri May 16 13:16:30 UTC 2025
> The `EnableJVMCI` flag currently serves 2 purposes:
> * Guards VM code ([example](https://github.com/openjdk/jdk/blob/b1e778d9d2ad13ee5f1ed629a8805008580f86c0/src/hotspot/share/runtime/sharedRuntime.cpp#L652)).
> * [Adds](https://github.com/openjdk/jdk/blob/b1e778d9d2ad13ee5f1ed629a8805008580f86c0/src/hotspot/share/runtime/arguments.cpp#L1804) `jdk.internal.vm.ci` to the root module set.
>
> This PR changes nothing about the first point.
>
> On the second point, to use the `jdk.internal.vm.ci` module, it must now be explicitly added with `--add-modules=jdk.internal.vm.ci`, which will also set `EnableJVMCI` as a side-effect.
>
> The primary motivation is to make use of libgraal compatible with `-XX:+AOTClassLinking`. This flag relies on an archive of the root module set created in a separate JVM execution. If the root module set is different than what's in the archive at runtime, the AOTClassLinking [optimizations](https://bugs.openjdk.org/browse/JDK-8342279) are disabled. As `jdk.internal.vm.ci` is not resolved when creating the archive, it must not be resolved in the runtime using the archive. As such, `-XX:+EnableJVMCI` must not cause resolution of `jdk.internal.vm.ci` for libgraal to have the startup advantages of AOTClassLinking.
Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
resolve jdk.internal.vm.ci if +EnableJVMCI and -UseJVMCINativeLibrary
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25240/files
- new: https://git.openjdk.org/jdk/pull/25240/files/0e8773e1..34360331
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25240&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25240&range=00-01
Stats: 38 lines in 9 files changed: 5 ins; 15 del; 18 mod
Patch: https://git.openjdk.org/jdk/pull/25240.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25240/head:pull/25240
PR: https://git.openjdk.org/jdk/pull/25240
More information about the graal-dev
mailing list