summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-xray
Commit message (Collapse)AuthorAgeFilesLines
...
* [XRay][tools] Fixup for pedantic and permissive errors/warningsDean Michael Berris2017-04-242-3/+3
| | | | | | | | Remove extraneous semicolons and fully qualify the Trace type. Follow-up to D29320. llvm-svn: 301161
* [XRay] A tool for Comparing xray function call graphsDean Michael Berris2017-04-247-132/+786
| | | | | | | | | | | | | | | | | | | | | | Summary: This is a tool for comparing the function graphs produced by the llvm-xray graph too. It takes the form of a new subcommand of the llvm-xray tool 'graph-diff'. This initial version of the patch is very rough, but it is close to feature complete. Depends on D29363 Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29320 llvm-svn: 301160
* [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
* [XRay][tools] Remove some assertions in llvm-xray graphDean Michael Berris2017-03-311-6/+1
| | | | | | | | | | | | | | | | | Summary: Assertions assuming that function calls may not have zero durations do not seem to hold in the wild. There are valid cases where the conversion of the tsc counters end up becoming zero-length durations. These assertions don't really hold and the algorithms don't need those to be true for them to work. Reviewers: dblaikie, echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31519 llvm-svn: 299150
* [XRay][tools] Handle "no subcommand" case for llvm-xrayDean Michael Berris2017-03-291-1/+9
| | | | | | | | | | | | | | | | Summary: Currently the llvm-xray commandline tool fails to handle the case for when no subcommand is provided in a graceful manner. This fixes that to print the help message explaining the subcommands and the available options. Reviewers: pcc, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31409 llvm-svn: 298975
* [XRAY] A Color Choosing helper for XRay GraphDean Michael Berris2017-02-255-60/+292
| | | | | | | | | | | | | | | | | | | Summary: In Preparation for graph comparison, this patch breaks out the color choice code from xray-graph into a library and adds polynomials for the Sequential and Difference sets from ColorBrewer. Depends on D29005 Reviewers: dblaikie, chandlerc, dberris Reviewed By: dberris Subscribers: chandlerc, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D29363 llvm-svn: 296210
* [XRAY] [x86_64] Adding a Flight Data filetype reader to the llvm-xray Trace ↵Dean Michael Berris2017-02-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | implementation. Summary: The file type packs function trace data onto disk from potentially multiple threads that are aggregated and flushed during the course of an instrumented program's runtime. It is named FDR mode or Flight Data recorder as an analogy to plane blackboxes, which instrument a running system without access to IO. The writer code is defined in compiler-rt in xray_fdr_logging.h/cc Reviewers: rSerge, kcc, dberris Reviewed By: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29697 llvm-svn: 295397
* Disable wrapping llvm-xray YAML outputDimitry Andric2017-02-142-2/+2
| | | | | | | | | | | | | | | | | | | | | 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] A graph Class for the llvm-xray graphDean Michael Berris2017-02-102-96/+104
| | | | | | | | | | | | | | | | | | | Summary: In preparation for graph comparison and filtering, this is a library for representing graphs in LLVM. This will enable easier encapsulation and reuse of graphs in llvm-xray. Depends on D28999, D28225 Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29005 llvm-svn: 294717
* Revert "[XRay] A graph Class for the llvm-xray graph"Dean Michael Berris2017-02-102-105/+96
| | | | | | Broke tests, reverting. llvm-svn: 294714
* [XRay] A graph Class for the llvm-xray graphDean Michael Berris2017-02-102-96/+105
| | | | | | | | | | | | | | | | | | | Summary: In preparation for graph comparison and filtering, this is a library for representing graphs in LLVM. This will enable easier encapsulation and reuse of graphs in llvm-xray. Depends on D28999, D28225 Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29005 llvm-svn: 294713
* [XRay] Use std::errc::invalid_argument instead of std::errc::bad_messageDean Michael Berris2017-02-011-1/+1
| | | | | | | | This change should appease the mingw32 builds. Follow-up to D29319. llvm-svn: 293725
* [XRay] Define the InstrumentationMap typeDean Michael Berris2017-02-016-448/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove unused 'using' declaration. Found by clang-tidy: ↵Sylvestre Ledru2017-01-281-1/+0
| | | | | | misc-unused-using-decls NFC llvm-svn: 293382
* Implemented color coding and Vertex labels in XRay GraphDean Michael Berris2017-01-252-89/+345
| | | | | | | | | | | | | | | | | | Summary: A patch to enable the llvm-xray graph subcommand to color edges and vertices based on statistics and to annotate vertices with statistics. Depends on D27243 Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28225 llvm-svn: 293031
* Remove pid_t usage from llvm-xrayPavel Labath2017-01-171-1/+3
| | | | | | This type is not available on windows. llvm-svn: 292206
* Add missing header to see if that clears up the buildDavid Blaikie2017-01-161-0/+1
| | | | llvm-svn: 292166
* Attempt to fix the MSVC build by using llvm::errc instead of std::errcDavid Blaikie2017-01-161-4/+4
| | | | llvm-svn: 292163
* [XRay] Implement the `llvm-xray graph` subcommandDavid Blaikie2017-01-163-0/+495
| | | | | | | | | | | | Here we define the `graph` subcommand which generates a graph from the function call information and uses it to present the call information graphically with additional annotations. Reviewers: dblaikie, dberris Differential Revision: https://reviews.llvm.org/D27243 llvm-svn: 292156
* [llvm-xray] Fix android buildPavel Labath2017-01-161-1/+2
| | | | | | | | | std::to_string is not available in the android ndk. Using llvm::to_string instead. Committing as obvious. llvm-svn: 292143
* xray-account: Avoid std::errc::bad_message to appease mingw.NAKAMURA Takumi2017-01-131-1/+1
| | | | llvm-svn: 291863
* Avoid std::errc::protocol_* to appease mingwHans Wennborg2017-01-122-2/+2
| | | | | | Like r291636 and r285261. llvm-svn: 291786
* Fix windows buildbots building llvm-xraySimon Pilgrim2017-01-122-8/+13
| | | | | | | | | | 2 issues: 1 - replaced unix-style pid_t with cross-platform llvm::sys::ProcessInfo::ProcessId 2 - fixed shadow variable warning in lambda expression Reviewed by @filcab llvm-svn: 291760
* [XRay] Include <numeric> for std::accumulate.Dean Michael Berris2017-01-121-0/+1
| | | | | | Fix-up following D24377. llvm-svn: 291750
* [XRay] Implement the `llvm-xray account` subcommandDean Michael Berris2017-01-124-0/+691
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the third of a multi-part change to implement subcommands for the `llvm-xray` tool. Here we define the `account` subcommand which does simple function call accounting, generating basic statistics on function calls we find in an XRay log/trace. We support text output and csv output for this subcommand. This change also supports sorting, summing, and filtering the top N results. Part of this tool will later be turned into a library that could be used for basic function call accounting. Depends on D24376. Reviewers: dblaikie, echristo Subscribers: mehdi_amini, dberris, beanz, llvm-commits Differential Revision: https://reviews.llvm.org/D24377 llvm-svn: 291749
* [XRay] Define the library for XRay trace logsDean Michael Berris2017-01-117-422/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In this change we move the definition of the log reading routines from the tools directory in LLVM to {include/llvm,lib}/XRay. We improve the documentation a little bit for the publicly accessible headers, and adjust the top-matter. This also leads to some refactoring and cleanup in the tooling code. In particular, we do the following: - Rename the class from LogReader to Trace, as it better represents the logical set of records as opposed to a log. - Use file type detection instead of asking the user to say what format the input file is. This allows us to keep the interface simple and encapsulate the logic of loading the data appropriately. In future changes we increase the API surface and write dedicated unit tests for the XRay library. Depends on D24376. Reviewers: dblaikie, echristo Subscribers: mehdi_amini, mgorny, llvm-commits, varno Differential Revision: https://reviews.llvm.org/D28345 llvm-svn: 291652
* tools/llvm-xray: Avoid std::errc::protocol_* to appease mingw, like r285261.NAKAMURA Takumi2017-01-113-3/+3
| | | | | | They are oriented from winsock and mingw doesn't import them. llvm-svn: 291636
* [XRay] Fixup includes for modules buildDean Michael Berris2017-01-101-2/+0
| | | | | | | | Remove unnecessary system header include. Follow-up to D24376. llvm-svn: 291533
* [XRay] Don't include <unistd.h> unnecessarilyDean Michael Berris2017-01-101-1/+0
| | | | | | Follow-up to D24376. llvm-svn: 291531
* [XRay] Implement `llvm-xray convert` -- trace file conversionDean Michael Berris2017-01-1010-7/+813
| | | | | | | | | | | | | | | | | | | | 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-1/+0
| | | | llvm-svn: 285171
* [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-267-0/+460
| | | | | | | | | | | | | | | | | | | | 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-267-460/+0
| | | | | | Reverts r285155 -- misconfigured tests. llvm-svn: 285156
* [XRay] Implement `llvm-xray extract`, start of the llvm-xray toolDean Michael Berris2016-10-267-0/+460
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