summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-xray
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2018-09-10 05:00:43 +0000
committerDavid Carlier <devnexen@gmail.com>2018-09-10 05:00:43 +0000
commit07cc5a8df9edd94de7390607b0664cf83820089a (patch)
tree120d2fac66d270be5bc4f78ba0ece329d82c14cb /llvm/test/tools/llvm-xray
parentf3a3679e72617f7ae56780f25b6d0248b7665d38 (diff)
downloadbcm5719-llvm-07cc5a8df9edd94de7390607b0664cf83820089a.tar.gz
bcm5719-llvm-07cc5a8df9edd94de7390607b0664cf83820089a.zip
[Xray] tooling allow MachO format support
Getting writable xray __DATA sections from MachO as well. Reviewers: dberris Reviewed By: dberris Differential Revision: https://reviews.llvm.org/D51758 llvm-svn: 341772
Diffstat (limited to 'llvm/test/tools/llvm-xray')
-rw-r--r--llvm/test/tools/llvm-xray/X86/Inputs/instr-map-mach.obin0 -> 3120 bytes
-rw-r--r--llvm/test/tools/llvm-xray/X86/extract-instrmap-macho.ll9
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-xray/X86/Inputs/instr-map-mach.o b/llvm/test/tools/llvm-xray/X86/Inputs/instr-map-mach.o
new file mode 100644
index 00000000000..44614fec321
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/Inputs/instr-map-mach.o
Binary files differ
diff --git a/llvm/test/tools/llvm-xray/X86/extract-instrmap-macho.ll b/llvm/test/tools/llvm-xray/X86/extract-instrmap-macho.ll
new file mode 100644
index 00000000000..a42307945f2
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/extract-instrmap-macho.ll
@@ -0,0 +1,9 @@
+; This test makes sure we can extract the instrumentation map from an
+; XRay-instrumented object file.
+;
+; RUN: llvm-xray extract %S/Inputs/instr-map-mach.o -s | FileCheck %s
+
+; CHECK: ---
+; CHECK-NEXT: - { id: 1, address: 0x0000000000000000, function: 0x0000000000000000, kind: function-enter, always-instrument: true, function-name: 'task(void*)' }
+; CHECK-NEXT: - { id: 1, address: 0x0000000000000162, function: 0x0000000000000000, kind: function-exit, always-instrument: true, function-name: 'task(void*)' }
+; CHECK-NEXT: ...
OpenPOWER on IntegriCloud