1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/include/llvm/XRay
Dean Michael Berris 005b3bfebc [XRay][compiler-rt] FDRLogWriter Abstraction
Summary:
This change introduces an `FDRLogWriter` type which is responsible for
serialising metadata and function records to character buffers. This is
the first step in a refactoring of the implementation of the FDR runtime
to allow for more granular testing of the individual components of the
implementation.

The main contribution of this change is a means of hiding the details of
how specific records are written to a buffer, and for managing the
extents of these buffers. We make use of C++ features (templates and
some metaprogramming) to reduce repetition in the act of writing out
specific kinds of records to the buffer.

In this process, we make a number of changes across both LLVM and
compiler-rt to allow us to use the `Trace` abstraction defined in the
LLVM project in the testing of the runtime implementation. This gives us
a closer end-to-end test which version-locks the runtime implementation
with the loading implementation in LLVM.

We also allow using gmock in compiler-rt unit tests, by adding the
requisite definitions in the `AddCompilerRT.cmake` module. We also add
the terminfo library detection along with inclusion of the appropriate
compiler flags for header include lookup.

Finally, we've gone ahead and updated the FDR logging implementation to
use the FDRLogWriter for the lowest-level record-writing details.

Following patches will isolate the state machine transitions which
manage the set-up and tear-down of the buffers we're using in multiple
threads.

Reviewers: mboerger, eizan

Subscribers: mgorny, jfb, llvm-commits

Differential Revision: https://reviews.llvm.org/D52220

llvm-svn: 342617
2018-09-20 05:22:37 +00:00
..
BlockIndexer.h [XRay] Bug fixes for FDR custom event and arg-logging 2018-09-13 09:25:42 +00:00
BlockPrinter.h [XRay] Add the llvm-xray fdr-dump implementation 2018-09-11 00:22:53 +00:00
BlockVerifier.h [XRay] Add a BlockVerifier visitor for FDR Records 2018-09-10 02:35:25 +00:00
FDRLogBuilder.h [XRay] FDRTraceWriter and FDR Trace Loading 2018-08-30 07:22:21 +00:00
FDRRecordConsumer.h [XRay] FDR Record Producer/Consumer Implementation 2018-08-31 08:04:56 +00:00
FDRRecordProducer.h [XRay] FDR Record Producer/Consumer Implementation 2018-08-31 08:04:56 +00:00
FDRRecords.h [XRay] Add TSC to NewCPUId Records 2018-09-11 06:36:51 +00:00
FDRTraceExpander.h [XRay] Ensure lambda outlives llvm::function_ref 2018-09-11 08:03:30 +00:00
FDRTraceWriter.h [XRay] Make the FDRTraceWriter Endian-aware 2018-08-31 16:08:38 +00:00
FileHeaderReader.h [XRay] Refactor file header reading (NFC) 2018-08-22 07:37:55 +00:00
Graph.h
InstrumentationMap.h
Profile.h [XRay][llvm] Load XRay Profiles 2018-08-30 01:43:22 +00:00
RecordPrinter.h [XRay] Add a RecordPrinter visitor for FDR Records 2018-09-05 06:57:23 +00:00
Trace.h [XRay][compiler-rt] FDRLogWriter Abstraction 2018-09-20 05:22:37 +00:00
XRayRecord.h
YAMLXRayRecord.h