Flutter Engine
The Flutter Engine
trace_packet.pbzero.h
Go to the documentation of this file.
1// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5// IMPORTANT: This file should only ever be modified by modifying the
6// corresponding .proto file and then running
7// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root
8// directory.
9// Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
10
11#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACE_PACKET_PROTO_H_
12#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACE_PACKET_PROTO_H_
13
14#include <stddef.h>
15#include <stdint.h>
16
17#include "perfetto/protozero/field_writer.h"
18#include "perfetto/protozero/message.h"
19#include "perfetto/protozero/packed_repeated_fields.h"
20#include "perfetto/protozero/proto_decoder.h"
21#include "perfetto/protozero/proto_utils.h"
22
23namespace perfetto {
24namespace protos {
25namespace pbzero {
26
27class ClockSnapshot;
28class InternedData;
29class PerfSample;
30class TrackDescriptor;
31class TrackEvent;
32
33namespace perfetto_pbzero_enum_TracePacket {
34enum SequenceFlags : int32_t {
38};
39} // namespace perfetto_pbzero_enum_TracePacket
42
47
48PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE
51 switch (value) {
53 return "SEQ_UNSPECIFIED";
54
57 return "SEQ_INCREMENTAL_STATE_CLEARED";
58
61 return "SEQ_NEEDS_INCREMENTAL_STATE";
62 }
63 return "PBZERO_UNKNOWN_ENUM_VALUE";
64}
65
66class TracePacket_Decoder : public ::protozero::TypedProtoDecoder<
67 /*MAX_FIELD_ID=*/66,
68 /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
69 public:
70 TracePacket_Decoder(const uint8_t* data, size_t len)
71 : TypedProtoDecoder(data, len) {}
72 explicit TracePacket_Decoder(const std::string& raw)
73 : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()),
74 raw.size()) {}
75 explicit TracePacket_Decoder(const ::protozero::ConstBytes& raw)
76 : TypedProtoDecoder(raw.data, raw.size) {}
77 bool has_timestamp() const { return at<8>().valid(); }
78 uint64_t timestamp() const { return at<8>().as_uint64(); }
79 bool has_timestamp_clock_id() const { return at<58>().valid(); }
80 uint32_t timestamp_clock_id() const { return at<58>().as_uint32(); }
81 bool has_clock_snapshot() const { return at<6>().valid(); }
82 ::protozero::ConstBytes clock_snapshot() const { return at<6>().as_bytes(); }
83 bool has_track_event() const { return at<11>().valid(); }
84 ::protozero::ConstBytes track_event() const { return at<11>().as_bytes(); }
85 bool has_track_descriptor() const { return at<60>().valid(); }
86 ::protozero::ConstBytes track_descriptor() const {
87 return at<60>().as_bytes();
88 }
89 bool has_perf_sample() const { return at<66>().valid(); }
90 ::protozero::ConstBytes perf_sample() const { return at<66>().as_bytes(); }
91 bool has_trusted_packet_sequence_id() const { return at<10>().valid(); }
92 uint32_t trusted_packet_sequence_id() const { return at<10>().as_uint32(); }
93 bool has_interned_data() const { return at<12>().valid(); }
94 ::protozero::ConstBytes interned_data() const { return at<12>().as_bytes(); }
95 bool has_sequence_flags() const { return at<13>().valid(); }
96 uint32_t sequence_flags() const { return at<13>().as_uint32(); }
97};
98
99class TracePacket : public ::protozero::Message {
100 public:
102 enum : int32_t {
112 };
113 static constexpr const char* GetName() {
114 return ".perfetto.protos.TracePacket";
115 }
116
118 static inline const char* SequenceFlags_Name(SequenceFlags value) {
120 }
126
127 using FieldMetadata_Timestamp = ::protozero::proto_utils::FieldMetadata<
128 8,
129 ::protozero::proto_utils::RepetitionType::kNotRepeated,
131 uint64_t,
133
134 // Ceci n'est pas une pipe.
135 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
136 // type (and users are expected to use it as such, hence kCamelCase name).
137 // It is declared as a function to keep protozero bindings header-only as
138 // inline constexpr variables are not available until C++17 (while inline
139 // functions are).
140 // TODO(altimin): Use inline variable instead after adopting C++17.
141 static constexpr FieldMetadata_Timestamp kTimestamp() { return {}; }
142 void set_timestamp(uint64_t value) {
143 static constexpr uint32_t field_id = FieldMetadata_Timestamp::kFieldId;
144 // Call the appropriate protozero::Message::Append(field_id, ...)
145 // method based on the type of the field.
146 ::protozero::internal::FieldWriter<
148 field_id,
149 value);
150 }
151
153 ::protozero::proto_utils::FieldMetadata<
154 58,
155 ::protozero::proto_utils::RepetitionType::kNotRepeated,
157 uint32_t,
159
160 // Ceci n'est pas une pipe.
161 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
162 // type (and users are expected to use it as such, hence kCamelCase name).
163 // It is declared as a function to keep protozero bindings header-only as
164 // inline constexpr variables are not available until C++17 (while inline
165 // functions are).
166 // TODO(altimin): Use inline variable instead after adopting C++17.
168 return {};
169 }
171 static constexpr uint32_t field_id =
172 FieldMetadata_TimestampClockId::kFieldId;
173 // Call the appropriate protozero::Message::Append(field_id, ...)
174 // method based on the type of the field.
175 ::protozero::internal::FieldWriter<
177 field_id,
178 value);
179 }
180
181 using FieldMetadata_ClockSnapshot = ::protozero::proto_utils::FieldMetadata<
182 6,
183 ::protozero::proto_utils::RepetitionType::kNotRepeated,
184 ::protozero::proto_utils::ProtoSchemaType::kMessage,
187
188 // Ceci n'est pas une pipe.
189 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
190 // type (and users are expected to use it as such, hence kCamelCase name).
191 // It is declared as a function to keep protozero bindings header-only as
192 // inline constexpr variables are not available until C++17 (while inline
193 // functions are).
194 // TODO(altimin): Use inline variable instead after adopting C++17.
195 static constexpr FieldMetadata_ClockSnapshot kClockSnapshot() { return {}; }
196 template <typename T = ClockSnapshot>
198 return BeginNestedMessage<T>(6);
199 }
200
201 using FieldMetadata_TrackEvent = ::protozero::proto_utils::FieldMetadata<
202 11,
203 ::protozero::proto_utils::RepetitionType::kNotRepeated,
204 ::protozero::proto_utils::ProtoSchemaType::kMessage,
207
208 // Ceci n'est pas une pipe.
209 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
210 // type (and users are expected to use it as such, hence kCamelCase name).
211 // It is declared as a function to keep protozero bindings header-only as
212 // inline constexpr variables are not available until C++17 (while inline
213 // functions are).
214 // TODO(altimin): Use inline variable instead after adopting C++17.
215 static constexpr FieldMetadata_TrackEvent kTrackEvent() { return {}; }
216 template <typename T = TrackEvent>
218 return BeginNestedMessage<T>(11);
219 }
220
221 using FieldMetadata_TrackDescriptor = ::protozero::proto_utils::FieldMetadata<
222 60,
223 ::protozero::proto_utils::RepetitionType::kNotRepeated,
224 ::protozero::proto_utils::ProtoSchemaType::kMessage,
227
228 // Ceci n'est pas une pipe.
229 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
230 // type (and users are expected to use it as such, hence kCamelCase name).
231 // It is declared as a function to keep protozero bindings header-only as
232 // inline constexpr variables are not available until C++17 (while inline
233 // functions are).
234 // TODO(altimin): Use inline variable instead after adopting C++17.
236 return {};
237 }
238 template <typename T = TrackDescriptor>
240 return BeginNestedMessage<T>(60);
241 }
242
243 using FieldMetadata_PerfSample = ::protozero::proto_utils::FieldMetadata<
244 66,
245 ::protozero::proto_utils::RepetitionType::kNotRepeated,
246 ::protozero::proto_utils::ProtoSchemaType::kMessage,
249
250 // Ceci n'est pas une pipe.
251 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
252 // type (and users are expected to use it as such, hence kCamelCase name).
253 // It is declared as a function to keep protozero bindings header-only as
254 // inline constexpr variables are not available until C++17 (while inline
255 // functions are).
256 // TODO(altimin): Use inline variable instead after adopting C++17.
257 static constexpr FieldMetadata_PerfSample kPerfSample() { return {}; }
258 template <typename T = PerfSample>
260 return BeginNestedMessage<T>(66);
261 }
262
264 ::protozero::proto_utils::FieldMetadata<
265 10,
266 ::protozero::proto_utils::RepetitionType::kNotRepeated,
268 uint32_t,
270
271 // Ceci n'est pas une pipe.
272 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
273 // type (and users are expected to use it as such, hence kCamelCase name).
274 // It is declared as a function to keep protozero bindings header-only as
275 // inline constexpr variables are not available until C++17 (while inline
276 // functions are).
277 // TODO(altimin): Use inline variable instead after adopting C++17.
280 return {};
281 }
283 static constexpr uint32_t field_id =
284 FieldMetadata_TrustedPacketSequenceId::kFieldId;
285 // Call the appropriate protozero::Message::Append(field_id, ...)
286 // method based on the type of the field.
287 ::protozero::internal::FieldWriter<
289 field_id,
290 value);
291 }
292
293 using FieldMetadata_InternedData = ::protozero::proto_utils::FieldMetadata<
294 12,
295 ::protozero::proto_utils::RepetitionType::kNotRepeated,
296 ::protozero::proto_utils::ProtoSchemaType::kMessage,
299
300 // Ceci n'est pas une pipe.
301 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
302 // type (and users are expected to use it as such, hence kCamelCase name).
303 // It is declared as a function to keep protozero bindings header-only as
304 // inline constexpr variables are not available until C++17 (while inline
305 // functions are).
306 // TODO(altimin): Use inline variable instead after adopting C++17.
307 static constexpr FieldMetadata_InternedData kInternedData() { return {}; }
308 template <typename T = InternedData>
310 return BeginNestedMessage<T>(12);
311 }
312
313 using FieldMetadata_SequenceFlags = ::protozero::proto_utils::FieldMetadata<
314 13,
315 ::protozero::proto_utils::RepetitionType::kNotRepeated,
317 uint32_t,
319
320 // Ceci n'est pas une pipe.
321 // This is actually a variable of FieldMetadataHelper<FieldMetadata<...>>
322 // type (and users are expected to use it as such, hence kCamelCase name).
323 // It is declared as a function to keep protozero bindings header-only as
324 // inline constexpr variables are not available until C++17 (while inline
325 // functions are).
326 // TODO(altimin): Use inline variable instead after adopting C++17.
327 static constexpr FieldMetadata_SequenceFlags kSequenceFlags() { return {}; }
328 void set_sequence_flags(uint32_t value) {
329 static constexpr uint32_t field_id = FieldMetadata_SequenceFlags::kFieldId;
330 // Call the appropriate protozero::Message::Append(field_id, ...)
331 // method based on the type of the field.
332 ::protozero::internal::FieldWriter<
334 field_id,
335 value);
336 }
337};
338
339} // namespace pbzero
340} // namespace protos
341} // namespace perfetto
342#endif // Include guard.
::protozero::ConstBytes track_event() const
::protozero::ConstBytes perf_sample() const
::protozero::ConstBytes clock_snapshot() const
::protozero::ConstBytes track_descriptor() const
TracePacket_Decoder(const ::protozero::ConstBytes &raw)
TracePacket_Decoder(const uint8_t *data, size_t len)
::protozero::ConstBytes interned_data() const
::protozero::proto_utils::FieldMetadata< 6, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kMessage, ClockSnapshot, TracePacket > FieldMetadata_ClockSnapshot
::protozero::proto_utils::FieldMetadata< 11, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kMessage, TrackEvent, TracePacket > FieldMetadata_TrackEvent
static constexpr FieldMetadata_TimestampClockId kTimestampClockId()
static const SequenceFlags SEQ_NEEDS_INCREMENTAL_STATE
void set_trusted_packet_sequence_id(uint32_t value)
static constexpr const char * GetName()
static constexpr FieldMetadata_ClockSnapshot kClockSnapshot()
::protozero::proto_utils::FieldMetadata< 13, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kUint32, uint32_t, TracePacket > FieldMetadata_SequenceFlags
::protozero::proto_utils::FieldMetadata< 60, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kMessage, TrackDescriptor, TracePacket > FieldMetadata_TrackDescriptor
::protozero::proto_utils::FieldMetadata< 66, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kMessage, PerfSample, TracePacket > FieldMetadata_PerfSample
::protozero::proto_utils::FieldMetadata< 58, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kUint32, uint32_t, TracePacket > FieldMetadata_TimestampClockId
::protozero::proto_utils::FieldMetadata< 12, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kMessage, InternedData, TracePacket > FieldMetadata_InternedData
static const SequenceFlags SEQ_UNSPECIFIED
static constexpr FieldMetadata_TrackEvent kTrackEvent()
static const SequenceFlags SEQ_INCREMENTAL_STATE_CLEARED
static constexpr FieldMetadata_PerfSample kPerfSample()
::protozero::proto_utils::FieldMetadata< 10, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kUint32, uint32_t, TracePacket > FieldMetadata_TrustedPacketSequenceId
static constexpr FieldMetadata_InternedData kInternedData()
::protozero::proto_utils::FieldMetadata< 8, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kUint64, uint64_t, TracePacket > FieldMetadata_Timestamp
static const char * SequenceFlags_Name(SequenceFlags value)
static constexpr FieldMetadata_TrustedPacketSequenceId kTrustedPacketSequenceId()
static constexpr FieldMetadata_Timestamp kTimestamp()
static constexpr FieldMetadata_TrackDescriptor kTrackDescriptor()
static constexpr FieldMetadata_SequenceFlags kSequenceFlags()
uint8_t value
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
constexpr TracePacket_SequenceFlags TracePacket_SequenceFlags_MIN
PERFETTO_PROTOZERO_CONSTEXPR14_OR_INLINE const char * TracePacket_SequenceFlags_Name(::perfetto::protos::pbzero::TracePacket_SequenceFlags value)
perfetto_pbzero_enum_TracePacket::SequenceFlags TracePacket_SequenceFlags
constexpr TracePacket_SequenceFlags TracePacket_SequenceFlags_MAX
#define T
Definition: precompiler.cc:65
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63