https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105708

--- Comment #5 from Keno Fischer <keno at juliacomputing dot com> ---
Yes, rr cannot record ll/sc. I'm happy to go into depth here, but this is not
really an aarch64 issue. rr doesn't work on ppc64le either for this reason. The
introduction of lse has made rr feasible on aarch64, and there has been a
substantial effort to get to this point where rr is working on the
architecture. We're now working through the distribution issues, where this
cropped up (as mentioned, we didn't notice earlier, because the initialization
is not deterministic). For the moment, we're telling downstream users to avoid
manual use of ll/sc in programs that they want to record under rr. Obviously
this is a significant effort, but for many people it's worth it, because rr is
a critical tool. Perhaps in future hardware iterations, we'll get the ability
to fault on stxr abort or similar, which would allow rr to support ll/sc, but
until then we need to make due with what we have.

The issue here is that `-moutline-atomics` now introduces extra ll/sc
instructions even in software where the implementer was careful to avoid manual
uses of ll/sc and in particular also in system libraries like libc and rtld
that the user may have little control over. Of course we can keep telling
people to build their distribution images with `-march=armv8.3-a
-mno-outline-atomics` and avoid this issue or have them patch libgcc
downstream, but that really seems to defeat the point of `-moutline-atomics`,
which was exactly to avoid this kind of split.

Reply via email to