]> granicus.if.org Git - llvm/commit
[XRay] Define the library for XRay trace logs
authorDean Michael Berris <dberris@google.com>
Wed, 11 Jan 2017 06:39:09 +0000 (06:39 +0000)
committerDean Michael Berris <dberris@google.com>
Wed, 11 Jan 2017 06:39:09 +0000 (06:39 +0000)
commit14cdbca6b8d17a0757fc5930cc77b542fe7c6445
tree38116311132302f1b91ecf031301102f6075ab25
parentd27a39a962d108a01145667cfdfc1ff65c338b81
[XRay] Define the library for XRay trace logs

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291652 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/XRay/Trace.h [new file with mode: 0644]
include/llvm/XRay/XRayRecord.h [new file with mode: 0644]
include/llvm/XRay/YAMLXRayRecord.h [moved from tools/llvm-xray/xray-record-yaml.h with 86% similarity]
lib/CMakeLists.txt
lib/XRay/CMakeLists.txt [new file with mode: 0644]
lib/XRay/Trace.cpp [moved from tools/llvm-xray/xray-log-reader.cc with 65% similarity]
test/tools/llvm-xray/X86/convert-roundtrip.yaml
tools/llvm-xray/CMakeLists.txt
tools/llvm-xray/xray-converter.cc
tools/llvm-xray/xray-converter.h
tools/llvm-xray/xray-log-reader.h [deleted file]
tools/llvm-xray/xray-record.h [deleted file]