LLVM  8.0.1
RecordPrinter.h
Go to the documentation of this file.
1 //===- RecordPrinter.h - FDR Record Printer -------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // An implementation of the RecordVisitor which prints an individual record's
11 // data in an adhoc format, suitable for human inspection.
12 //
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_INCLUDE_LLVM_XRAY_RECORDPRINTER_H_
15 #define LLVM_INCLUDE_LLVM_XRAY_RECORDPRINTER_H_
16 
18 #include "llvm/XRay/FDRRecords.h"
19 
20 namespace llvm {
21 namespace xray {
22 
23 class RecordPrinter : public RecordVisitor {
24  raw_ostream &OS;
25  std::string Delim;
26 
27 public:
28  explicit RecordPrinter(raw_ostream &O, std::string D)
29  : RecordVisitor(), OS(O), Delim(std::move(D)) {}
30 
31  explicit RecordPrinter(raw_ostream &O) : RecordPrinter(O, ""){};
32 
33  Error visit(BufferExtents &) override;
34  Error visit(WallclockRecord &) override;
35  Error visit(NewCPUIDRecord &) override;
36  Error visit(TSCWrapRecord &) override;
37  Error visit(CustomEventRecord &) override;
38  Error visit(CallArgRecord &) override;
39  Error visit(PIDRecord &) override;
40  Error visit(NewBufferRecord &) override;
41  Error visit(EndBufferRecord &) override;
42  Error visit(FunctionRecord &) override;
43  Error visit(CustomEventRecordV5 &) override;
44  Error visit(TypedEventRecord &) override;
45 };
46 
47 } // namespace xray
48 } // namespace llvm
49 
50 #endif // LLVM_INCLUDE_LLVM_XRAY_RECORDPRINTER_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Definition: BitVector.h:938
RecordPrinter(raw_ostream &O)
Definition: RecordPrinter.h:31
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
RecordPrinter(raw_ostream &O, std::string D)
Definition: RecordPrinter.h:28
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
Error visit(BufferExtents &) override