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

8300197: Freeze/thaw an interpreter frame using a single copy_to_chunk() call #13477

Conversation

fbredber
Copy link
Contributor

@fbredber fbredber commented Apr 14, 2023

On certain architectures (like AARCH64) padding may be inserted between the locals and the rest of the stack frame in order to keep the frame pointer 16-byte-aligned.

This padding is currently not freezed, instead freezing of a single interpreter stack frame is done using two separate copy_to_chunk() calls (see recurse_freeze_interpreted_frame). Likewise, thawing is done using two separate copy_from_chunk() calls.

This poses a bit of a problem when trying to relativize stack addresses in interpreter frames (JDK-8289296). Since relative offsets may need to be changed during freezing and thawing.

By both freezing and thawing the padding we remove the need to change any relative offsets in runtime.

Tested tier1-tier8 on supported platforms, found no new issues. PowerPC and RISC-V was sanity tested using Qemu.


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-8300197: Freeze/thaw an interpreter frame using a single copy_to_chunk() call

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13477

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

Using diff file

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

Webrev

Link to Webrev Comment

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 14, 2023

👋 Welcome back fbredber! 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 Apr 14, 2023
@openjdk
Copy link

openjdk bot commented Apr 14, 2023

@fbredber 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 Apr 14, 2023
@mlbridge
Copy link

mlbridge bot commented Apr 14, 2023

Webrevs

Copy link
Member

@reinrich reinrich left a comment

Choose a reason for hiding this comment

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

I've tested jdk_loom on ppc64le successfully.
Thanks, Richard.

Copy link
Contributor

@pchilano pchilano left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@robehn
Copy link
Contributor

robehn commented Apr 18, 2023

Thanks for this @fbredber !

Copy link
Member

@reinrich reinrich left a comment

Choose a reason for hiding this comment

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

I'll do another round of testing.
Thanks, Richard.

@reinrich
Copy link
Member

I'll do another round of testing. Thanks, Richard.

Tests are clean.

@RealFYang
Copy link
Member

FYI: I also performed tier1-3 tests on linux-riscv64 unmatched boards, result looks good.

Copy link
Contributor

@pchilano pchilano left a comment

Choose a reason for hiding this comment

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

Thanks @fbredber!

@openjdk
Copy link

openjdk bot commented Apr 26, 2023

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

8300197: Freeze/thaw an interpreter frame using a single copy_to_chunk() call

Reviewed-by: rrich, pchilanomate, 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 81 new commits pushed to the master branch:

  • 86f97fe: 8305919: java/lang/Thread/virtual/HoldsLock.java#id0 failed, ThreadInfo.getLockInfo() return null
  • 2179a8f: 8298087: XML Schema Validation reports an required attribute twice via ErrorHandler
  • 1227a27: 8306028: separate ThreadStart/ThreadEnd events posting code in JVMTI VTMS transitions
  • 35e75c1: 8301455: comments in TestTypeAnnotations still refer to resolved JDK-8068737
  • 561ec9c: 8300818: Reduce complexity of padding with DateTimeFormatter
  • ae5f678: 8282384: [LOOM] Need test for ThreadReference.interrupt() on a vthread
  • c7e1df8: 8304760: Add 2 Microsoft TLS roots
  • 6acf032: 8306678: Replace use of os.version with an internal Version record
  • f00a748: 8304915: Create jdk.internal.util.Architecture enum and apply
  • 7d07d19: 8305201: Improve error message for GroupLayouts that are too large on SysV
  • ... and 71 more: https://git.openjdk.org/jdk/compare/35e7bc21d3c1b38e2268924b20ae4b149b4f8cd8...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 (@reinrich, @pchilano, @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 Apr 26, 2023
Copy link
Member

@reinrich reinrich left a comment

Choose a reason for hiding this comment

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

Looks good.
Thanks, Richard.

@fbredber
Copy link
Contributor Author

Will you provide any additional feedback @theRealAph and @RealFYang?

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.

Looks good to me. Thanks.

@fbredber
Copy link
Contributor Author

fbredber commented May 2, 2023

Thanks for the review guys. Can any of you give me a helping hand (sponsor) the integration.

@fbredber
Copy link
Contributor Author

fbredber commented May 2, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label May 2, 2023
@openjdk
Copy link

openjdk bot commented May 2, 2023

@fbredber
Your change (at version 8de6a1f) is now ready to be sponsored by a Committer.

@reinrich
Copy link
Member

reinrich commented May 2, 2023

/sponsor

Thanks, Richard.

@openjdk
Copy link

openjdk bot commented May 2, 2023

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

  • 1532a1b: 8307164: TestSegmentCopy times out (mainline)
  • 860bf9b: 8307104: [AIX] VM crashes with UseRTMLocking on Power10
  • 86f97fe: 8305919: java/lang/Thread/virtual/HoldsLock.java#id0 failed, ThreadInfo.getLockInfo() return null
  • 2179a8f: 8298087: XML Schema Validation reports an required attribute twice via ErrorHandler
  • 1227a27: 8306028: separate ThreadStart/ThreadEnd events posting code in JVMTI VTMS transitions
  • 35e75c1: 8301455: comments in TestTypeAnnotations still refer to resolved JDK-8068737
  • 561ec9c: 8300818: Reduce complexity of padding with DateTimeFormatter
  • ae5f678: 8282384: [LOOM] Need test for ThreadReference.interrupt() on a vthread
  • c7e1df8: 8304760: Add 2 Microsoft TLS roots
  • 6acf032: 8306678: Replace use of os.version with an internal Version record
  • ... and 73 more: https://git.openjdk.org/jdk/compare/35e7bc21d3c1b38e2268924b20ae4b149b4f8cd8...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 2, 2023
@openjdk openjdk bot closed this May 2, 2023
@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 May 2, 2023
@openjdk
Copy link

openjdk bot commented May 2, 2023

@reinrich @fbredber Pushed as commit a8d16de.

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

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
Development

Successfully merging this pull request may close these issues.

None yet

6 participants