RFR: 8242115: C2 SATB barriers are not safepoint-safe
Erik Österlund
eosterlund at openjdk.org
Sat Oct 1 08:23:27 UTC 2022
On Fri, 30 Sep 2022 21:22:47 GMT, Igor Veresov <iveresov at openjdk.org> wrote:
> Implement load pinning, use it for g1 pre-value loads, add verification that the load control dependency is kept and that there are no safepoints between the load of the pre-value and the marking check (with the exception of the CAS intrinsics where it's permitted).
Since I introduced the "pinned" control dependency for ZGC loads back when the barrier was in the sea of nodes, I'd like to point out that I also had a patch with some of these fixes, but kind of gave up and did a table flip when the loads started to float across safepoints after the matching to mach nodes, but only on AArch64, during GCM and instruction scheduling IIRC. I had verification code (but implemented differently when an edge is updated in the graph) that said all is fine in my sea of nodes but then the mach nodes started floating around after that messing up the order wrt safepoints anyway. That's why ZGC stopped trying to make the pinned control dependency work, and expands the barriers in assembly code instead. I would not be surprised if we still have the same issue here, and that the sea of nodes verification similarly won't catch it. Because I got that T-shirt already and this all looks fairly familiar. I hope it doesn't have those issues.
-------------
PR: https://git.openjdk.org/jdk/pull/10517
More information about the hotspot-compiler-dev
mailing list