RFR: 8376472: Shenandoah: Assembler store barriers read destination memory despite the decorators [v2]

Aleksey Shipilev shade at openjdk.org
Fri Jan 30 10:30:03 UTC 2026


On Fri, 30 Jan 2026 10:20:18 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> Oh, YES, it should short-cut on non-reference stores. Excellent spot! So it does double write of the same value. Only fine-grained memory model tests would have caught this. Fixed in new commit. I think this is the only place where I made this mistake.
>
> Looks correct. Thanks! Isn't it better to avoid having `BarrierSetAssembler::store_at` twice? I liked that in the old code. I leave you free to decide.

Other barriers do flattening for access address, this is what non-reference store shortcut avoids in them. Given the prevalence of non-reference stores, it is worthwhile to optimize for. It is not the issue for PPC64 per se. I like to have barriers in the same shape across architectures, so that we do not have to think twice (pun intended) why did not we do `BSA::store_at` twice in PPC64, like in other arches :)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29444#discussion_r2745594476


More information about the hotspot-dev mailing list