8367709: GenShen: Dirty cards for objects that get promoted by safepoint that intervenes between allocation and stores#27832
Conversation
|
👋 Welcome back wkemper! A progress list of the required criteria for merging this PR into |
|
@earthling-amzn 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: 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
@earthling-amzn 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 /label pull request command. |
| ); | ||
| } | ||
| #endif // COMPILER2_OR_JVMCI | ||
| assert(thread->deferred_card_mark().is_empty(), "We don't use this"); |
There was a problem hiding this comment.
This is rare, so probably not worth the extra work, but there is an existing mechanism to defer this until the safepoint (or until another such deferment arises). Not sure if it's worth using it.
There was a problem hiding this comment.
Probably not worth the trouble, because that mechanism might require wiring in some other stuff which may not be wired in for GenShen.
There was a problem hiding this comment.
Yeah, I thought it looked like a lot of complexity to bring in.
ysramakrishna
left a comment
There was a problem hiding this comment.
Good catch of this slippery, if rare, condition. This looks good, but is it possible that we can use a debug *ALot type of flag to manually enlarge the post-allocation window so as to induce this condition (promotion) to happen more frequently in fastdebug runs with the flag enabled? That would exercise this code some.
ysramakrishna
left a comment
There was a problem hiding this comment.
(Left a comment about possibly exercising this code, if easy to do so.) Not a blocking suggestion, though. Approved.
|
This condition does happen pretty reliably in the |
|
/integrate |
|
Going to push as commit d447297.
Your commit was automatically rebased without conflicts. |
|
@earthling-amzn Pushed as commit d447297. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
I believe this sequence of events can lead to the original assertion failing:
However, there is still a risk that the card marking barriers have been elided for this object. Now that the object is in the old generation we must be sure that if it ends up storing any pointers to young, then these cards must be dirtied. The solution here is conservative in that it just dirties all the cards for this object. We expect this condition to be rare and the card table will refine itself on subsequent GC cycles. Also, note that we will not scan the remembered set without coming to the
init-marksafepoint, so it will see these dirty cards.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27832/head:pull/27832$ git checkout pull/27832Update a local copy of the PR:
$ git checkout pull/27832$ git pull https://git.openjdk.org/jdk.git pull/27832/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27832View PR using the GUI difftool:
$ git pr show -t 27832Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27832.diff
Using Webrev
Link to Webrev Comment