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
8306734: Shenandoah: Missing barriers on deoptimization path #13613
8306734: Shenandoah: Missing barriers on deoptimization path #13613
Conversation
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
/label add shenandoah |
@shipilev |
Webrevs
|
Ah. Apologies for removing your barriers - I forgot you about the safepoint between load and load barrier problem, requiring load barriers even on the stack. As mentioned in the description, avoiding these kinds of issues was indeed why we moved our barrier expansion to the assembly stage in ZGC. And indeed, that's why ZGC does not have any such barriers. |
Thanks for the explanation. If the |
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. Thanks for fixing.
@shipilev 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 3 new commits 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 |
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.
Hmm ok, it's ugly but I don't have a better idea. Go for it!
Testing is okay, the GHA failures are known. /integrate |
Going to push as commit 28829f3.
Your commit was automatically rebased without conflicts. |
AFAICS, Loom integration (JDK-8284161) moved the Shenandoah block
StackValue::create_stack_value
that we added to avoid exposing bad oops during the deopt (JDK-8224522). I think that was done to avoid interaction with barrier healing acting on derived pointer bases (?), so it employed theNativeAccess::load_oop
trick to still call into GC barriers without healing. Then, the refactoring for ZGC (JDK-8296875) redid these paths, but dropped theNativeAccess::load_oop
completely, which exposed Shenandoah to a missing barrier.Serial, Parallel, G1 are not affected by this, because they do not need load-barriers. Not sure why ZGC is not affected by this, but probably because it does the barrier injection in another place (see JDK-8224675).
There are two ways to fix it: with the Shenandoah-specific barrier injection, or reinstating the
NativeAccess::load_oop
trick Loom integration originally did. I preferred to keep the fix GC-agnostic and reinstate theNA::load_oop
. AFAIU, this would be innocuous for other GCs, ZGC included.Attention: @fisk.
Additional testing:
hotspot_gc_shenandoah
hotspot_gc_shenandoah
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13613/head:pull/13613
$ git checkout pull/13613
Update a local copy of the PR:
$ git checkout pull/13613
$ git pull https://git.openjdk.org/jdk.git pull/13613/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13613
View PR using the GUI difftool:
$ git pr show -t 13613
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13613.diff
Webrev
Link to Webrev Comment