12#ifndef LLVM_XRAY_YAMLXRAYRECORD_H
13#define LLVM_XRAY_YAMLXRAYRECORD_H
55template <>
struct ScalarEnumerationTraits<xray::RecordTypes> {
57 IO.enumCase(
Type,
"function-enter", xray::RecordTypes::ENTER);
58 IO.enumCase(
Type,
"function-exit", xray::RecordTypes::EXIT);
59 IO.enumCase(
Type,
"function-tail-exit", xray::RecordTypes::TAIL_EXIT);
60 IO.enumCase(
Type,
"function-enter-arg", xray::RecordTypes::ENTER_ARG);
61 IO.enumCase(
Type,
"custom-event", xray::RecordTypes::CUSTOM_EVENT);
62 IO.enumCase(
Type,
"typed-event", xray::RecordTypes::TYPED_EVENT);
68 IO.mapRequired(
"version", Header.Version);
69 IO.mapRequired(
"type", Header.Type);
70 IO.mapRequired(
"constant-tsc", Header.ConstantTSC);
71 IO.mapRequired(
"nonstop-tsc", Header.NonstopTSC);
72 IO.mapRequired(
"cycle-frequency", Header.CycleFrequency);
78 IO.mapRequired(
"type",
Record.RecordType);
79 IO.mapOptional(
"func-id",
Record.FuncId);
80 IO.mapOptional(
"function",
Record.Function);
81 IO.mapOptional(
"args",
Record.CallArgs);
82 IO.mapRequired(
"cpu",
Record.CPU);
83 IO.mapOptional(
"thread",
Record.TId, 0U);
84 IO.mapOptional(
"process",
Record.PId, 0U);
85 IO.mapRequired(
"kind",
Record.Type);
86 IO.mapRequired(
"tsc",
Record.TSC);
87 IO.mapOptional(
"data",
Record.Data);
90 static constexpr bool flow =
true;
97 IO.mapRequired(
"header",
Trace.Header);
98 IO.mapRequired(
"records",
Trace.Records);
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
The instances of the Type class are immutable: once they are created, they are never changed.
RecordTypes
Determines the supported types of records that could be seen in XRay traces.
This is an optimization pass for GlobalISel generic memory operations.
std::vector< uint64_t > CallArgs
std::vector< YAMLXRayRecord > Records
YAMLXRayFileHeader Header
static void mapping(IO &IO, xray::YAMLXRayRecord &Record)
static void mapping(IO &IO, xray::YAMLXRayTrace &Trace)
static void enumeration(IO &IO, xray::RecordTypes &Type)