-
Notifications
You must be signed in to change notification settings - Fork 137
8366717: [lworld] Cleanup defensive fixing of JDK-8365996 #1824
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
Open
marc-chevalier
wants to merge
13
commits into
openjdk:lworld
Choose a base branch
from
marc-chevalier:JDK-8366717
base: lworld
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5cdce25
Remove push_CPU_state in g1BarrierSetAssembler_aarch64.cpp
marc-chevalier e3d7c53
Add push_call_clobbered_registers in g1BarrierSetAssembler_aarch64.cpp
marc-chevalier ac19049
Asserting
marc-chevalier 1a53198
Try the thing in oop_store_at
marc-chevalier e2220aa
Actually no
marc-chevalier 7ae82a0
unpack_inline_helper
marc-chevalier dbe7c69
gen_c2i_adapter
marc-chevalier e234616
Experimenting g1_write_barrier_pre
marc-chevalier c749000
Cleanup
marc-chevalier 4adfc04
assert in oop_store_at
marc-chevalier 6696808
oop_store_at
marc-chevalier 3f013c8
Merge remote-tracking branch 'origin/lworld' into JDK-8366717.investi…
marc-chevalier bf65d11
Pick the right comment again
marc-chevalier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7162,11 +7162,18 @@ bool MacroAssembler::unpack_inline_helper(const GrowableArray<SigEntry>* sig, in | |
|
|
||
| Label L_null, L_notNull; | ||
| // Don't use r14 as tmp because it's used for spilling (see MacroAssembler::spill_reg_for) | ||
| // TODO 8366717 We need to make sure that r14 (and potentially other long-life regs) are kept live in slowpath runtime calls in GC barriers | ||
| Register tmp1 = r10; | ||
| Register tmp2 = r11; | ||
|
|
||
| #ifndef ASSERT | ||
| RegSet clobbered_gp_regs = MacroAssembler::call_clobbered_gp_registers(); | ||
| assert(clobbered_gp_regs.contains(tmp1), "tmp1 must be saved explicitly if it's not a clobber"); | ||
| assert(clobbered_gp_regs.contains(tmp2), "tmp2 must be saved explicitly if it's not a clobber"); | ||
| assert(clobbered_gp_regs.contains(r14), "r14 must be saved explicitly if it's not a clobber"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great idea with these asserts! |
||
| #endif | ||
|
|
||
| Register fromReg = noreg; | ||
| ScalarizedInlineArgsStream stream(sig, sig_index, to, to_count, to_index, -1); | ||
| ScalarizedInlineArgsStream stream(sig, sig_index, to, to_count, to_index, true); | ||
| bool done = true; | ||
| bool mark_done = true; | ||
| VMReg toReg; | ||
|
|
@@ -7267,7 +7274,6 @@ bool MacroAssembler::unpack_inline_helper(const GrowableArray<SigEntry>* sig, in | |
| } | ||
| } | ||
|
|
||
| // TODO 8366717 This is probably okay but looks fishy because stream is reset in the "Set null marker to zero" case just above. Same on x64. | ||
| sig_index = stream.sig_index(); | ||
| to_index = stream.regs_index(); | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's only the
__ mov(tmp3, dst.base());that could potentially be removed, right? Not the entire branch. If themovis still needed, should it be guarded byInlineTypePassFieldsAsArgs?Uh oh!
There was an error while loading. Please reload this page.
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.
I don't think we can just remove the
movpart.I don't really understand how to interpret that. We have
do you suggest we write
store_check(masm, tmp3, dst);? But then,
tmp3is not set to anything meaningful yet. Orstore_check(masm, dst.base(), dst);But that is exactly the else-branch. Moreover, I've tried to guard and it makes some test fails. For instance, we can come from
that doesn't need
InlineTypePassFieldsAsArgsbut will givetmp3and if we don't use it here (for instance, if I replace the condition byInlineTypePassFieldsAsArgs && tmp3 != noreg), we get various test failures.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.
I don't understand why it's not a problem on mainline, tho. And I agree it's weird. I've looked, but it's hard to investigate why something works rather than not (on a somewhat diverging codebase). I spent some time on that, but eventually decided it's not that critical, as long as we have a way to make it work for Valhalla too.
Uh oh!
There was an error while loading. Please reload this page.
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.
I was suggesting that we should do what mainline does if
!InlineTypePassFieldsAsArgs, would that make sense?I.e. do
store_check(masm, dst.base(), dst);Uh oh!
There was an error while loading. Please reload this page.
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.
That is the else-branch, right? Right now we have
If I understand well, you're suggesting to write
but to me, it looks equivalent to
since both else-branch are identical.
And this, I experimentally found that it's failing quite a lot, with backtraces as I mentioned. Is there an obvious mistake in my logic I'm missing?
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.
Ah, you are right. I missed the outer
if (tmp3 != noreg) {which is Valhalla specific. As we discussed off-thread, it would be good to get a better understanding of why this fails in Valhalla. Thanks a lot!