summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-xray/X86/extract-instrmap.ll
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2016-10-26 01:42:59 +0000
committerDean Michael Berris <dberris@google.com>2016-10-26 01:42:59 +0000
commitd21e0a7ba74da20bb06b7ad3366d9299bb33feed (patch)
tree96d865d14cb053462ca1a2e12c063bdb35115b82 /llvm/test/tools/llvm-xray/X86/extract-instrmap.ll
parenteb1bf312d5a7896184f12b1cba10e90cccfba181 (diff)
downloadbcm5719-llvm-d21e0a7ba74da20bb06b7ad3366d9299bb33feed.tar.gz
bcm5719-llvm-d21e0a7ba74da20bb06b7ad3366d9299bb33feed.zip
[XRay] Implement `llvm-xray extract`, start of the llvm-xray tool
Usage: llvm-xray extract <object file> [-o <filename or '-'>] The tool gets the XRay instrumentation map from an object file and turns it into YAML. We first support ELF64 sleds on x86_64 binaries, with provision for supporting other supported platforms and formats later. This is the first of a many-part change to fully implement the `llvm-xray` tool. We also define a subcommand registration and dispatch mechanism to be used by other further subcommand implementations for llvm-xray. llvm-svn: 285155
Diffstat (limited to 'llvm/test/tools/llvm-xray/X86/extract-instrmap.ll')
-rw-r--r--llvm/test/tools/llvm-xray/X86/extract-instrmap.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-xray/X86/extract-instrmap.ll b/llvm/test/tools/llvm-xray/X86/extract-instrmap.ll
new file mode 100644
index 00000000000..8155d57f814
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/extract-instrmap.ll
@@ -0,0 +1,15 @@
+; This test makes sure we can extract the instrumentation map from an
+; XRay-instrumented object file.
+;
+; RUN: llvm-xray extract %S/Inputs/elf64-example.bin | FileCheck %s
+
+; CHECK: ---
+; CHECK-NEXT: - { id: 1, address: 0x000000000041C900, function: 0x000000000041C900, kind: function-enter,
+; CHECK-NEXT: always-instrument: true }
+; CHECK-NEXT: - { id: 1, address: 0x000000000041C912, function: 0x000000000041C900, kind: function-exit,
+; CHECK-NEXT: always-instrument: true }
+; CHECK-NEXT: - { id: 2, address: 0x000000000041C930, function: 0x000000000041C930, kind: function-enter,
+; CHECK-NEXT: always-instrument: true }
+; CHECK-NEXT: - { id: 2, address: 0x000000000041C946, function: 0x000000000041C930, kind: function-exit,
+; CHECK-NEXT: always-instrument: true }
+; CHECK-NEXT: ...
OpenPOWER on IntegriCloud