949eb447a4
On architectures with a weak memory model, there is the possibility that the concurrent marker can see the publishing store of a new object before it sees the initializing store of that object's header. On an M1, the barrier to prevent reordering these stores is fairly cheap, so we emit this barrier on Mac/iOS ARM64. Otherwise, this barrier is very expensive (or at least expensive for some hardware within the ABI), so instead we avoid the race by deferring marking of objects inside an active TLAB. Disable TSAN instrumentation on the marker setting the mark bit, as TSAN does not understand fences. TEST=ooo arm64 machines Bug: https://github.com/dart-lang/sdk/issues/56845 Change-Id: I0676661a7cf941fdc6b451e516d890c26826bb3b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389265 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>