-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Conversation
👋 Welcome back zgu! A progress list of the required criteria for merging this PR into |
@zhengyu123 The following labels will be automatically applied to this pull request: 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 |
Webrevs
|
There was a problem hiding this 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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@zhengyu123 this pull request can not be integrated into 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 |
There was a problem hiding this 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!
/integrate |
@zhengyu123 Since your change was applied there have been 35 commits pushed to the
It was not possible to rebase your changes automatically. Please merge |
@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:
There are currently no new commits on the ➡️ To integrate this PR with the above commit message to the |
/integrate |
@zhengyu123 Pushed as commit 3d5fea1. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/286/head:pull/286
$ git checkout pull/286