LLVM 20.0.0git
FDRRecords.cpp
Go to the documentation of this file.
1//===- FDRRecords.cpp - XRay Flight Data Recorder Mode Records -----------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Define types and operations on these types that represent the different kinds
10// of records we encounter in XRay flight data recorder mode traces.
11//
12//===----------------------------------------------------------------------===//
14
15namespace llvm {
16namespace xray {
17
18Error BufferExtents::apply(RecordVisitor &V) { return V.visit(*this); }
19Error WallclockRecord::apply(RecordVisitor &V) { return V.visit(*this); }
20Error NewCPUIDRecord::apply(RecordVisitor &V) { return V.visit(*this); }
21Error TSCWrapRecord::apply(RecordVisitor &V) { return V.visit(*this); }
22Error CustomEventRecord::apply(RecordVisitor &V) { return V.visit(*this); }
23Error CallArgRecord::apply(RecordVisitor &V) { return V.visit(*this); }
24Error PIDRecord::apply(RecordVisitor &V) { return V.visit(*this); }
25Error NewBufferRecord::apply(RecordVisitor &V) { return V.visit(*this); }
26Error EndBufferRecord::apply(RecordVisitor &V) { return V.visit(*this); }
27Error FunctionRecord::apply(RecordVisitor &V) { return V.visit(*this); }
28Error CustomEventRecordV5::apply(RecordVisitor &V) { return V.visit(*this); }
29Error TypedEventRecord::apply(RecordVisitor &V) { return V.visit(*this); }
30
32 switch (K) {
34 return "Metadata";
36 return "Metadata:BufferExtents";
38 return "Metadata:WallClockTime";
40 return "Metadata:NewCPUId";
42 return "Metadata:TSCWrap";
44 return "Metadata:CustomEvent";
46 return "Metadata:CustomEventV5";
48 return "Metadata:CallArg";
50 return "Metadata:PIDEntry";
52 return "Metadata:NewBuffer";
54 return "Metadata:EndOfBuffer";
56 return "Metadata:TypedEvent";
58 return "Metadata:LastMetadata";
60 return "Function";
61 }
62 return "Unknown";
63}
64
65} // namespace xray
66} // namespace llvm
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:18
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:23
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:28
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:27
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:25
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:20
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:24
static StringRef kindToString(RecordKind K)
Definition: FDRRecords.cpp:31
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:21
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:29
Error apply(RecordVisitor &V) override
Definition: FDRRecords.cpp:19
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18