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

8258255: Move PtrQueue active flag to SATBMarkQueue #1820

Closed
wants to merge 3 commits into from

Conversation

kimbarrett
Copy link

@kimbarrett kimbarrett commented Dec 17, 2020

Please review this change to the PtrQueue hierarchy, moving the support for
"active" queues and qset to SATBMarkQueue[Set], which is the only user of
this feature. Other classes derived from PtrQueue[Set] currently work
around or ignore this feature. This change removes it from consideration
entirely for those other classes.

Testing:
mach5 tier1
local (linux-x64) hotspot:tier1 with -XX:+UseShenandoahGC

In the process of doing this refactoring I noticed that some of the
vmStructs support around PtrQueue[Set] didn't get moved from G1 to shared,
and the G1 parts are incomplete. Filed JDK-8258581 to address that.


Progress

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

Issue

  • JDK-8258255: Move PtrQueue active flag to SATBMarkQueue

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 17, 2020

👋 Welcome back kbarrett! 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 Dec 17, 2020
@openjdk
Copy link

openjdk bot commented Dec 17, 2020

@kimbarrett 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 Dec 17, 2020
@mlbridge
Copy link

mlbridge bot commented Dec 17, 2020

Webrevs

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Apart from that request with the comment, lgtm.

@@ -95,7 +103,9 @@ class SATBMarkQueueSet: public PtrQueueSet {
// These are rarely (if ever) changed, so same cache line as count.
size_t _process_completed_buffers_threshold;
size_t _buffer_enqueue_threshold;
DEFINE_PAD_MINUS_SIZE(2, DEFAULT_CACHE_LINE_SIZE, 3 * sizeof(size_t));
// SATB is only active during marking. Enqueuing is not done when inactive.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer to avoid the double-negation in the second sentence.

Copy link
Author

Choose a reason for hiding this comment

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

Sure. Changing it to

  // SATB is only active during marking.  Enqueuing is only done when active.

@@ -138,9 +150,11 @@ class SATBMarkQueueSet: public PtrQueueSet {
// buffer; the leading entries may be excluded due to filtering.
bool apply_closure_to_completed_buffer(SATBBufferClosure* cl);

// When active, add obj to queue by calling enqueue_known_active.
void enqueue(SATBMarkQueue& queue, oop obj) {
if (queue.is_active()) enqueue_known_active(queue, obj);
Copy link
Contributor

@tschatzl tschatzl Dec 17, 2020

Choose a reason for hiding this comment

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

Maybe something for a different CR and probably pre-existing: enqueue() in some contexts is already called with queue.is_active() == true. I.e. this check is superfluous sometimes, particularly when called for object arrays.

Copy link
Author

Choose a reason for hiding this comment

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

I was planning to look at that later. I filed a reminder: https://bugs.openjdk.java.net/browse/JDK-8258607

@openjdk
Copy link

openjdk bot commented Dec 17, 2020

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

8258255: Move PtrQueue active flag to SATBMarkQueue

Reviewed-by: tschatzl, sjohanss

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 Dec 17, 2020
Copy link
Contributor

@kstefanj kstefanj left a comment

Choose a reason for hiding this comment

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

Nice cleanup, look good.

@kimbarrett
Copy link
Author

Thanks @tschatzl and @kstefanj for reviews.

@kimbarrett
Copy link
Author

/integrate

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

openjdk bot commented Dec 18, 2020

@kimbarrett Pushed as commit 00d80fd.

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

@kimbarrett kimbarrett deleted the move_active branch December 19, 2020 19: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
Development

Successfully merging this pull request may close these issues.

3 participants