OSDN Git Service

[XRay] Implement `llvm-xray extract`, start of the llvm-xray tool
authorDean Michael Berris <dberris@google.com>
Wed, 26 Oct 2016 04:14:34 +0000 (04:14 +0000)
committerDean Michael Berris <dberris@google.com>
Wed, 26 Oct 2016 04:14:34 +0000 (04:14 +0000)
commit5a35548822f3b8758e95dd1b1084df8a6fcbf51d
treec25157c002a2e8e82574834120be55a5222142fd
parent446d7cc0db2518fd409fea755d53ec4865e86b7d
[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.

Diffusion Revision: https://reviews.llvm.org/D21987

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285165 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
test/lit.cfg
test/tools/llvm-xray/X86/Inputs/elf32-noxray.bin [new file with mode: 0755]
test/tools/llvm-xray/X86/Inputs/elf64-badentrysizes.bin [new file with mode: 0755]
test/tools/llvm-xray/X86/Inputs/elf64-example.bin [new file with mode: 0755]
test/tools/llvm-xray/X86/Inputs/elf64-noinstr-map.bin [new file with mode: 0755]
test/tools/llvm-xray/X86/Inputs/empty-file.bin [new file with mode: 0644]
test/tools/llvm-xray/X86/bad-instrmap-sizes.bin [new file with mode: 0644]
test/tools/llvm-xray/X86/empty.txt [new file with mode: 0644]
test/tools/llvm-xray/X86/extract-instrmap.ll [new file with mode: 0644]
test/tools/llvm-xray/X86/lit.local.cfg [new file with mode: 0644]
test/tools/llvm-xray/X86/no-instr-map.txt [new file with mode: 0644]
test/tools/llvm-xray/X86/no-such-file.txt [new file with mode: 0644]
test/tools/llvm-xray/X86/unsupported-elf32.txt [new file with mode: 0644]
tools/llvm-xray/CMakeLists.txt [new file with mode: 0644]
tools/llvm-xray/llvm-xray.cc [new file with mode: 0644]
tools/llvm-xray/xray-extract.cc [new file with mode: 0644]
tools/llvm-xray/xray-extract.h [new file with mode: 0644]
tools/llvm-xray/xray-registry.cc [new file with mode: 0644]
tools/llvm-xray/xray-registry.h [new file with mode: 0644]
tools/llvm-xray/xray-sleds.h [new file with mode: 0644]