Skip to content

8261501: Shenandoah: reconsider heap statistics memory ordering #2504

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

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Feb 10, 2021

ShenandoahHeap collects heap-wide statistics (used, committed, etc). It does so by atomically updating them with default CASes. Unfortunately, Hotspot's default for atomic operations is memory_order_conservative, which emits two-way memory fences around the CASes at least on AArch64 and PPC64.

This is excessive for statistics gathering, and "relaxed" should be just as good.

Additional testing:

  • Linux x86_64 hotspot_gc_shenandoah
  • Linux AArch64 hotspot_gc_shenandoah
  • Linux AArch64 tier1 with Shenandoah

Progress

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

Issue

  • JDK-8261501: Shenandoah: reconsider heap statistics memory ordering

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2504/head:pull/2504
$ git checkout pull/2504

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 10, 2021

👋 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 Feb 10, 2021

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

  • hotspot-gc
  • 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-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Feb 10, 2021
@shipilev shipilev marked this pull request as ready for review February 10, 2021 16:11
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 10, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 10, 2021

Webrevs

@shipilev
Copy link
Member Author

Friendly reminder.

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! Thanks!

@openjdk
Copy link

openjdk bot commented Feb 16, 2021

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

8261501: Shenandoah: reconsider heap statistics memory ordering

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

  • 3cbd16d: 8259668: Make SubTasksDone use-once
  • 219b115: 8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage
  • cdc874d: 8261601: free memory in early return in Java_sun_nio_ch_sctp_SctpChannelImpl_receive0
  • e2d52ae: 8261413: Shenandoah: Disable class-unloading in I-U mode
  • 34ae7ae: 8261609: remove remnants of XML-driven builders
  • 6badd22: 8261351: Create implementation for NSAccessibilityRadioButton protocol
  • 849f4c0: 8260291: The case instruction is not visible in dark mode
  • 2e610f5: 8260687: Inherited font size is smaller than expected when using StyleSheet to add styles
  • 3882fda: 8260414: Remove unused set_single_threaded_mode() method in task executor
  • c6eedda: 8261500: Shenandoah: reconsider region live data memory ordering
  • ... and 80 more: https://git.openjdk.java.net/jdk/compare/5183d8ae1eec86202eace2c4770f81edbc73cb68...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 Feb 16, 2021
@shipilev
Copy link
Member Author

/integrate

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

openjdk bot commented Feb 16, 2021

@shipilev Since your change was applied there have been 90 commits pushed to the master branch:

  • 3cbd16d: 8259668: Make SubTasksDone use-once
  • 219b115: 8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage
  • cdc874d: 8261601: free memory in early return in Java_sun_nio_ch_sctp_SctpChannelImpl_receive0
  • e2d52ae: 8261413: Shenandoah: Disable class-unloading in I-U mode
  • 34ae7ae: 8261609: remove remnants of XML-driven builders
  • 6badd22: 8261351: Create implementation for NSAccessibilityRadioButton protocol
  • 849f4c0: 8260291: The case instruction is not visible in dark mode
  • 2e610f5: 8260687: Inherited font size is smaller than expected when using StyleSheet to add styles
  • 3882fda: 8260414: Remove unused set_single_threaded_mode() method in task executor
  • c6eedda: 8261500: Shenandoah: reconsider region live data memory ordering
  • ... and 80 more: https://git.openjdk.java.net/jdk/compare/5183d8ae1eec86202eace2c4770f81edbc73cb68...master

Your commit was automatically rebased without conflicts.

Pushed as commit 3f8819c.

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

@shipilev shipilev deleted the JDK-8261501-shenandoah-heapstats-memord branch February 16, 2021 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

2 participants