Skip to content

8253434: Shenandoah: Cleanup ShenandoahRootScanner #286

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

Closed
wants to merge 4 commits into from

Conversation

zhengyu123
Copy link
Contributor

@zhengyu123 zhengyu123 commented Sep 21, 2020

After moving CLDG mark to concurrent phase, ShenandoahRootScanner::strong_roots_do() and ShenandoahRootScanner::roots_do() are practical the same, let's trim one.

Test:
hotspot_gc_shenandoah


Progress

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

Issue

  • JDK-8253434: Shenandoah: Cleanup ShenandoahRootScanner

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 21, 2020

👋 Welcome back zgu! 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 Sep 21, 2020
@openjdk
Copy link

openjdk bot commented Sep 21, 2020

@zhengyu123 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 (add|remove) "label" command.

@openjdk openjdk bot added hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Sep 21, 2020
@mlbridge
Copy link

mlbridge bot commented Sep 21, 2020

Webrevs

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.

It looks to me you can also trim out the CLD closures altogether.

@@ -189,36 +189,13 @@ ShenandoahRootScanner::~ShenandoahRootScanner() {
}

void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops) {
CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_strong);
CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_none);
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure that we don't have to claim CLDs? How would the threads avoid doubly-marking CLDs?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it looks like the CLD closure is not used at all, or is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, we don't need to mark on-stack CLDs, concurrent mark CLDs should be sufficient.

Reran tests, still good.

CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_strong);
MarkingCodeBlobClosure blobs_cl(oops, !CodeBlobToOopClosure::FixRelocations);
strong_roots_do(worker_id, oops, &clds_cl, &blobs_cl);
roots_do(worker_id, oops, NULL, &blobs_cl);
}

void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure *tc) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You're still passing a (NULL) CLDClosure here, but it's not used. Or am I missing something? The method argument could be eliminated altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is unused, removed.

Thanks

@openjdk
Copy link

openjdk bot commented Sep 22, 2020

@zhengyu123 this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8253434
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Sep 22, 2020
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 now! Thank you!

@zhengyu123
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 22, 2020

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

  • 8c02bdb: 8252921: NMT overwrite memory type for region assert when building dynamic archive
  • 0c287de: 8253421: Initialize JFR trace-IDs with zero
  • aa38624: 8248352: [TEST_BUG] Test test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java can leave frame open
  • ae20dd6: 8251496: Fix doclint warnings in jdk.net.httpserver
  • b9729cb: 8253284: Zero OrderAccess barrier mappings are incorrect
  • 284bbf0: 8253079: DeterministicDump.java fails due to garbage in structure padding
  • a4affd5: 8253412: Unsupported GC options passed in JAVA_TOOL_OPTIONS are silently ignored
  • 96f722c: 8252114: Windows-AArch64: Enable and test ZGC and ShenandoahGC
  • f7b1ce4: 8253447: Remove buggy code introduced by 8249451
  • 282b9dc: 8081833: Clean up JVMFlag getter/setter code
  • ... and 25 more: https://git.openjdk.java.net/jdk/compare/d35b117956cff96bd918f2dd10cdf71829e5c525...master

It was not possible to rebase your changes automatically. Please merge master into your branch and try again.

@openjdk
Copy link

openjdk bot commented Sep 22, 2020

@zhengyu123 This change now passes all automated pre-integration checks. In addition to the automated checks, the change must also fulfill all project specific requirements

After integration, the commit message will be:

8253434: Shenandoah: Cleanup ShenandoahRootScanner

Reviewed-by: rkennke
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

There are currently no new commits on the master branch since the last update of the source branch of this PR. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you would like to avoid potential automatic rebasing, specify the current head hash when integrating, like this: /integrate 8c02bdbf13bc8258bbdb6c45fd3b3ba4c6f8971b.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Sep 22, 2020
@zhengyu123
Copy link
Contributor Author

/integrate

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

openjdk bot commented Sep 22, 2020

@zhengyu123 Pushed as commit 3d5fea1.

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

@zhengyu123 zhengyu123 deleted the JDK-8253434 branch September 22, 2020 14:04
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