Skip to content

Conversation

@AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented Nov 25, 2022

Two (since 19) usages of Unsafe.getAndAddInt to update a static field provide the Class object as the base instead of the base object returned by Unsafe.staticFieldBase. This doesn't change anything on the HotSpot VM.


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-8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11369

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 25, 2022

👋 Welcome back alanb! 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
Copy link

openjdk bot commented Nov 25, 2022

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Nov 25, 2022
@AlanBateman AlanBateman marked this pull request as ready for review November 29, 2022 16:04
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 29, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 29, 2022

Webrevs

Copy link
Member

@lewurm lewurm left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

private static final long PARALLELISM;
private static final long THREADIDS;
private static final Object POOLIDS_BASE;
private static final long POOLIDS;
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit: Maybe POOLIDS should be renamed to POOLIDS_OFFSET?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ForkJoinPool has several fields for field offsets so renaming one would be inconsistent and we'd end up renaming all of them. We also don't want to get too much out of sync with the "master" in Doug Lea's CVS.

Copy link
Member

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk
Copy link

openjdk bot commented Nov 29, 2022

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

8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

Reviewed-by: burban, chegar, martin

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

  • 9ced2ea: 8297311: Improve exception message thrown by java.net.HostPortrange::toLowerCase(String s)
  • defe060: 8296905: Replace the native LCMS#getProfileID() method with the accessor
  • e10778a: 8297695: Fix typos in test/langtools files
  • 0ce1827: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni
  • e2d71c0: 8297481: Create a regression test for JDK-4424517
  • f4063a3: 8297210: Add a @sealedGraph tag to selected java.desktop classes
  • 2084451: 8078471: Backspace does not work in JFileChooser with GTK L&F
  • 7af6b4b: 8296012: jshell crashes on mismatched record pattern
  • ae5b1f7: 8297685: Typo in NullPointerException description specified by Locale.lookup
  • 3ce0042: 8297780: Problem list java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java
  • ... and 44 more: https://git.openjdk.org/jdk/compare/fd910f77bcd205110688b2f17f26f76ce3de88d5...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 Nov 29, 2022
Copy link
Member

@Martin-Buchholz Martin-Buchholz left a comment

Choose a reason for hiding this comment

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

The introduction of POOLIDS_BASE strengthens the case for renaming POOLIDS to POOLIDS_OFFSET for clarity - I would do that.

@AlanBateman
Copy link
Contributor Author

The introduction of POOLIDS_BASE strengthens the case for renaming POOLIDS to POOLIDS_OFFSET for clarity - I would do that.

I checked with Doug and he suggests we leave it as is.

@AlanBateman
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 1, 2022

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

  • eea1a8a: 8297427: Avoid keeping class loaders alive when executing ClassLoaderStatsVMOperation
  • 7941147: 8297503: Merge FilteringDCTOC into ContiguousSpaceDCTOC
  • 9f24a6f: 8297389: resexhausted003 fails with assert(!thread->owns_locks()) failed: must release all locks when leaving VM
  • fa0c599: 8297750: Unnecessary Vector usage in IIORegistry
  • 34fcd83: 8297821: jdk/jshell/Test8294583.java fails on some platforms
  • ce048e7: 8295006: Colored text is not shown on disabled checkbox and radio button with GTK LAF for bug4314194.
  • 756dd5b: 8294942: Compiler implementation for Record Patterns (Second Preview)
  • c612512: 8296660: Swing HTML table with omitted closing tags misparsed
  • 56048f9: 8297852: Backout 8252584 for the time being
  • f49acd5: 8297697: RISC-V: Add support for SATP mode detection
  • ... and 83 more: https://git.openjdk.org/jdk/compare/fd910f77bcd205110688b2f17f26f76ce3de88d5...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 1, 2022

@AlanBateman Pushed as commit cd77609.

💡 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

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants