[PATCH] D46998: [XRay][compiler-rt] Remove reliance on C++ ABI features

Eizan Miyamoto via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 06:01:39 PDT 2018


eizan added inline comments.


================
Comment at: compiler-rt/lib/xray/xray_basic_logging.cc:85
+  pthread_once(&DetectOnce, +[] {
+    if (atomic_load(&UseRealTSC, memory_order_relaxed))
+      atomic_store(&CycleFrequency, getTSCFrequency(), memory_order_release);
----------------
Why do we need to use atomic_load with a custom memory order rather than just using the default provided by operator=?


================
Comment at: compiler-rt/lib/xray/xray_basic_logging.cc:412
     GlobalOptions.MaxStackDepth = F.max_stack_depth;
+    *basicFlags() = F;
   } else if (OptionsSize != sizeof(BasicLoggingOptions)) {
----------------
Is this a bugfix?


https://reviews.llvm.org/D46998





More information about the llvm-commits mailing list