Skip to content

8384636: Parallel: Remove redundant PSAdjustTask claim counter initialization loop#31175

Open
albertnetymk wants to merge 1 commit into
openjdk:masterfrom
albertnetymk:pgc-atomic-trivial
Open

8384636: Parallel: Remove redundant PSAdjustTask claim counter initialization loop#31175
albertnetymk wants to merge 1 commit into
openjdk:masterfrom
albertnetymk:pgc-atomic-trivial

Conversation

@albertnetymk
Copy link
Copy Markdown
Member

@albertnetymk albertnetymk commented May 15, 2026

PSAdjustTask currently initializes _claim_counters with a placement-new loop in the constructor body. The array elements are already constructed before the constructor body runs, and this is sufficient because the default constructor of Atomic<uint> initializes the value to zero.

This trivial patch removes the redundant loop and adds an explicit _claim_counters{} member initializer.

The generated release assembly is not byte-identical: the new form uses a vector zero store for the counter array instead of separate scalar stores. The effective initialization is the same.

Test: tier1



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8384636: Parallel: Remove redundant PSAdjustTask claim counter initialization loop (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31175

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 15, 2026

👋 Welcome back ayang! 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
Copy Markdown

openjdk Bot commented May 15, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot changed the title 8384636 8384636: Parallel: Remove redundant PSAdjustTask claim counter initialization loop May 15, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 15, 2026

@albertnetymk 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
Copy link
Copy Markdown

openjdk Bot commented May 15, 2026

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot-gc. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label May 15, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 15, 2026

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-gc [email protected] rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants