Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

8278389: SuspendibleThreadSet::_suspend_all should be volatile/atomic #10

Conversation

tschatzl
Copy link

@tschatzl tschatzl commented Dec 10, 2021

Hi all,

can I have reviews for this change that makes SuspendibleThreadSet::_suspend_all volatile and all accesses to it use Atomic helpers?

I found that the only getter for that member is called SuspendibleThreadSet::should_yield(), which contradicts our naming rules; to keep the change minimal (and the naming discussion out of this PR because I do not feel that _suspend_all is particularly good) I introduced a private suspend_all() method.
I can of course add some renaming in this change (but then for jdk19+ only).

Testing: gha, local compilation

Thanks,
Thomas


Progress

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

Issue

  • JDK-8278389: SuspendibleThreadSet::_suspend_all should be volatile/atomic

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 10, 2021

👋 Welcome back tschatzl! 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 Dec 10, 2021
@openjdk
Copy link

openjdk bot commented Dec 10, 2021

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

  • hotspot-gc

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-gc hotspot-gc-dev@openjdk.java.net label Dec 10, 2021
@mlbridge
Copy link

mlbridge bot commented Dec 10, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Dec 14, 2021

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

8278389: SuspendibleThreadSet::_suspend_all should be volatile/atomic

Reviewed-by: ayang, mli

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

  • e82310f: 8278575: update jcmd GC.finalizer_info to list finalization status
  • d3408a4: 8277964: ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation
  • 69b5d49: 8272064: test/jdk/jdk/jfr/api/consumer/TestHiddenMethod.java needs update for JEP 416
  • d6b5544: 8278607: Misc issues in foreign API javadoc
  • 918e339: 8278233: [macos] tools/jpackage tests timeout due to /usr/bin/osascript
  • f48a3e8: 8278758: runtime/BootstrapMethod/BSMCalledTwice.java fails with release VMs after JDK-8262134
  • 0cc989b: 8278744: KeyStore:getAttributes() not returning unmodifiable Set
  • 475ec8e: 8277919: OldObjectSample event causing bloat in the class constant pool in JFR recording
  • 32139c1: 8262134: compiler/uncommontrap/TestDeoptOOM.java failed with "guarantee(false) failed: wrong number of expression stack elements during deopt"
  • c93b24d: 8132785: java/lang/management/ThreadMXBean/ThreadLists.java fails intermittently
  • ... and 4 more: https://git.openjdk.java.net/jdk18/compare/3df8dc494d2d0e6d1003094c9e129be2cca10a3c...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.

➡️ 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 Dec 14, 2021
@tschatzl
Copy link
Author

Thanks @albertnetymk @Hamlin-Li for your reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Dec 16, 2021

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

  • e82310f: 8278575: update jcmd GC.finalizer_info to list finalization status
  • d3408a4: 8277964: ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation
  • 69b5d49: 8272064: test/jdk/jdk/jfr/api/consumer/TestHiddenMethod.java needs update for JEP 416
  • d6b5544: 8278607: Misc issues in foreign API javadoc
  • 918e339: 8278233: [macos] tools/jpackage tests timeout due to /usr/bin/osascript
  • f48a3e8: 8278758: runtime/BootstrapMethod/BSMCalledTwice.java fails with release VMs after JDK-8262134
  • 0cc989b: 8278744: KeyStore:getAttributes() not returning unmodifiable Set
  • 475ec8e: 8277919: OldObjectSample event causing bloat in the class constant pool in JFR recording
  • 32139c1: 8262134: compiler/uncommontrap/TestDeoptOOM.java failed with "guarantee(false) failed: wrong number of expression stack elements during deopt"
  • c93b24d: 8132785: java/lang/management/ThreadMXBean/ThreadLists.java fails intermittently
  • ... and 4 more: https://git.openjdk.java.net/jdk18/compare/3df8dc494d2d0e6d1003094c9e129be2cca10a3c...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 16, 2021

@tschatzl Pushed as commit aec1b03.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotspot-gc hotspot-gc-dev@openjdk.java.net integrated Pull request has been integrated
3 participants