-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8300255: Introduce interface for GC oop verification in the assembler #12443
Conversation
/contributor add @TheRealMDoerr |
/contributor add @xmas92 |
👋 Welcome back eosterlund! A progress list of the required criteria for merging this PR into |
/contributor add @yadongw |
PPC code contributed by @TheRealMDoerr and RISC-V code contributed by @yadongw. Could you please check that it works on your machines? |
@fisk |
@fisk |
@fisk |
Webrevs
|
The default version of check_oop doesn't work for ZGC. I suggest to exclude the PPC64 parts here and ship them with the generational ZGC PR. That will reduce effort. Does that make sense? |
Hmm. Looking at the changes of this patch, we used to call __ verify_oop, but now we call check_oop on the barrier set assembler, which in turn has a single implementation which calls __ verify_oop. It seems like this patch currently does not change the behaviour at all to what happened before? While I am perfectly fine removing the PPC changes, I don't think I understand what behaviour this patch changes for PPC. |
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.
Hi, seems we need two extra small changes to build on linux-riscv. Thanks.
@@ -99,6 +99,8 @@ class ZBarrierSetAssembler : public ZBarrierSetAssemblerBase { | |||
void generate_c2_load_barrier_stub(MacroAssembler* masm, | |||
ZLoadBarrierStubC2* stub) const; | |||
#endif // COMPILER2 | |||
|
|||
virtual void check_oop(MacroAssembler* masm, Register obj, Register tmp1, Register tmp2, Label& error); |
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.
Need to remove 'virtual' here.
|
||
#define __ masm-> | ||
|
||
void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register tmp1, Register tmp2, Label& error) { |
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.
Should be 'ZBarrierSetAssembler::check_oop' here.
You're right. VerifyOops is already broken with ZGC on PPC64. You can keep the PPC64 parts as they are. The generational ZGC code will fix the problem. So, I'm fine with this PR. |
Okay great - thanks for checking! |
Thanks for having a look! Hopefully fixed in the latest commit. |
@fisk : Hi, I think we should also add following changes for riscv to make it work:
|
Fixed! |
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.
lgtm.
|
||
void ZBarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register tmp1, Register tmp2, Label& error) { | ||
// Check if mask is good. | ||
// verifies that ZAddressBadMask & r0 == 0 |
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.
Update comment s/r0/obj
Thanks for the review @xmas92! Will fix the comment. |
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.
This change looks nice. Did you run tier8 or tier1 tests with -XX:+VerifyOops? I thought we ran some general testing in tier3 with -XX:+VerifyOops but we don't seem to be doing that. Thanks.
@fisk 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 72 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. ➡️ 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.
Updated RISC-V part looks good. Thanks.
Thanks! |
Thanks for the review! I have run gc-test-suite locally on both an AArch64 machine and x86_64 machine, with -XX:+VerifyOops with ZGC and G1, and it looks fine. I think it exercises verify oops pretty well. Do you want me to run tier8 as well? Personally, I hesitate a bit to run off a tier8 job for this change if gc-test-suite is happy with -XX:+VerifyOops. |
Tier8 is unnecessary as you've done general testing with it. |
Okay, thanks! |
/integrate |
Going to push as commit f4d4fa5.
Your commit was automatically rebased without conflicts. |
In the assembly code, there is some generic oop verification code. Said verification may or may not fit a particular GC. In particular, it has not worked well for ZGC for a while, and there is an if (UseZGC). This enhancement aims at generalizing this code, such that a collector can have its own oop verification policy.
Progress
Issue
Reviewers
Contributors
<mdoerr@openjdk.org>
<aboldtch@openjdk.org>
<yadongwang@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12443/head:pull/12443
$ git checkout pull/12443
Update a local copy of the PR:
$ git checkout pull/12443
$ git pull https://git.openjdk.org/jdk pull/12443/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12443
View PR using the GUI difftool:
$ git pr show -t 12443
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12443.diff