summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-xray/xray-extract.cc
Commit message (Collapse)AuthorAgeFilesLines
* [XRay][tools] Add option to llvm-xray extract to symbolize functionsDean Michael Berris2017-04-181-3/+20
| | | | | | | | | | | | | | Summary: This allows us to, if the symbol names are available in the binary, be able to provide the function name in the YAML output. Reviewers: dblaikie, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32153 llvm-svn: 300624
* Disable wrapping llvm-xray YAML outputDimitry Andric2017-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: The YAML output produced by llvm-xray is supposed to be wrapped at the arbitrary default of 70 columns set by `yaml:Output`. Unfortunately, the wrapping is rather unpredictable, and can easily go past the set number of columns, depending on the execution environment. To make the YAML output environment-independent, disable wrapping instead. Reviewers: dberris Reviewed By: dberris Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D29962 llvm-svn: 295116
* [XRay] Define the InstrumentationMap typeDean Michael Berris2017-02-011-225/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change implements the instrumentation map loading library which can understand both YAML-defined instrumentation maps, and ELF 64-bit object files that have the XRay instrumentation map section. We break it out into a library on its own to allow for other applications to deal with the XRay instrumentation map defined in XRay-instrumented binaries. This type provides both raw access to the logical representation of the instrumentation map entries as well as higher level functions for converting a function ID into a function address. At this point we only support ELF64 binaries and YAML-defined XRay instrumentation maps. Future changes should extend this to support 32-bit ELF binaries, as well as other binary formats (like MachO). As part of this change we also migrate all uses of the extraction logic that used to be defined in tools/llvm-xray/ to use this new type and interface for loading from files. We also remove the flag from the `llvm-xray` tool that required users to specify the type of the instrumentation map file being provided to instead make the library auto-detect the file type. Reviewers: dblaikie Subscribers: mgorny, varno, llvm-commits Differential Revision: https://reviews.llvm.org/D29319 llvm-svn: 293721
* tools/llvm-xray: Avoid std::errc::protocol_* to appease mingw, like r285261.NAKAMURA Takumi2017-01-111-1/+1
| | | | | | They are oriented from winsock and mingw doesn't import them. llvm-svn: 291636
* [XRay] Implement `llvm-xray convert` -- trace file conversionDean Michael Berris2017-01-101-6/+57
| | | | | | | | | | | | | | | | | | | | This is the second part of a multi-part change to define additional subcommands to the `llvm-xray` tool. This change defines a conversion subcommand to take XRay log files, and turns them from one format to another (binary or YAML). This currently only supports the first version of the log file format, defined in the compiler-rt runtime. Depends on D21987. Reviewers: dblaikie, echristo Subscribers: mehdi_amini, dberris, beanz, llvm-commits Differential Revision: https://reviews.llvm.org/D24376 llvm-svn: 291529
* Make the Error class constructor protectedMehdi Amini2016-11-111-2/+2
| | | | | | | | | This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
* xray-extract.cc: Quick fix for mingw, to avoid errc::protocol_error.NAKAMURA Takumi2016-10-271-2/+2
| | | | | | errc::protocol_error is winsock-oriented and mingw doesn't include it. (MS does, though) llvm-svn: 285261
* [XRay] Remove unnecessary include of <unistd.h>Dean Michael Berris2016-10-261-2/+0
| | | | llvm-svn: 285170
* [XRay] Move specialisations into correct namespaceDean Michael Berris2016-10-261-0/+6
| | | | llvm-svn: 285168
* [XRay] Remove extra `;` to make -wpedantic happyDean Michael Berris2016-10-261-1/+1
| | | | llvm-svn: 285167
* [XRay] Implement `llvm-xray extract`, start of the llvm-xray toolDean Michael Berris2016-10-261-0/+236
| | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 285165
* Revert "[XRay] Implement `llvm-xray extract`, start of the llvm-xray tool"Dean Michael Berris2016-10-261-236/+0
| | | | | | Reverts r285155 -- misconfigured tests. llvm-svn: 285156
* [XRay] Implement `llvm-xray extract`, start of the llvm-xray toolDean Michael Berris2016-10-261-0/+236
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
OpenPOWER on IntegriCloud