[compiler-rt] r305658 - [XRay][compiler-rt][NFC] Add a name for argument to __xray_set_handler_arg1(...)

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 18 18:30:05 PDT 2017


Author: dberris
Date: Sun Jun 18 20:30:04 2017
New Revision: 305658

URL: http://llvm.org/viewvc/llvm-project?rev=305658&view=rev
Log:
[XRay][compiler-rt][NFC] Add a name for argument to __xray_set_handler_arg1(...)

Just makes the interface consistent with the other functions in
include/xray/xray_interface.h.

Modified:
    compiler-rt/trunk/include/xray/xray_interface.h
    compiler-rt/trunk/lib/xray/xray_interface.cc

Modified: compiler-rt/trunk/include/xray/xray_interface.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/include/xray/xray_interface.h?rev=305658&r1=305657&r2=305658&view=diff
==============================================================================
--- compiler-rt/trunk/include/xray/xray_interface.h (original)
+++ compiler-rt/trunk/include/xray/xray_interface.h Sun Jun 18 20:30:04 2017
@@ -60,7 +60,8 @@ extern int __xray_remove_handler();
 /// start logging their subsequent affected function calls (if patched).
 ///
 /// Returns 1 on success, 0 on error.
-extern int __xray_set_handler_arg1(void (*)(int32_t, XRayEntryType, uint64_t));
+extern int __xray_set_handler_arg1(void (*entry)(int32_t, XRayEntryType,
+                                                 uint64_t));
 
 /// Disables the XRay handler used to log first arguments of function calls.
 /// Returns 1 on success, 0 on error.

Modified: compiler-rt/trunk/lib/xray/xray_interface.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_interface.cc?rev=305658&r1=305657&r2=305658&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_interface.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_interface.cc Sun Jun 18 20:30:04 2017
@@ -312,7 +312,7 @@ __xray_unpatch_function(int32_t FuncId)
   return patchFunction(FuncId, false);
 }
 
-int __xray_set_handler_arg1(void (*Handler)(int32_t, XRayEntryType, uint64_t)) {
+int __xray_set_handler_arg1(void (*entry)(int32_t, XRayEntryType, uint64_t)) {
   if (!__sanitizer::atomic_load(&XRayInitialized,
                                 __sanitizer::memory_order_acquire))
     return 0;
@@ -320,7 +320,7 @@ int __xray_set_handler_arg1(void (*Handl
   // A relaxed write might not be visible even if the current thread gets
   // scheduled on a different CPU/NUMA node.  We need to wait for everyone to
   // have this handler installed for consistency of collected data across CPUs.
-  __sanitizer::atomic_store(&XRayArgLogger, reinterpret_cast<uint64_t>(Handler),
+  __sanitizer::atomic_store(&XRayArgLogger, reinterpret_cast<uint64_t>(entry),
                             __sanitizer::memory_order_release);
   return 1;
 }




More information about the llvm-commits mailing list