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

8263375: Support stack watermarks in Zero VM #4728

Closed

Conversation

@shipilev
Copy link
Contributor

@shipilev shipilev commented Jul 8, 2021

Zero VM supports most of GCs. Since JDK 16, Shenandoah uses stack watermarks, so Zero has to support those if Shenandoah+Zero support is to remain. This PR adds the stack watermark support in Zero VM. This should also be useful as other projects, notably Loom, mature and depend on stack watermarks.

Zero already calls into Hotspot safepoint machinery to do things, and it seems only the hooks for on_iteration and on_unwind are missing. AFAICS, Zero only has on-return safepoints, renamed it to be more precise.

@fisk, do you see any obvious problems with this patch?

Additional testing:

  • Linux x86_64 Zero hotspot_gc_shenandoah now passes

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4728/head:pull/4728
$ git checkout pull/4728

Update a local copy of the PR:
$ git checkout pull/4728
$ git pull https://git.openjdk.java.net/jdk pull/4728/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4728

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4728.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 8, 2021

👋 Welcome back shade! 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.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Jul 8, 2021

@shipilev 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.

Loading

@openjdk openjdk bot added the hotspot label Jul 8, 2021
@shipilev shipilev marked this pull request as ready for review Jul 8, 2021
@openjdk openjdk bot added the rfr label Jul 8, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jul 8, 2021

Webrevs

Loading

Copy link
Contributor

@fisk fisk left a comment

Looks good in general, would just like slightly more precise hooks as explained in a comment above. It will probably work without that though.

Loading

src/hotspot/cpu/zero/zeroInterpreter_zero.cpp Outdated Show resolved Hide resolved
Loading
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 9, 2021

@shipilev This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Loading

fisk
fisk approved these changes Sep 1, 2021
Copy link
Contributor

@fisk fisk left a comment

Looks good.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Sep 1, 2021

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

8263375: Support stack watermarks in Zero VM

Reviewed-by: eosterlund

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

  • 02822e1: 8272377: assert preconditions that are ensured when created in add_final_edges
  • a58cf16: 8272563: assert(is_double_stack() && !is_virtual()) failed: type check
  • 0e14bf7: 8273176: handle latest VS2019 in abstract_vm_version

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.

Loading

@openjdk openjdk bot added the ready label Sep 1, 2021
@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Sep 1, 2021

Thanks, @fisk! I suppose there are no other interested parties for this kind of patch, so I'll integrate this soon.

Loading

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Sep 2, 2021

/integrate

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Sep 2, 2021

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

  • 6cfe314: 8272970: Parallelize runtime/InvocationTests/
  • a9a83b2: 8273256: runtime/cds/appcds/TestEpsilonGCWithCDS.java fails due to Unrecognized VM option 'ObjectAlignmentInBytes=64' on x86_32
  • 1a5a2b6: 8271745: Correct block size for KW,KWP mode and use fixed IV for KWP mode for SunJCE
  • 2f01a6f: 8273157: Add convenience methods to Messager
  • 9689f61: 8272788: Nonleaf ranked locks should not be safepoint_check_never
  • 4ee0dac: 8273248: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh on all configs
  • 655ea6d: 8270489: Support archived heap objects in EpsilonGC
  • dacd197: 8273217: Make ParHeapInspectTask _safepoint_check_never
  • 02822e1: 8272377: assert preconditions that are ensured when created in add_final_edges
  • a58cf16: 8272563: assert(is_double_stack() && !is_virtual()) failed: type check
  • ... and 1 more: https://git.openjdk.java.net/jdk/compare/f1c5e26e48ca2db0fc2b7ad2cf1bda4853bdeea9...master

Your commit was automatically rebased without conflicts.

Loading

@openjdk openjdk bot closed this Sep 2, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Sep 2, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 2, 2021

@shipilev Pushed as commit 857a930.

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

Loading

@shipilev shipilev deleted the JDK-8263375-zero-stack-watermarks branch Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants