[compiler-rt] r297003 - [XRay] [compiler-rt] Stub out architectures we don't do arg1 logging on.

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 00:26:21 PST 2017


Author: timshen
Date: Mon Mar  6 02:26:21 2017
New Revision: 297003

URL: http://llvm.org/viewvc/llvm-project?rev=297003&view=rev
Log:
[XRay] [compiler-rt] Stub out architectures we don't do arg1 logging on.

rL297000 forgot to include code for three architectures that appeared
since I wrote the first version. This gives them the same treatment as ARMs
have for now - write stubs and wait for someone to actually implement it.

Patched by pelikan (Martin Pelikán)!

Differential Revision: https://reviews.llvm.org/D30634

Modified:
    compiler-rt/trunk/lib/xray/xray_mips.cc
    compiler-rt/trunk/lib/xray/xray_mips64.cc
    compiler-rt/trunk/lib/xray/xray_powerpc64.cc

Modified: compiler-rt/trunk/lib/xray/xray_mips.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_mips.cc?rev=297003&r1=297002&r2=297003&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_mips.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_mips.cc Mon Mar  6 02:26:21 2017
@@ -134,8 +134,9 @@ inline static bool patchSled(const bool
 }
 
 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId,
-                        const XRaySledEntry &Sled) XRAY_NEVER_INSTRUMENT {
-  return patchSled(Enable, FuncId, Sled, __xray_FunctionEntry);
+                        const XRaySledEntry &Sled,
+                        void (*Trampoline)()) XRAY_NEVER_INSTRUMENT {
+  return patchSled(Enable, FuncId, Sled, Trampoline);
 }
 
 bool patchFunctionExit(const bool Enable, const uint32_t FuncId,
@@ -151,3 +152,7 @@ bool patchFunctionTailExit(const bool En
 }
 
 } // namespace __xray
+
+extern "C" void __xray_ArgLoggerEntry() XRAY_NEVER_INSTRUMENT {
+  // FIXME: this will have to be implemented in the trampoline assembly file
+}

Modified: compiler-rt/trunk/lib/xray/xray_mips64.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_mips64.cc?rev=297003&r1=297002&r2=297003&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_mips64.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_mips64.cc Mon Mar  6 02:26:21 2017
@@ -143,8 +143,9 @@ inline static bool patchSled(const bool
 }
 
 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId,
-                        const XRaySledEntry &Sled) XRAY_NEVER_INSTRUMENT {
-  return patchSled(Enable, FuncId, Sled, __xray_FunctionEntry);
+                        const XRaySledEntry &Sled,
+                        void (*Trampoline)()) XRAY_NEVER_INSTRUMENT {
+  return patchSled(Enable, FuncId, Sled, Trampoline);
 }
 
 bool patchFunctionExit(const bool Enable, const uint32_t FuncId,
@@ -160,3 +161,7 @@ bool patchFunctionTailExit(const bool En
 }
 
 } // namespace __xray
+
+extern "C" void __xray_ArgLoggerEntry() XRAY_NEVER_INSTRUMENT {
+  // FIXME: this will have to be implemented in the trampoline assembly file
+}

Modified: compiler-rt/trunk/lib/xray/xray_powerpc64.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_powerpc64.cc?rev=297003&r1=297002&r2=297003&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_powerpc64.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_powerpc64.cc Mon Mar  6 02:26:21 2017
@@ -51,7 +51,8 @@ extern "C" void __clear_cache(void *star
 namespace __xray {
 
 bool patchFunctionEntry(const bool Enable, uint32_t FuncId,
-                        const XRaySledEntry &Sled) XRAY_NEVER_INSTRUMENT {
+                        const XRaySledEntry &Sled,
+                        void (*Trampoline)()) XRAY_NEVER_INSTRUMENT {
   if (Enable) {
     // lis 0, FuncId[16..32]
     // li 0, FuncId[0..15]
@@ -93,3 +94,7 @@ bool patchFunctionTailExit(const bool En
 bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT { return true; }
 
 } // namespace __xray
+
+extern "C" void __xray_ArgLoggerEntry() XRAY_NEVER_INSTRUMENT {
+  // FIXME: this will have to be implemented in the trampoline assembly file
+}




More information about the llvm-commits mailing list