[PATCH] D46998: [XRay][compiler-rt] Remove reliance on C++ ABI features
Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 30 22:48:14 PDT 2018
kpw added inline comments.
================
Comment at: compiler-rt/lib/xray/xray_basic_logging.cc:428-431
+ __xray_set_handler_arg1(atomic_load(&UseRealTSC, memory_order_relaxed)
+ ? basicLoggingHandleArg1RealTSC
+ : basicLoggingHandleArg1EmulateTSC);
+ __xray_set_handler(atomic_load(&UseRealTSC, memory_order_relaxed)
----------------
The pthread once block that initialized UseRealTSC doesn't have to be this thread. Don't we need synchronization (memory_order_acquire) to make sure it's visible?
================
Comment at: compiler-rt/lib/xray/xray_buffer_queue.cc:24
+static BufferQueue::BufferRep *initArray(size_t N) {
+ auto A = reinterpret_cast<BufferQueue::BufferRep *>(InternalAlloc(
----------------
I've reviewed up to here. Will come back to this.
https://reviews.llvm.org/D46998
More information about the llvm-commits
mailing list