[PATCH] D29703: [XRay] [compiler-rt] Allow logging the first argument of a function call.

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 00:32:32 PST 2017


dberris added inline comments.


================
Comment at: lib/xray/xray_interface.cc:217
+{
+  XRayArgLogger.store(Handler, std::memory_order_relaxed);
+}
----------------
pelikan wrote:
> dberris wrote:
> > I think it would be better to make this store a release, for a stronger guarantee. 
> Stronger guarantee of what?  There's nothing we're synchronizing *with*, we only care about atomicity (which this provides).  When I see a release/consume I automatically look for an acquire, and in this case there isn't one.
In x86-64 the acquire is in the assembly (spelled `movq`) because of the stronger memory model. That would change in weaker memory models, and since this is in a cross-platform part of the code, we have to be a bit more careful about this.


https://reviews.llvm.org/D29703





More information about the llvm-commits mailing list