1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/lib
Dean Michael Berris dc767da403 [XRay] FDRTraceWriter and FDR Trace Loading
Summary:
This is the first step in the larger refactoring and reduction of
D50441.

This step in the process does the following:

- Introduces more granular types of `Record`s representing the many
  kinds of records written/read by the Flight Data Recorder (FDR) mode
  `Trace` loading function(s).

- Introduces an abstract `RecordVisitor` type meant to handle the
  processing of the various `Record` derived types. This `RecordVisitor`
  has two implementations in this patch: `RecordInitializer` and
  `FDRTraceWriter`.

- We also introduce a convenience interface for building a collection of
  `Record` instances called a `LogBuilder`. This allows us to generate
  sequences of `Record` instances manually (used in unit tests but
  useful otherwise).

- The`FDRTraceWriter` class implements the `RecordVisitor` interface and
  handles the writing of metadata records to a `raw_ostream`. We
  demonstrate that in the unit test, we can generate in-memory FDR mode
  traces using the specific `Record` derived types, which we load
  through the `loadTrace(...)` function yielding valid `Trace` objects.

This patch introduces the required types and concepts for us to start
replacing the logic implemented in the `loadFDRLog` function to use the
more granular types. In subsequent patches, we will introduce more
visitor implementations which isolate the verification, printing,
indexing, production/consumption, and finally the conversion of the FDR
mode logs.

The overarching goal of these changes is to make handling FDR mode logs
better tested, more understandable, more extensible, and more
systematic. This will also allow us to better represent the execution
trace, as we improve the fidelity of the events we represent in an XRay
`Trace` object, which we intend to do after FDR mode log processing is
in better shape.

Reviewers: eizan

Reviewed By: eizan

Subscribers: mgorny, hiraditya, llvm-commits

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

llvm-svn: 341029
2018-08-30 07:22:21 +00:00
..
Analysis [NFC] Move OrderedInstructions and InstructionPrecedenceTracking to Analysis 2018-08-30 04:49:03 +00:00
AsmParser [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
BinaryFormat Fix undefined behavior in r340457 2018-08-23 02:51:09 +00:00
Bitcode [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
CodeGen Don't count debug instructions towards neighborhood count 2018-08-30 07:18:19 +00:00
DebugInfo [DWARF] Unify warning callbacks. NFC. 2018-08-23 12:43:33 +00:00
Demangle [MS Demangler] Fix several crashes and demangling bugs. 2018-08-29 23:56:09 +00:00
ExecutionEngine [ORC] Replace lookupFlags in JITSymbolResolver with getResponsibilitySet. 2018-08-28 21:18:05 +00:00
Fuzzer
FuzzMutate [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
IR [NFC] Make getPreferredAlignment honor section markings. 2018-08-29 23:46:26 +00:00
IRReader
LineEditor
Linker [NFC] Remove an empty line. 2018-07-27 06:50:45 +00:00
LTO Remove trailing space 2018-07-30 19:41:25 +00:00
MC [MC] fix a clang-tidy warning, NFC 2018-08-29 10:40:51 +00:00
Object [COFF] Expose an easier helper function for getting names for relocation types 2018-08-27 08:42:39 +00:00
ObjectYAML [yaml2obj] - Add a support for changing EntSize. 2018-08-07 08:11:38 +00:00
Option Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
Passes Revert r340922 "[GVNHoist] Re-enable GVNHoist by default" 2018-08-29 13:00:55 +00:00
ProfileData [Coverage] Ignore 'unused' functions with non-zero execution counts 2018-08-07 22:25:36 +00:00
Support Start reserving x18 by default on Android targets. 2018-08-29 01:38:47 +00:00
TableGen Remove trailing space 2018-07-30 19:41:25 +00:00
Target [X86] Improved sched model for X86 CMPXCHG* instructions. 2018-08-30 06:26:00 +00:00
Testing
ToolDrivers Give llvm-lib rudimentary help output. 2018-07-14 02:29:44 +00:00
Transforms [NFC] Move OrderedInstructions and InstructionPrecedenceTracking to Analysis 2018-08-30 04:49:03 +00:00
WindowsManifest
XRay [XRay] FDRTraceWriter and FDR Trace Loading 2018-08-30 07:22:21 +00:00
CMakeLists.txt
LLVMBuild.txt