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

8296477: Foreign linker implementation update following JEP 434 #11019

Closed
wants to merge 99 commits into from

Conversation

JornVernee
Copy link
Member

@JornVernee JornVernee commented Nov 7, 2022

Pull in linker implementation changes, that include non-trivial changes to VM code, from the panama-foreign repo into the main JDK.

This is split off from the main JEP integration to make reviewing easier.

This includes the following patches:

  1. 8291913: Remove the TraceOptimizedUpcallStubs flag panama-foreign#698
  2. 8275644: Replace VMReg in shuffling code with something more fine grained. panama-foreign#699
  3. (part of) Convert classes into records panama-foreign#731
  4. 8295265: Refactor handling of special values passed to stubs panama-foreign#740
  5. 8275584: Incorrect stack spilling in CallArranger on MacOS/AArch64  panama-foreign#746
  6. 8294970: Add linker option for saving thread-locals that the VM can overwrite panama-foreign#742
  7. 8295353: Mark Register v24 as Volatile in Foreign Function & Memory C ABI Definition panama-foreign#743

Probably the biggest change to the code comes from replacing VMReg - which can not represent offsets into the stack that are not a multiple of the VM's stack slot size (32-bits) - with the new VMStorage class, which can describe byte offsets into the stack, as well as having a register mask to indicate only certain register segments.

The only part of 3. that is in this PR is the part that turns the VMStorage class in Java into a record.

Please refer to the PR of each individual patch for a more detailed description.


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
  • Change requires a CSR request to be approved

Issues

  • JDK-8296477: Foreign linker implementation update following JEP 434
  • JDK-8296952: Foreign linker implementation update following JEP 434 (CSR)

Reviewers

Contributors

  • Jorn Vernee <jvernee@openjdk.org>
  • Nick Gasson <ngasson@openjdk.org>
  • Per Minborg <pminborg@openjdk.org>

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11019

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 7, 2022

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

@JornVernee
Copy link
Member Author

/contributor add @JornVernee
/contributor add @nick-arm
/contributor add @swesonga

@openjdk
Copy link

openjdk bot commented Nov 7, 2022

@JornVernee
Contributor Jorn Vernee <jvernee@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 7, 2022

@JornVernee
Contributor Nick Gasson <ngasson@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 7, 2022

@JornVernee @swesonga was not found in the census.

Syntax: /contributor (add|remove) [@user | openjdk-user | Full Name <email@address>]. For example:

  • /contributor add @openjdk-bot
  • /contributor add duke
  • /contributor add J. Duke <duke@openjdk.org>

User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address.

@openjdk
Copy link

openjdk bot commented Nov 7, 2022

@JornVernee The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot

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

@openjdk openjdk bot added hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Nov 7, 2022
mcimadamore and others added 9 commits November 30, 2022 12:24
* Make sure that first para of class javadoc is succinct and descriptive
* Remove references to "access" var handle or "memory segment view" var handle (just use var handle)
* Minor tweak to layout classes javadoc - use `@see` in value layouts instead of a dedicated para.
* Other minor typos fixes
@JornVernee
Copy link
Member Author

/contributor add @minborg

@openjdk
Copy link

openjdk bot commented Dec 5, 2022

@JornVernee
Contributor Per Minborg <pminborg@openjdk.org> successfully added.

@openjdk-notifier openjdk-notifier bot changed the base branch from pr/10872 to master December 5, 2022 13:58
@openjdk-notifier
Copy link

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout VM_Changes
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Dec 5, 2022

@JornVernee this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout VM_Changes
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Dec 5, 2022

⚠️ @JornVernee This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Dec 5, 2022
@openjdk
Copy link

openjdk bot commented Dec 5, 2022

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

8296477: Foreign linker implementation update following JEP 434

Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Nick Gasson <ngasson@openjdk.org>
Co-authored-by: Per Minborg <pminborg@openjdk.org>
Reviewed-by: rehn, mcimadamore, vlivanov

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Dec 5, 2022
@JornVernee
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 5, 2022

Going to push as commit 0452c39.

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

openjdk bot commented Dec 5, 2022

@JornVernee Pushed as commit 0452c39.

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

@JornVernee JornVernee deleted the VM_Changes branch December 5, 2022 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
8 participants