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

8329134: Reconsider TLAB zapping #18500

Closed
wants to merge 5 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Mar 26, 2024

We zap the entire TLAB on initial allocation (MemAllocator::mem_allocate_inside_tlab_slow), and then also rezap the object contents when object is allocated from the TLAB (ThreadLocalAllocBuffer::allocate). The second part seems excessive, given the TLAB is already fully zapped.

There is also no way to disable this zapping, like you would in other places with the relevant Zap* flags.

Fixing both these issues allows to improve fastdebug tests performance, e.g. in jcstress.

It also allows to remove the related Zero kludge.

Additional testing:

  • Linux AArch64 server fastdebug, all tests
  • MacOS AArch64 Zero fastdebug, bootcycle-images pass

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-8329134: Reconsider TLAB zapping (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18500

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 26, 2024

👋 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.

@openjdk
Copy link

openjdk bot commented Mar 26, 2024

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

8329134: Reconsider TLAB zapping

Reviewed-by: stefank, rkennke

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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
Copy link

openjdk bot commented Mar 26, 2024

@shipilev The following labels will be automatically applied to this pull request:

  • hotspot
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added hotspot hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Mar 26, 2024
@shipilev shipilev marked this pull request as ready for review March 27, 2024 11:38
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 27, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 27, 2024

Webrevs

Copy link
Member

@stefank stefank left a comment

Choose a reason for hiding this comment

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

This looks like a worth-while change. I listed a couple of nits that I think would be nice to clean up.

src/hotspot/share/gc/shared/memAllocator.cpp Outdated Show resolved Hide resolved
src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Outdated Show resolved Hide resolved
src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp Outdated Show resolved Hide resolved
Copy link
Member

@stefank stefank left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 27, 2024
@shipilev
Copy link
Member Author

Thanks! I would wait for more reviews now.

Copy link
Contributor

@rkennke rkennke 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. Thank you!

@shipilev
Copy link
Member Author

shipilev commented Apr 1, 2024

Thanks!

/integrate

@openjdk
Copy link

openjdk bot commented Apr 1, 2024

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

  • 4a14cba: 8329213: Better validation for com.sun.security.ocsp.useget option
  • 9f5464e: 8329353: ResolvedReferencesNotNullTest.java failed with Incorrect resolved references array, quxString should not be archived
  • 3f5b75a: 8328541: Remove or update obsolete comment in JRootPane

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 1, 2024

@shipilev Pushed as commit 5698f7a.

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

@pengxiaolong
Copy link

/backport jdk22u

@openjdk
Copy link

openjdk bot commented May 31, 2024

@pengxiaolong To use the /backport command, you need to be in the OpenJDK census and your GitHub account needs to be linked with your OpenJDK username (how to associate your GitHub account with your OpenJDK username).

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 shenandoah shenandoah-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

4 participants