Skip to content

Conversation

@JohnTortugo
Copy link

@JohnTortugo JohnTortugo commented Oct 23, 2025

Hi all, this pull request contains:

  • A backport of commit 2fe12984 from the openjdk/jdk repository - related to ticket JDK-8359064. This commit was authored by Cesar Soares on 19 Jun 2025 and was reviewed by Doug Simon and Tom Rodriguez.
  • A cherry-pick of commit ff54a649 from the openjdk/jdk repository - related to ticket JDK-8360049. This commit was authored by Doug Simon on 20 Jun 2025 and was reviewed by Andrew Haley and Aleksey Shipilev.

These changes updates JVMCI interface to receive/send to the external compiler the reason why a nmethod is being invalidated, which will let that compiler make better decisions about future recompilations of the method. Twelve of the files touched in this PR are just hit by collateral effect due to enum type/entries renaming. The remaining of the changes are in the JVMCI interface itself, which shouldn't affect HotSpot in anyway if not running with JVMCI enabled. A few changes are in tests.

Note that commit ff54a64 was added to this PR to address a bug on the original patch. These original changes have been integrated in JDK mainline over 5 months ago. Besides GHA the current patch was also tested on my internal CI.

Thanks!


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • JDK-8360049 needs maintainer approval
  • Change must not contain extraneous whitespace
  • JDK-8359064 needs maintainer approval
  • Commit message must refer to an issue

Issues

  • JDK-8359064: Expose reason for marking nmethod non-entrant to JVMCI client (Enhancement - P4 - Requested)
  • JDK-8360049: CodeInvalidationReasonTest.java fails with ZGC on AArch64 (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u.git pull/335/head:pull/335
$ git checkout pull/335

Update a local copy of the PR:
$ git checkout pull/335
$ git pull https://git.openjdk.org/jdk25u.git pull/335/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 335

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk25u/pull/335.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 23, 2025

👋 Welcome back cslucas! 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 23, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport 2fe12984474656a08c4525c04a351d85be73f658 8359064: Expose reason for marking nmethod non-entrant to JVMCI client Oct 23, 2025
@openjdk
Copy link

openjdk bot commented Oct 23, 2025

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

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Oct 23, 2025
Reviewed-by: aph, shade
(cherry picked from commit ff54a6493a63cfbcaab7ec90c7db0135e98a7f0c)
@openjdk openjdk bot removed the clean Identical backport; no merge resolution required label Oct 23, 2025
@JohnTortugo
Copy link
Author

/issue add JDK-8359064

@openjdk
Copy link

openjdk bot commented Oct 23, 2025

@JohnTortugo This issue is referenced in the PR title - it will now be updated.

@JohnTortugo
Copy link
Author

/issue add JDK-8360049

@openjdk
Copy link

openjdk bot commented Oct 23, 2025

@JohnTortugo
Adding additional issue to issue list: 8360049: CodeInvalidationReasonTest.java fails with ZGC on AArch64.

@JohnTortugo JohnTortugo marked this pull request as ready for review October 23, 2025 09:25
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 23, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 23, 2025

Webrevs

@JohnTortugo
Copy link
Author

/approval request This PR updates JVMCI interface to receive/send to the external compiler the reason why a nmethod is being invalidated. Most of the touched files in the PR are just hit by collateral effect due to constants' name renaming, though. Note that a second commit/issue was added to this PR to address a bug on the original patch. These original changes have been integrated in JDK mainline about 4 months ago. Besides GHA the current patch was also tested on my internal CI.

@openjdk
Copy link

openjdk bot commented Oct 23, 2025

@JohnTortugo
8359064: The approval request has been created successfully.
8360049: The approval request has been created successfully.

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

@shipilev shipilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backport looks fine.

I do notice JDK-8360168 is still open, and there is JDK-8360169 problemlist addition. @RealFYang, are you OK with this going into 25u, or are you fixing the issue in mainline, or do you want to pick up problemlist patch as well?

@RealFYang
Copy link
Member

The backport looks fine.

I do notice JDK-8360168 is still open, and there is JDK-8360169 problemlist addition. @RealFYang, are you OK with this going into 25u, or are you fixing the issue in mainline, or do you want to pick up problemlist patch as well?

Hi, Thanks for the ping. I think we need the problemlist patch for now.
Should we have it in this backport PR as well? Or shall I propose another one after this PR?

@JohnTortugo
Copy link
Author

If everyone agree I can just problem list the test as part of this PR.

@shipilev
Copy link
Member

Should we have it in this backport PR as well? Or shall I propose another one after this PR?

I say let @JohnTortugo integrate this one, and then to a RISC-V-specific followup, if you need one. Or you just fix the mainline and backport a fix meanwhile.

@RealFYang
Copy link
Member

Should we have it in this backport PR as well? Or shall I propose another one after this PR?

I say let @JohnTortugo integrate this one, and then to a RISC-V-specific followup, if you need one. Or you just fix the mainline and backport a fix meanwhile.

OK. I will try and propose a followup change as needed.

@JohnTortugo
Copy link
Author

The request for JDK-8359064 is still pending but JDK-8360049 was approved. Is there any concern regarding JDK-8359064?

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received and removed approval Requires approval; will be removed when approval is received labels Nov 25, 2025
@shipilev
Copy link
Member

Note for @GoeLin, and a little status update: This one allows downstream Graal/Truffle to fix important performance potholes. Plus, it limits the divergence between mainline and JDK 25, which simplify the maintenance. (We have already picked it up in Corretto 25 for a few months.) So we would like to have it in 25u, pretty please :)

@GoeLin
Copy link
Member

GoeLin commented Nov 28, 2025

Hi @JohnTortugo , I'll approve this, but can you please mention the two JBS bugids in your pull request comment?
Expecially in the context of the follow-up issue the text is quite misleading as-is. Besides that the text is helpful. Thanks!

@JohnTortugo
Copy link
Author

Hi @GoeLin , I updated the PR description with more details. Please, let me know if anything else is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval Requires approval; will be removed when approval is received backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

4 participants