8379706: Cleanup and clarify BarrierSetAssembler::try_resolve_weak_handle_in_c2 - #30816
8379706: Cleanup and clarify BarrierSetAssembler::try_resolve_weak_handle_in_c2#30816xmas92 wants to merge 4 commits into
Conversation
|
👋 Welcome back aboldtch! A progress list of the required criteria for merging this PR into |
|
@xmas92 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 182 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 |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
Webrevs
|
TheRealMDoerr
left a comment
There was a problem hiding this comment.
Thanks for improving this! I think an additional comment would be helpful to make sure potential users clearly understand what "peek" means. The peeked object is only valid until we hit the next safepoint.
We'll run tests.
| void ZBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) { | ||
| // Resolve weak handle using the standard implementation. | ||
| BarrierSetAssembler::try_resolve_weak_handle_in_c2(masm, obj, tmp, slow_path); | ||
| #undef __ |
There was a problem hiding this comment.
I think the following lines above should also be removed:
#define __ masm->
#undef __
|
Test results look good on our side. Thanks! |
TheRealMDoerr
left a comment
There was a problem hiding this comment.
Excellent! Thanks!
|
@RealFYang, @offamitkumar |
RealFYang
left a comment
There was a problem hiding this comment.
The RISC-V part seems fine to me. My local hs:tier1 - hs:tier3 test on linux-riscv64 using fastdebug build is good.
offamitkumar
left a comment
There was a problem hiding this comment.
s390 looks good, hotspot:tier1 test passed on s390x with fastdebug-vm.
|
Thanks for the reviews. |
|
Going to push as commit 0588209.
Your commit was automatically rebased without conflicts. |
This patch is a simple refactor which does a few things:
try_resolve_weak_handle_in_c2/try_resolve_weak_handleon all platforms totry_peek_weak_handle_in_nmethodto better encapsulate its contractweak_handleinput and theobjmaybe output. These may alias, and do in all current uses.I did not add
reg != noregpreconditions, but did augment theassert_different_registerswith it.I was wondering if
try_peek_weak_handle_in_nmethodwould be better namedtry_peek_weak_handle_from_nmethod, as the weak handle is not in the nmethod, but the peek is. Not sure what preposition is less ambiguous. Not that I think the name in the patch will cause problems for developers. But I'd like some input here.Testing:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30816/head:pull/30816$ git checkout pull/30816Update a local copy of the PR:
$ git checkout pull/30816$ git pull https://git.openjdk.org/jdk.git pull/30816/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 30816View PR using the GUI difftool:
$ git pr show -t 30816Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30816.diff
Using Webrev
Link to Webrev Comment