LLVM  8.0.1
FDRRecords.cpp
Go to the documentation of this file.
1 //===- FDRRecords.cpp - XRay Flight Data Recorder Mode Records -----------===//
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 // Define types and operations on these types that represent the different kinds
11 // of records we encounter in XRay flight data recorder mode traces.
12 //
13 //===----------------------------------------------------------------------===//
14 #include "llvm/XRay/FDRRecords.h"
15 
16 namespace llvm {
17 namespace xray {
18 
25 Error PIDRecord::apply(RecordVisitor &V) { return V.visit(*this); }
31 
33  switch (K) {
35  return "Metadata";
37  return "Metadata:BufferExtents";
39  return "Metadata:WallClockTime";
41  return "Metadata:NewCPUId";
43  return "Metadata:TSCWrap";
45  return "Metadata:CustomEvent";
47  return "Metadata:CustomEventV5";
49  return "Metadata:CallArg";
51  return "Metadata:PIDEntry";
53  return "Metadata:NewBuffer";
55  return "Metadata:EndOfBuffer";
57  return "Metadata:TypedEvent";
59  return "Metadata:LastMetadata";
61  return "Function";
62  }
63  return "Unknown";
64 }
65 
66 } // namespace xray
67 } // namespace llvm
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:28
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:29
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:23
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:20
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:25
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:21
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:27
virtual Error visit(BufferExtents &)=0
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:30
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:22
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:26
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:19
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:24
static StringRef kindToString(RecordKind K)
Definition: FDRRecords.cpp:32