Skip to content

Conversation

@toddjonker
Copy link
Contributor

@toddjonker toddjonker commented Oct 4, 2024

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: openjdk/jdk23u#136


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8340398 needs maintainer approval

Issue

  • JDK-8340398: [JVMCI] Unintuitive behavior of UseJVMCICompiler option (Bug - P4 - Approved)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/1024/head:pull/1024
$ git checkout pull/1024

Update a local copy of the PR:
$ git checkout pull/1024
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/1024/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1024

View PR using the GUI difftool:
$ git pr show -t 1024

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/1024.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 4, 2024

👋 Welcome back toddjonker! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 4, 2024

@toddjonker This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8340398: [JVMCI] Unintuitive behavior of UseJVMCICompiler option

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 47 new commits pushed to the master branch:

  • c62b0a5: 8325610: CTW: Add StressIncrementalInlining to stress options
  • a2f0ddb: 8325762: Use PassFailJFrame.Builder.splitUI() in PrintLatinCJKTest.java
  • 5013360: 8341806: Gcc version detection failure on Alinux3
  • 3fc07f2: 8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code
  • 27d2abe: 8320892: AArch64: Restore FPU control state after JNI
  • fe4b0fa: 8332866: Crash in ImageIO JPEG decoding when MEM_STATS in enabled
  • dd4e0ae: 8341261: Tests assume UnlockExperimentalVMOptions is disabled by default
  • f19e69a: 8342014: RISC-V: ZStoreBarrierStubC2 clobbers rflags
  • 70eff9d: 8340109: Ubsan: ciEnv.cpp:1660:65: runtime error: member call on null pointer of type 'struct CompileTask'
  • 6ed940b: 8320682: [AArch64] C1 compilation fails with "Field too big for insn"
  • ... and 37 more: https://git.openjdk.org/jdk21u-dev/compare/e24138546c51ee39ae262a3ba762dc7e928209dc...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title Backport 4cd8c75a55163be33917b1fba9f360ea816f3aa9 8340398: [JVMCI] Unintuitive behavior of UseJVMCICompiler option Oct 4, 2024
@openjdk
Copy link

openjdk bot commented Oct 4, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Oct 4, 2024
@openjdk openjdk bot added the clean Identical backport; no merge resolution required label Oct 4, 2024
@toddjonker toddjonker marked this pull request as ready for review October 9, 2024 17:58
@openjdk
Copy link

openjdk bot commented Oct 9, 2024

⚠️ @toddjonker This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 9, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 9, 2024

Webrevs

@toddjonker
Copy link
Contributor Author

/approval request This streamlines configuration of our JDK+Graal distro, which in turn allows two failing tests to pass without modification. A corresponding backport PR for JDK23 is openjdk/jdk23u#136

@openjdk
Copy link

openjdk bot commented Oct 14, 2024

@toddjonker
8340398: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Oct 14, 2024
@GoeLin
Copy link
Member

GoeLin commented Oct 17, 2024

Hi Todd,
I'm not sure this is a good candidate for backport.
As you say, it will change the way the compilers are loaded and operated.
This might be quite unexpected for graal/truffle users if they update from 21.0.5 to 21.0.6.

Also, how did you test this backport?

@toddjonker
Copy link
Contributor Author

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.

@GoeLin
Copy link
Member

GoeLin commented Oct 21, 2024

Thanks. Ok, so let's go that way.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Oct 21, 2024
@toddjonker
Copy link
Contributor Author

Thanks Goetz!

@toddjonker
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Oct 21, 2024
@openjdk
Copy link

openjdk bot commented Oct 21, 2024

@toddjonker
Your change (at version 757df9c) is now ready to be sponsored by a Committer.

@Rudometov
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 21, 2024

Going to push as commit b010fdc.
Since your change was applied there have been 47 commits pushed to the master branch:

  • c62b0a5: 8325610: CTW: Add StressIncrementalInlining to stress options
  • a2f0ddb: 8325762: Use PassFailJFrame.Builder.splitUI() in PrintLatinCJKTest.java
  • 5013360: 8341806: Gcc version detection failure on Alinux3
  • 3fc07f2: 8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code
  • 27d2abe: 8320892: AArch64: Restore FPU control state after JNI
  • fe4b0fa: 8332866: Crash in ImageIO JPEG decoding when MEM_STATS in enabled
  • dd4e0ae: 8341261: Tests assume UnlockExperimentalVMOptions is disabled by default
  • f19e69a: 8342014: RISC-V: ZStoreBarrierStubC2 clobbers rflags
  • 70eff9d: 8340109: Ubsan: ciEnv.cpp:1660:65: runtime error: member call on null pointer of type 'struct CompileTask'
  • 6ed940b: 8320682: [AArch64] C1 compilation fails with "Field too big for insn"
  • ... and 37 more: https://git.openjdk.org/jdk21u-dev/compare/e24138546c51ee39ae262a3ba762dc7e928209dc...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 21, 2024
@openjdk openjdk bot closed this Oct 21, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 21, 2024
@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Oct 21, 2024
@openjdk
Copy link

openjdk bot commented Oct 21, 2024

@Rudometov @toddjonker Pushed as commit b010fdc.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@toddjonker toddjonker deleted the unintuitive-behavior branch October 21, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants