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
8267726: ZGC: array_copy_requires_gc_barriers too strict #4230
Conversation
|
/add label hotspot-compiler |
/remove label hotspot |
@neliasso Unknown command |
@neliasso Unknown command |
/label add hotpsot-compiler |
@neliasso The label
|
@neliasso |
/label add hotspot-compiler |
@neliasso |
Moved to hotspot-compiler |
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. Please file a cleanup RFE and link it to this bug. Also, this might be a good candidate for adding a regression test once the IR verification framework is there.
@neliasso This change now passes all automated pre-integration checks. 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 139 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
I filed RFE https://bugs.openjdk.java.net/browse/JDK-8268020 Yes - all the arraycopy and clone tests should be ported to IR verification. I might do that as a part of the RFE. Thanks for the review Tobias! |
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 the reviews, Tobias and Vladimir. /integrate |
Thanks for the reviews, Tobias and Vladimir. |
@neliasso Since your change was applied there have been 139 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit bba3728. |
I found some cases where an arraycopy clone is eliminated with G1 but not with ZGC. This is probably something that wasn't updated fully after the transition to late gc barrier insertion.
During parse and optimizaton phases array_copy_requires_gc_barriers should return false for clones of oop-arrays. Clone of oop-arrays should be treated the same way as clones of primitive-arrays. During optimization phase - only clones of instances should return true - and that's because they can't be reduced to a raw bulk copy, Clones of instances must either become deconstructed into field copies, or be handled in a special call.
During expansion array_copy_requires_gc_barriers must return true - because we must use a copy with barriers.
To fix this I had to add an extra field to array_copy_requires_gc_barriers to be able to handle instance clones separately. I will follow up with a cleanup. The intersection of arraycopy-kinds and array_copy_requires_gc_barriers-method is the source of much unnecessary complexity.
Please review,
Best regards,
Nils Eliasson
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4230/head:pull/4230
$ git checkout pull/4230
Update a local copy of the PR:
$ git checkout pull/4230
$ git pull https://git.openjdk.java.net/jdk pull/4230/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4230
View PR using the GUI difftool:
$ git pr show -t 4230
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4230.diff