RFR: 8345826: Do not automatically resolve jdk.internal.vm.ci when libgraal is used [v4]
Doug Simon
dnsimon at openjdk.org
Fri May 16 19:56:52 UTC 2025
On Fri, 16 May 2025 19:33:25 GMT, Tom Rodriguez <never at openjdk.org> wrote:
>> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>>
>> improved error message
>
> test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestHotSpotJVMCIRuntime.java line 173:
>
>> 171: "-XX:+UnlockExperimentalVMOptions",
>> 172: "-XX:+EnableJVMCI",
>> 173: "--add-modules=jdk.internal.vm.ci",
>
> I stared at this for a while to understand why passing this option was required. It's a bit confusing that explicitly passing `-XX:+EnableJVMCI` has different effects based on the value of UseJVMCINativeLibrary. I think that if `EnableJVMCI` is passed on the command line then it should add the module even if libgraal is in use. So something like:
> `if ((!UseJVMCINativeLibrary || FLAG_IS_CMDLINE(EnableJVMCI) && ClassLoader::is_module_observable`
I was not aware FLAG_IS_CMDLINE can be used for altering the semantics of a flag but there seems to be at least one precedent for it with [UseCompactObjectHeaders](https://github.com/openjdk/jdk/blob/3dd34517000e4ce1a21619922c62c025f98aad44/src/hotspot/share/runtime/arguments.cpp#L3671). This is quite nice as now nothing needs to change for Truffle users in terms of enabling the Truffle optimized runtime (cc @chumer).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25240#discussion_r2093603624
More information about the graal-dev
mailing list