> Hello, > > This is (yet another) cleanup to remove redundant memory barriers after the > new ValuePayload abstraction API in the runtime. The ValuePayload API's > (including FlatValuePayload::read) does the necessary calls to order stores > of the copy before the oop is published (OrderAccess::storestore), making the > platform-specific memory barriers redundant. > > I don't have hardware access to RISCV or PPC, but looking at the runtime > implementations of OrderAccess::storestore, they achieve the same thing as > the platform-specific memory barriers that I suggest we remove in this PR. > GHA will show that this compiles at least. > > `membar(Assembler::StoreStore | Assembler::LoadLoad);` and > `OrderAccess::storestore()` both boil down to `lwsync`. > > The C1 call to `load_flat_array` already omits the memory barrier, so we > don't need to remove it here. > > Testing: > * Oracle's tier1-3 linux-aarch64 > * GHA > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Joel Sikström has updated the pull request incrementally with one additional commit since the last revision: Add twi_0 + isync after read_flat_field in templateTable_ppc_64.cpp Co-authored-by: Martin Doerr <[email protected]> ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/2581/files - new: https://git.openjdk.org/valhalla/pull/2581/files/667796ce..0186aa78 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=2581&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=2581&range=00-01 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/2581.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2581/head:pull/2581 PR: https://git.openjdk.org/valhalla/pull/2581
