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

8326106: Write and clear stack trace table outside of safepoint #17905

Closed
wants to merge 2 commits into from

Conversation

mgronlun
Copy link

@mgronlun mgronlun commented Feb 18, 2024

Greetings,

When the chunk rotates, serializing the stack trace table happens in two passes:

  1. The pre-safepoint writes as much as possible but does not delete nodes.
  2. The safepoint writes new entries incrementally in addition to deleting nodes and resetting buckets.

Since a global lock protects the stack trace table, hoisting the deletes and clearing the table outside safepoints makes sense. Doing so will minimize the stack trace table work needed during the safepoint. The tradeoff is that an identical stack trace can be written twice. However, this is low risk because the pre-safepoint and the safepoint operations happen back to back (i.e. there is only a tiny window for inserting a new stack trace).

Testing: jdk_jfr, stress testing

Thanks
Markus


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-8326106: Write and clear stack trace table outside of safepoint (Enhancement - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17905

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 18, 2024

👋 Welcome back mgronlun! 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 Feb 18, 2024
@openjdk
Copy link

openjdk bot commented Feb 18, 2024

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

  • hotspot-jfr

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-jfr hotspot-jfr-dev@openjdk.org label Feb 18, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 18, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Feb 19, 2024

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

8326106: Write and clear stack trace table outside of safepoint

Reviewed-by: egahlin

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

  • b366492: 8326152: Bad copyright header in test/jdk/java/util/zip/DeflaterDictionaryTests.java
  • 9451677: 8326100: DeflaterDictionaryTests should use Deflater.getBytesWritten instead of Deflater.getTotalOut
  • d422811: 8324630: C1: Canonicalizer::do_LookupSwitch doesn't break the loop when the successor is found
  • 3742bc6: 8323795: jcmd Compiler.codecache should print total size of code cache
  • 099b744: 8326117: ProblemList serviceability/jvmti/vthread/SuspendWithInterruptLock/SuspendWithInterruptLock.java#default in Xcomp mode
  • 39627bc: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize()
  • 7004c27: 8303972: (zipfs) Make test/jdk/jdk/nio/zipfs/TestLocOffsetFromZip64EF.java independent of the zip command line
  • c2d9fa2: 8326000: Remove obsolete comments for class sun.security.ssl.SunJSSE
  • f50df10: 8299023: TestPLABResize.java and TestPLABPromotion.java are failing intermittently
  • cf13086: 8317697: refactor-encapsulate x86 VM_Version::CpuidInfo

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.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 19, 2024
@mgronlun
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Feb 19, 2024

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

  • 56c5084: 8307246: Printing: banded raster path doesn't account for device offset values
  • aeb6d8c: 8326170: Parallel: Remove unused enum CollectionType in ParallelScavengeHeap
  • dc17c26: 8325116: Amend jdk.ContainerConfiguration by swap related value
  • b366492: 8326152: Bad copyright header in test/jdk/java/util/zip/DeflaterDictionaryTests.java
  • 9451677: 8326100: DeflaterDictionaryTests should use Deflater.getBytesWritten instead of Deflater.getTotalOut
  • d422811: 8324630: C1: Canonicalizer::do_LookupSwitch doesn't break the loop when the successor is found
  • 3742bc6: 8323795: jcmd Compiler.codecache should print total size of code cache
  • 099b744: 8326117: ProblemList serviceability/jvmti/vthread/SuspendWithInterruptLock/SuspendWithInterruptLock.java#default in Xcomp mode
  • 39627bc: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize()
  • 7004c27: 8303972: (zipfs) Make test/jdk/jdk/nio/zipfs/TestLocOffsetFromZip64EF.java independent of the zip command line
  • ... and 3 more: https://git.openjdk.org/jdk/compare/3b76372254aa638f5dcae1d54b963cd43bca7102...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 19, 2024

@mgronlun Pushed as commit a776104.

💡 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
hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants