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

8290280: riscv: Clean up stack and register handling in interpreter #9487

Closed
wants to merge 4 commits into from

Conversation

feilongjiang
Copy link
Member

@feilongjiang feilongjiang commented Jul 14, 2022

As JDK-8288971 described, we have the same issue on riscv backend:

  1. We use x30 to pass the caller's SP to a callee through adapters. x30 is not a callee-saved register in native ABI [1], we choose x19 for this patch.
  2. We frequently recalculate the location where the native SP needs to go. We have a spare slot in the interpreter frame, so we should calculate it once, when the frame is created, and use it.
  3. Relate to 1, we should clearly label all the places where the caller's SP is passed to a callee.

[1]. https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc

Additional tests:

  • hotspot/jdk tier1 on QEMU with Release JDK
  • hotspot tier1 on HiFive Unmatched board with Release JDK
  • hotspot tier1 on QEMU with Fastdebug JDK
  • jtreg full on QEMU with Release JDK

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-8290280: riscv: Clean up stack and register handling in interpreter

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9487

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 14, 2022

👋 Welcome back fjiang! 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 Jul 14, 2022
@openjdk
Copy link

openjdk bot commented Jul 14, 2022

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

  • hotspot

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 hotspot-dev@openjdk.org label Jul 14, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 14, 2022

Webrevs

@theRealAph
Copy link
Contributor

This looks reasonable. Don't forget that JDK-8289698 will be needed when you have support for virtual threads.

@feilongjiang
Copy link
Member Author

This looks reasonable. Don't forget that JDK-8289698 will be needed when you have support for virtual threads.

@theRealAph Thanks for your kind reminder, we will take care of it.

@feilongjiang
Copy link
Member Author

@RealFYang -- Thank you for the comments! Would you please take another look at the new changes?

Copy link
Member

@RealFYang RealFYang left a comment

Choose a reason for hiding this comment

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

Updated changes looks good.

@openjdk
Copy link

openjdk bot commented Jul 18, 2022

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

8290280: riscv: Clean up stack and register handling in interpreter

Reviewed-by: fyang

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

  • 522b657: Merge
  • 15d3329: 8281969: Bad result for the snippet @link tag if substring/regex consists of whitespace
  • c8e0315: 8290250: Shenandoah: disable Loom for iu mode
  • fb27ddc: 8290252: Add TEST.properties to java/nio/channels/FileChannel and move tests out of largeMemory sub-dir
  • 441c33f: 8289003: JavaThread::check_is_terminated() implementation should rely on Thread-SMR
  • 2342684: 8290066: Remove KNL specific handling for new CPU target check in IR annotation
  • 0143cf1: 8290333: Remove os_share_*.hpp
  • 0184f46: 8289919: [test] LoadLibraryUnloadTest.java failed with "Failed to unload native library"
  • cca91f7: 8290327: Remove java/lang/reflect/callerCache/ReflectionCallerCacheTest.java from ProblemList-Xcomp.txt
  • b4e2ce0: 8290366: Remove unused during_conc_mark parameter in HeapRegion::note_self_forwarding_removal_start
  • ... and 13 more: https://git.openjdk.org/jdk/compare/adf40d25a1c53ac4804d013c78558c58edb20b85...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. Possible candidates are the reviewers of this PR (@RealFYang) but any other Committer may sponsor as well.

➡️ 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 added the ready Pull request is ready to be integrated label Jul 18, 2022
@feilongjiang
Copy link
Member Author

@RealFYang Thanks!
/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 18, 2022
@openjdk
Copy link

openjdk bot commented Jul 18, 2022

@feilongjiang
Your change (at version 72c1e4c) is now ready to be sponsored by a Committer.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed ready Pull request is ready to be integrated labels Jul 18, 2022
@RealFYang
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 18, 2022

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

  • 522b657: Merge
  • 15d3329: 8281969: Bad result for the snippet @link tag if substring/regex consists of whitespace
  • c8e0315: 8290250: Shenandoah: disable Loom for iu mode
  • fb27ddc: 8290252: Add TEST.properties to java/nio/channels/FileChannel and move tests out of largeMemory sub-dir
  • 441c33f: 8289003: JavaThread::check_is_terminated() implementation should rely on Thread-SMR
  • 2342684: 8290066: Remove KNL specific handling for new CPU target check in IR annotation
  • 0143cf1: 8290333: Remove os_share_*.hpp
  • 0184f46: 8289919: [test] LoadLibraryUnloadTest.java failed with "Failed to unload native library"
  • cca91f7: 8290327: Remove java/lang/reflect/callerCache/ReflectionCallerCacheTest.java from ProblemList-Xcomp.txt
  • b4e2ce0: 8290366: Remove unused during_conc_mark parameter in HeapRegion::note_self_forwarding_removal_start
  • ... and 13 more: https://git.openjdk.org/jdk/compare/adf40d25a1c53ac4804d013c78558c58edb20b85...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jul 18, 2022

@RealFYang @feilongjiang Pushed as commit 4dd236b.

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

@feilongjiang feilongjiang deleted the clean-up branch July 18, 2022 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
3 participants