Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8294676: [JVMCI] InstalledCode.deoptimize(false) should not touch address field #10514

Closed
wants to merge 1 commit into from

Conversation

dougxc
Copy link
Member

@dougxc dougxc commented Sep 30, 2022

The ability to make an nmethod non-entrant via an InstalledCode object was added by JDK-8292917. However, the make non-entrant path clears InstalledCode.address.
This breaks the connection between an InstalledCode object and the nmethod. This makes it impossible to subsequently deoptimize the code via the InstalledCode object as shown below:

InstalledCode tier1Code = ...;
// Make tier1Code non-entrant (e.g. it is being replaced by a more optimized version, tier2Code)
// but do not deoptimize it as it is still valid. Let current executions of tier1Code complete.
tier1Code.invalidate(false);

...

// Some assumption used in compiling tier1Code is about to be invalidated
// so it must now be deoptimized.
tier1Code.invalidate(true)

Prior to this PR, the last statement above does nothing which leads to tier1Code incorrectly being executed as soon as the assumption in question is invalidated.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8294676: [JVMCI] InstalledCode.deoptimize(false) should not touch address field

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10514

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10514.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 30, 2022

👋 Welcome back dnsimon! 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 openjdk bot added the rfr Pull request is ready for review label Sep 30, 2022
@openjdk
Copy link

openjdk bot commented Sep 30, 2022

@dougxc The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Sep 30, 2022
@dougxc
Copy link
Member Author

dougxc commented Sep 30, 2022

This PR revives InvalidateInstalledCodeTest.java (JDK-8249621, JDK-8163894) so that it can be used to test the changes.

@mlbridge
Copy link

mlbridge bot commented Sep 30, 2022

Webrevs

Copy link
Contributor

@tkrodriguez tkrodriguez left a comment

Choose a reason for hiding this comment

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

The new test looks good.

@openjdk
Copy link

openjdk bot commented Sep 30, 2022

@dougxc 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:

8294676: [JVMCI] InstalledCode.deoptimize(false) should not touch address field

Reviewed-by: never

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 4 new commits pushed to the master branch:

  • b8f9a91: 8293940: Some tests for virtual threads take too long
  • 1d26c4b: 8291022: JFR: Reduce logging in ChunkHeader constructor
  • 3efbd5f: 8294626: Improve URL protocol lower casing
  • 052a924: 8294293: Remove unused _width and _newlines field in outputStream

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 30, 2022
@dougxc
Copy link
Member Author

dougxc commented Oct 1, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Oct 1, 2022

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 1, 2022

@dougxc Pushed as commit b8b9b97.

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

@dougxc dougxc deleted the JDK-8294676 branch May 23, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
2 participants