8388837: RISC-V: Track card addresses directly in G1 array post-write barrier loop - #32020
8388837: RISC-V: Track card addresses directly in G1 array post-write barrier loop#32020zifeihan wants to merge 3 commits into
Conversation
|
👋 Welcome back gcao! A progress list of the required criteria for merging this PR into |
|
@zifeihan 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 24 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@albertnetymk, @RealFYang) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
Webrevs
|
albertnetymk
left a comment
There was a problem hiding this comment.
Looks good.
(For consistency, could we increment start, as x86 does, instead of decrementing the end address?)
|
/cc hotspot-gc |
|
@albertnetymk |
@albertnetymk Thanks for your review, Fixed. |
| __ subi(count, count, 1); | ||
| __ bgez(count, loop); | ||
| __ addi(start, start, 1); | ||
| __ bge(count, start, loop); |
There was a problem hiding this comment.
Suggestion: __ ble(start, count, loop);
There was a problem hiding this comment.
Suggestion:
__ ble(start, count, loop);
Fixed
RealFYang
left a comment
There was a problem hiding this comment.
Updated change looks fine to me. Thanks.
|
Thanks all for the review. |
|
/sponsor |
|
Going to push as commit e8fdd54.
Your commit was automatically rebased without conflicts. |
|
@DingliZhang @zifeihan Pushed as commit e8fdd54. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
As discussed here: #31956 (comment)
We can propose this array card-loop optimization and apply it on both RISC-V and AArch64. However, AArch64's indexed addressing may limit the performance benefit, so I need to run performance tests to verify it first. After that, I'll submit a new PR for AArch64.
For now, let's only apply the optimization to the RISC-V backend here.
Correctness Testing
Performance test:
We can observe the throughput scores increased from 604.565 to 616.446. While this may not look like a huge improvement, we can also use the perfnorm profiler to observe normalized metrics such as instructions per operation and cycles per operation. From the data below, we can see that after applying the patch,
instructions:udecreased — which is exactly our goal.Performance test command:
without this patch:
with this patch:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32020/head:pull/32020$ git checkout pull/32020Update a local copy of the PR:
$ git checkout pull/32020$ git pull https://git.openjdk.org/jdk.git pull/32020/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32020View PR using the GUI difftool:
$ git pr show -t 32020Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32020.diff
Using Webrev
Link to Webrev Comment