diff options
author | Tim Shen <timshen91@gmail.com> | 2017-03-06 08:26:21 +0000 |
---|---|---|
committer | Tim Shen <timshen91@gmail.com> | 2017-03-06 08:26:21 +0000 |
commit | 0c229c41c033d9b9ed498a6017697216cb99cc87 (patch) | |
tree | dba03af3c25d7dd8904e49e06e3cd6ac56d98fc1 /lib | |
parent | 10dfe2dbc7c64b7f1a9a6f060f8f1f5940febb29 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xray/xray_mips.cc | 9 | ||||
-rw-r--r-- | lib/xray/xray_mips64.cc | 9 | ||||
-rw-r--r-- | lib/xray/xray_powerpc64.cc | 7 |
3 files changed, 20 insertions, 5 deletions
diff --git a/lib/xray/xray_mips.cc b/lib/xray/xray_mips.cc index d71610534..c8ff39936 100644 --- a/lib/xray/xray_mips.cc +++ b/lib/xray/xray_mips.cc @@ -134,8 +134,9 @@ inline static bool patchSled(const bool Enable, const uint32_t FuncId, } 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 Enable, const uint32_t FuncId, } } // namespace __xray + +extern "C" void __xray_ArgLoggerEntry() XRAY_NEVER_INSTRUMENT { + // FIXME: this will have to be implemented in the trampoline assembly file +} diff --git a/lib/xray/xray_mips64.cc b/lib/xray/xray_mips64.cc index a2c8b5e7d..21136848c 100644 --- a/lib/xray/xray_mips64.cc +++ b/lib/xray/xray_mips64.cc @@ -143,8 +143,9 @@ inline static bool patchSled(const bool Enable, const uint32_t FuncId, } 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 Enable, const uint32_t FuncId, } } // namespace __xray + +extern "C" void __xray_ArgLoggerEntry() XRAY_NEVER_INSTRUMENT { + // FIXME: this will have to be implemented in the trampoline assembly file +} diff --git a/lib/xray/xray_powerpc64.cc b/lib/xray/xray_powerpc64.cc index e0b62905e..6a7554cfc 100644 --- a/lib/xray/xray_powerpc64.cc +++ b/lib/xray/xray_powerpc64.cc @@ -51,7 +51,8 @@ extern "C" void __clear_cache(void *start, void *end); 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 Enable, const uint32_t FuncId, 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 +} |