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

8257151: ZGC: Simplify ZVerify #1449

Closed
wants to merge 1 commit into from

Conversation

stefank
Copy link
Member

@stefank stefank commented Nov 26, 2020

ZVerify has a few oddities:

  1. The comment and the parameter name don't match.
void ZVerify::before_zoperation() {
  // Verify strong roots
  ZStatTimerDisable disable;
  roots(false /* verify_strong */, false /* verify_weaks */);
}

This is caused by a name clash between the layers:


roots_strong(bool verify_fixed
roots(bool verify_strong
roots_and_objects(bool verify_strong
  1. Both usages of roots_and_objects pass true as the verify_strong argument:
void ZVerify::after_mark() {
  // Verify all strong roots and strong references
  ZStatTimerDisable disable;
  roots_and_objects(true /* verify_strong */, false /* verify_weaks */);
}

void ZVerify::after_weak_processing() {
  // Verify all roots and all references
  ZStatTimerDisable disable;
  roots_and_objects(true /* verify_strong */, true /* verify_weaks */);
}

The proposal is to remove the middle layers and be more explicit at the call sites.


Progress

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

Testing

Linux x64 Linux x86 Windows x64 macOS x64
Build ⏳ (2/2 running) ⏳ (2/2 running) ⏳ (2/2 running) ⏳ (2/2 running)

Issue

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 26, 2020

👋 Welcome back stefank! 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 Nov 26, 2020
@openjdk
Copy link

openjdk bot commented Nov 26, 2020

@stefank 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 openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Nov 26, 2020
@mlbridge
Copy link

mlbridge bot commented Nov 26, 2020

Webrevs

Copy link
Contributor

@pliden pliden 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.

@openjdk
Copy link

openjdk bot commented Nov 26, 2020

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

8257151: ZGC: Simplify ZVerify

Reviewed-by: pliden, eosterlund

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

  • bf66d73: 8257073: ZGC: Try forward object before retaining page
  • 1b3aa3a: 8256831: MIPS Zero builds fail with undefined __atomic_compare_exchange_8
  • 734d3c3: 8256862: Several java/foreign tests fail on x86_32 platforms
  • 7946c94: 8257082: ZGC: Clean up ZRuntimeWorkers and ZWorkers
  • f6d6a07: 8256938: Improve remembered set sampling task scheduling

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 Nov 26, 2020
Copy link
Contributor

@fisk fisk 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.

@stefank
Copy link
Member Author

stefank commented Nov 26, 2020

Thanks for reviewing!
/integrate

@openjdk openjdk bot closed this Nov 26, 2020
@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 Nov 26, 2020
@openjdk
Copy link

openjdk bot commented Nov 26, 2020

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

  • bf66d73: 8257073: ZGC: Try forward object before retaining page
  • 1b3aa3a: 8256831: MIPS Zero builds fail with undefined __atomic_compare_exchange_8
  • 734d3c3: 8256862: Several java/foreign tests fail on x86_32 platforms
  • 7946c94: 8257082: ZGC: Clean up ZRuntimeWorkers and ZWorkers
  • f6d6a07: 8256938: Improve remembered set sampling task scheduling

Your commit was automatically rebased without conflicts.

Pushed as commit 0a5de50.

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

@stefank stefank deleted the 8257151_simplify_zverify branch May 20, 2021 11:10
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
Development

Successfully merging this pull request may close these issues.

3 participants