RFR: 8325821: [REDO] use "dmb.ishst+dmb.ishld" for release barrier [v8]
kuaiwei
duke at openjdk.org
Wed Jun 5 03:52:24 UTC 2024
> he origin patch for https://bugs.openjdk.org/browse/JDK-8324186 has 2 issues:
> 1 It show regression in some platform, like Apple silicon in mac os
> 2 Can not handle instruction sequence like "dmb.ishld; dmb.ishst; dmb.ishld; dmb.ishld"
>
> It can be fixed by:
> 1 Enable AlwaysMergeDMB by default, only disable it in architecture we can see performance improvement (N1 or N2)
> 2 Check the special pattern and merge the subsequent dmb.
>
> It also fix a bug when code buffer is expanding, st/ld/dmb can not be merged. I added unit tests for these.
>
> This patch still has a unhandled case. Insts like "dmb.ishld; dmb.ishst; dmb.ish", it will merge the last 2 instructions and can not merge all three. Because when emitting dmb.ish, if merge all previous dmbs, the code buffer will shrink the size. I think it may break some resumption and think it's not a common pattern.
>
> In previous PR https://github.com/openjdk/jdk/pull/18467 , I tried an implementation to use state machine for merging. But it looks risky to pending instruction during emitting.
kuaiwei has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
- Merge master
- Use constexpr for test encoding
- Add comment in aarch64.ad
- Remove tailing white space
- Refine merge dmb test cases
- Add more unit tests
- Make MacroAssembler::merge more clear
- 8325821: [REDO] use "dmb.ishst+dmb.ishld" for release barrier
-------------
Changes: https://git.openjdk.org/jdk/pull/19278/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19278&range=07
Stats: 523 lines in 9 files changed: 510 ins; 0 del; 13 mod
Patch: https://git.openjdk.org/jdk/pull/19278.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19278/head:pull/19278
PR: https://git.openjdk.org/jdk/pull/19278
More information about the hotspot-dev
mailing list