[jdk21u-dev] RFR: 8340398: [JVMCI] Unintuitive behavior of UseJVMCICompiler option
Todd V. Jonker
duke at openjdk.org
Thu Oct 17 22:38:05 UTC 2024
On Fri, 4 Oct 2024 18:43:21 GMT, Todd V. Jonker <duke at openjdk.org> wrote:
> Clean backport of patch authored by @tzezula and approved by @dougxc
>
> The patch default-enables `useJVMCINativeLibrary` when `EnableJVMCI` is on and `libgraal` present. While this is a behavior change, it seems unlikely that users would deploy `libgraal` and _not_ want it used by JVMCI.
>
> This streamlines configuration of our JDK+Graal distro, which in turn allows two failing tests to pass without modification.
>
> Equivalent backport to 23: https://github.com/openjdk/jdk23u/pull/136
Hi Goetz,
I understand there's judgement call here.
The PR changes the behavior when:
* the user has specified `+XX:EnableJVMCI` but does not configure `useJVMCINativeLibrary` _either way_; and
* the runtime image has `libgraal`.
Currently, `libgraal` won't be enabled in that scenario. After this change, enabling JVMC auto-enables `libgraal` use when it is present. I agree with the original author that using the faster implementation a better default.
Coming from the perspective of a Truffle user may be more convincing. The current behavior is such that _adding_ `-XX:useJVMCINativeLibrary` to either `+XX:EnableJVMCI` or `+XX:EnableJVMCIProduct` has the surprising side effect of disabling `libgraal` for Truffle.
While this is a behavior change, it seems unlikely that users would deploy libgraal and not want it used by JVMCI. (Certainly a Truffle user will want it!)
BTW, I run tiers 1-3 on linux-x86_64-server-release and all pass modulo two tests that are known to fail in our environment.
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1024#issuecomment-2420734979
More information about the jdk-updates-dev
mailing list