1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/panel.proto
3 
4 #include "protos/perfetto/trace/ftrace/panel.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace perfetto {
22 namespace protos {
DsiCmdFifoStatusFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR DsiCmdFifoStatusFtraceEvent::DsiCmdFifoStatusFtraceEvent(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.header_)*/0u
28   , /*decltype(_impl_.payload_)*/0u} {}
29 struct DsiCmdFifoStatusFtraceEventDefaultTypeInternal {
DsiCmdFifoStatusFtraceEventDefaultTypeInternalperfetto::protos::DsiCmdFifoStatusFtraceEventDefaultTypeInternal30   PROTOBUF_CONSTEXPR DsiCmdFifoStatusFtraceEventDefaultTypeInternal()
31       : _instance(::_pbi::ConstantInitialized{}) {}
~DsiCmdFifoStatusFtraceEventDefaultTypeInternalperfetto::protos::DsiCmdFifoStatusFtraceEventDefaultTypeInternal32   ~DsiCmdFifoStatusFtraceEventDefaultTypeInternal() {}
33   union {  // NOLINT(misc-non-private-member-variables-in-classes)
34     DsiCmdFifoStatusFtraceEvent _instance;
35   };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DsiCmdFifoStatusFtraceEventDefaultTypeInternal _DsiCmdFifoStatusFtraceEvent_default_instance_;
DsiRxFtraceEvent(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR DsiRxFtraceEvent::DsiRxFtraceEvent(
39     ::_pbi::ConstantInitialized): _impl_{
40     /*decltype(_impl_._has_bits_)*/{}
41   , /*decltype(_impl_._cached_size_)*/{}
42   , /*decltype(_impl_.cmd_)*/0u
43   , /*decltype(_impl_.rx_buf_)*/0u} {}
44 struct DsiRxFtraceEventDefaultTypeInternal {
DsiRxFtraceEventDefaultTypeInternalperfetto::protos::DsiRxFtraceEventDefaultTypeInternal45   PROTOBUF_CONSTEXPR DsiRxFtraceEventDefaultTypeInternal()
46       : _instance(::_pbi::ConstantInitialized{}) {}
~DsiRxFtraceEventDefaultTypeInternalperfetto::protos::DsiRxFtraceEventDefaultTypeInternal47   ~DsiRxFtraceEventDefaultTypeInternal() {}
48   union {  // NOLINT(misc-non-private-member-variables-in-classes)
49     DsiRxFtraceEvent _instance;
50   };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DsiRxFtraceEventDefaultTypeInternal _DsiRxFtraceEvent_default_instance_;
DsiTxFtraceEvent(::_pbi::ConstantInitialized)53 PROTOBUF_CONSTEXPR DsiTxFtraceEvent::DsiTxFtraceEvent(
54     ::_pbi::ConstantInitialized): _impl_{
55     /*decltype(_impl_._has_bits_)*/{}
56   , /*decltype(_impl_._cached_size_)*/{}
57   , /*decltype(_impl_.last_)*/0u
58   , /*decltype(_impl_.tx_buf_)*/0u
59   , /*decltype(_impl_.type_)*/0u} {}
60 struct DsiTxFtraceEventDefaultTypeInternal {
DsiTxFtraceEventDefaultTypeInternalperfetto::protos::DsiTxFtraceEventDefaultTypeInternal61   PROTOBUF_CONSTEXPR DsiTxFtraceEventDefaultTypeInternal()
62       : _instance(::_pbi::ConstantInitialized{}) {}
~DsiTxFtraceEventDefaultTypeInternalperfetto::protos::DsiTxFtraceEventDefaultTypeInternal63   ~DsiTxFtraceEventDefaultTypeInternal() {}
64   union {  // NOLINT(misc-non-private-member-variables-in-classes)
65     DsiTxFtraceEvent _instance;
66   };
67 };
68 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DsiTxFtraceEventDefaultTypeInternal _DsiTxFtraceEvent_default_instance_;
PanelWriteGenericFtraceEvent(::_pbi::ConstantInitialized)69 PROTOBUF_CONSTEXPR PanelWriteGenericFtraceEvent::PanelWriteGenericFtraceEvent(
70     ::_pbi::ConstantInitialized): _impl_{
71     /*decltype(_impl_._has_bits_)*/{}
72   , /*decltype(_impl_._cached_size_)*/{}
73   , /*decltype(_impl_.trace_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
74   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
75   , /*decltype(_impl_.pid_)*/0
76   , /*decltype(_impl_.trace_begin_)*/0u
77   , /*decltype(_impl_.type_)*/0u
78   , /*decltype(_impl_.value_)*/0} {}
79 struct PanelWriteGenericFtraceEventDefaultTypeInternal {
PanelWriteGenericFtraceEventDefaultTypeInternalperfetto::protos::PanelWriteGenericFtraceEventDefaultTypeInternal80   PROTOBUF_CONSTEXPR PanelWriteGenericFtraceEventDefaultTypeInternal()
81       : _instance(::_pbi::ConstantInitialized{}) {}
~PanelWriteGenericFtraceEventDefaultTypeInternalperfetto::protos::PanelWriteGenericFtraceEventDefaultTypeInternal82   ~PanelWriteGenericFtraceEventDefaultTypeInternal() {}
83   union {  // NOLINT(misc-non-private-member-variables-in-classes)
84     PanelWriteGenericFtraceEvent _instance;
85   };
86 };
87 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PanelWriteGenericFtraceEventDefaultTypeInternal _PanelWriteGenericFtraceEvent_default_instance_;
88 }  // namespace protos
89 }  // namespace perfetto
90 namespace perfetto {
91 namespace protos {
92 
93 // ===================================================================
94 
95 class DsiCmdFifoStatusFtraceEvent::_Internal {
96  public:
97   using HasBits = decltype(std::declval<DsiCmdFifoStatusFtraceEvent>()._impl_._has_bits_);
set_has_header(HasBits * has_bits)98   static void set_has_header(HasBits* has_bits) {
99     (*has_bits)[0] |= 1u;
100   }
set_has_payload(HasBits * has_bits)101   static void set_has_payload(HasBits* has_bits) {
102     (*has_bits)[0] |= 2u;
103   }
104 };
105 
DsiCmdFifoStatusFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)106 DsiCmdFifoStatusFtraceEvent::DsiCmdFifoStatusFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
107                          bool is_message_owned)
108   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
109   SharedCtor(arena, is_message_owned);
110   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
111 }
DsiCmdFifoStatusFtraceEvent(const DsiCmdFifoStatusFtraceEvent & from)112 DsiCmdFifoStatusFtraceEvent::DsiCmdFifoStatusFtraceEvent(const DsiCmdFifoStatusFtraceEvent& from)
113   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
114   DsiCmdFifoStatusFtraceEvent* const _this = this; (void)_this;
115   new (&_impl_) Impl_{
116       decltype(_impl_._has_bits_){from._impl_._has_bits_}
117     , /*decltype(_impl_._cached_size_)*/{}
118     , decltype(_impl_.header_){}
119     , decltype(_impl_.payload_){}};
120 
121   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
122   ::memcpy(&_impl_.header_, &from._impl_.header_,
123     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.payload_) -
124     reinterpret_cast<char*>(&_impl_.header_)) + sizeof(_impl_.payload_));
125   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
126 }
127 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)128 inline void DsiCmdFifoStatusFtraceEvent::SharedCtor(
129     ::_pb::Arena* arena, bool is_message_owned) {
130   (void)arena;
131   (void)is_message_owned;
132   new (&_impl_) Impl_{
133       decltype(_impl_._has_bits_){}
134     , /*decltype(_impl_._cached_size_)*/{}
135     , decltype(_impl_.header_){0u}
136     , decltype(_impl_.payload_){0u}
137   };
138 }
139 
~DsiCmdFifoStatusFtraceEvent()140 DsiCmdFifoStatusFtraceEvent::~DsiCmdFifoStatusFtraceEvent() {
141   // @@protoc_insertion_point(destructor:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
142   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
143   (void)arena;
144     return;
145   }
146   SharedDtor();
147 }
148 
SharedDtor()149 inline void DsiCmdFifoStatusFtraceEvent::SharedDtor() {
150   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
151 }
152 
SetCachedSize(int size) const153 void DsiCmdFifoStatusFtraceEvent::SetCachedSize(int size) const {
154   _impl_._cached_size_.Set(size);
155 }
156 
Clear()157 void DsiCmdFifoStatusFtraceEvent::Clear() {
158 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
159   ::uint32_t cached_has_bits = 0;
160   // Prevent compiler warnings about cached_has_bits being unused
161   (void) cached_has_bits;
162 
163   cached_has_bits = _impl_._has_bits_[0];
164   if (cached_has_bits & 0x00000003u) {
165     ::memset(&_impl_.header_, 0, static_cast<size_t>(
166         reinterpret_cast<char*>(&_impl_.payload_) -
167         reinterpret_cast<char*>(&_impl_.header_)) + sizeof(_impl_.payload_));
168   }
169   _impl_._has_bits_.Clear();
170   _internal_metadata_.Clear<std::string>();
171 }
172 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)173 const char* DsiCmdFifoStatusFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
174 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
175   _Internal::HasBits has_bits{};
176   while (!ctx->Done(&ptr)) {
177     ::uint32_t tag;
178     ptr = ::_pbi::ReadTag(ptr, &tag);
179     switch (tag >> 3) {
180       // optional uint32 header = 1;
181       case 1:
182         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
183           _Internal::set_has_header(&has_bits);
184           _impl_.header_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
185           CHK_(ptr);
186         } else {
187           goto handle_unusual;
188         }
189         continue;
190       // optional uint32 payload = 2;
191       case 2:
192         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
193           _Internal::set_has_payload(&has_bits);
194           _impl_.payload_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
195           CHK_(ptr);
196         } else {
197           goto handle_unusual;
198         }
199         continue;
200       default:
201         goto handle_unusual;
202     }  // switch
203   handle_unusual:
204     if ((tag == 0) || ((tag & 7) == 4)) {
205       CHK_(ptr);
206       ctx->SetLastTag(tag);
207       goto message_done;
208     }
209     ptr = UnknownFieldParse(
210         tag,
211         _internal_metadata_.mutable_unknown_fields<std::string>(),
212         ptr, ctx);
213     CHK_(ptr != nullptr);
214   }  // while
215 message_done:
216   _impl_._has_bits_.Or(has_bits);
217   return ptr;
218 failure:
219   ptr = nullptr;
220   goto message_done;
221 #undef CHK_
222 }
223 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const224 ::uint8_t* DsiCmdFifoStatusFtraceEvent::_InternalSerialize(
225     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
226   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
227   ::uint32_t cached_has_bits = 0;
228   (void) cached_has_bits;
229 
230   cached_has_bits = _impl_._has_bits_[0];
231   // optional uint32 header = 1;
232   if (cached_has_bits & 0x00000001u) {
233     target = stream->EnsureSpace(target);
234     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_header(), target);
235   }
236 
237   // optional uint32 payload = 2;
238   if (cached_has_bits & 0x00000002u) {
239     target = stream->EnsureSpace(target);
240     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_payload(), target);
241   }
242 
243   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
244     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
245         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
246   }
247   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
248   return target;
249 }
250 
ByteSizeLong() const251 size_t DsiCmdFifoStatusFtraceEvent::ByteSizeLong() const {
252 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
253   size_t total_size = 0;
254 
255   ::uint32_t cached_has_bits = 0;
256   // Prevent compiler warnings about cached_has_bits being unused
257   (void) cached_has_bits;
258 
259   cached_has_bits = _impl_._has_bits_[0];
260   if (cached_has_bits & 0x00000003u) {
261     // optional uint32 header = 1;
262     if (cached_has_bits & 0x00000001u) {
263       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_header());
264     }
265 
266     // optional uint32 payload = 2;
267     if (cached_has_bits & 0x00000002u) {
268       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_payload());
269     }
270 
271   }
272   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
273     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
274   }
275   int cached_size = ::_pbi::ToCachedSize(total_size);
276   SetCachedSize(cached_size);
277   return total_size;
278 }
279 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)280 void DsiCmdFifoStatusFtraceEvent::CheckTypeAndMergeFrom(
281     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
282   MergeFrom(*::_pbi::DownCast<const DsiCmdFifoStatusFtraceEvent*>(
283       &from));
284 }
285 
MergeFrom(const DsiCmdFifoStatusFtraceEvent & from)286 void DsiCmdFifoStatusFtraceEvent::MergeFrom(const DsiCmdFifoStatusFtraceEvent& from) {
287   DsiCmdFifoStatusFtraceEvent* const _this = this;
288   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
289   GOOGLE_DCHECK_NE(&from, _this);
290   ::uint32_t cached_has_bits = 0;
291   (void) cached_has_bits;
292 
293   cached_has_bits = from._impl_._has_bits_[0];
294   if (cached_has_bits & 0x00000003u) {
295     if (cached_has_bits & 0x00000001u) {
296       _this->_impl_.header_ = from._impl_.header_;
297     }
298     if (cached_has_bits & 0x00000002u) {
299       _this->_impl_.payload_ = from._impl_.payload_;
300     }
301     _this->_impl_._has_bits_[0] |= cached_has_bits;
302   }
303   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
304 }
305 
CopyFrom(const DsiCmdFifoStatusFtraceEvent & from)306 void DsiCmdFifoStatusFtraceEvent::CopyFrom(const DsiCmdFifoStatusFtraceEvent& from) {
307 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DsiCmdFifoStatusFtraceEvent)
308   if (&from == this) return;
309   Clear();
310   MergeFrom(from);
311 }
312 
IsInitialized() const313 bool DsiCmdFifoStatusFtraceEvent::IsInitialized() const {
314   return true;
315 }
316 
InternalSwap(DsiCmdFifoStatusFtraceEvent * other)317 void DsiCmdFifoStatusFtraceEvent::InternalSwap(DsiCmdFifoStatusFtraceEvent* other) {
318   using std::swap;
319   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
320   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
321   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
322       PROTOBUF_FIELD_OFFSET(DsiCmdFifoStatusFtraceEvent, _impl_.payload_)
323       + sizeof(DsiCmdFifoStatusFtraceEvent::_impl_.payload_)  // NOLINT
324       - PROTOBUF_FIELD_OFFSET(DsiCmdFifoStatusFtraceEvent, _impl_.header_)>(
325           reinterpret_cast<char*>(&_impl_.header_),
326           reinterpret_cast<char*>(&other->_impl_.header_));
327 }
328 
GetTypeName() const329 std::string DsiCmdFifoStatusFtraceEvent::GetTypeName() const {
330   return "perfetto.protos.DsiCmdFifoStatusFtraceEvent";
331 }
332 
333 
334 // ===================================================================
335 
336 class DsiRxFtraceEvent::_Internal {
337  public:
338   using HasBits = decltype(std::declval<DsiRxFtraceEvent>()._impl_._has_bits_);
set_has_cmd(HasBits * has_bits)339   static void set_has_cmd(HasBits* has_bits) {
340     (*has_bits)[0] |= 1u;
341   }
set_has_rx_buf(HasBits * has_bits)342   static void set_has_rx_buf(HasBits* has_bits) {
343     (*has_bits)[0] |= 2u;
344   }
345 };
346 
DsiRxFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)347 DsiRxFtraceEvent::DsiRxFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
348                          bool is_message_owned)
349   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
350   SharedCtor(arena, is_message_owned);
351   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DsiRxFtraceEvent)
352 }
DsiRxFtraceEvent(const DsiRxFtraceEvent & from)353 DsiRxFtraceEvent::DsiRxFtraceEvent(const DsiRxFtraceEvent& from)
354   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
355   DsiRxFtraceEvent* const _this = this; (void)_this;
356   new (&_impl_) Impl_{
357       decltype(_impl_._has_bits_){from._impl_._has_bits_}
358     , /*decltype(_impl_._cached_size_)*/{}
359     , decltype(_impl_.cmd_){}
360     , decltype(_impl_.rx_buf_){}};
361 
362   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
363   ::memcpy(&_impl_.cmd_, &from._impl_.cmd_,
364     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.rx_buf_) -
365     reinterpret_cast<char*>(&_impl_.cmd_)) + sizeof(_impl_.rx_buf_));
366   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DsiRxFtraceEvent)
367 }
368 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)369 inline void DsiRxFtraceEvent::SharedCtor(
370     ::_pb::Arena* arena, bool is_message_owned) {
371   (void)arena;
372   (void)is_message_owned;
373   new (&_impl_) Impl_{
374       decltype(_impl_._has_bits_){}
375     , /*decltype(_impl_._cached_size_)*/{}
376     , decltype(_impl_.cmd_){0u}
377     , decltype(_impl_.rx_buf_){0u}
378   };
379 }
380 
~DsiRxFtraceEvent()381 DsiRxFtraceEvent::~DsiRxFtraceEvent() {
382   // @@protoc_insertion_point(destructor:perfetto.protos.DsiRxFtraceEvent)
383   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
384   (void)arena;
385     return;
386   }
387   SharedDtor();
388 }
389 
SharedDtor()390 inline void DsiRxFtraceEvent::SharedDtor() {
391   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
392 }
393 
SetCachedSize(int size) const394 void DsiRxFtraceEvent::SetCachedSize(int size) const {
395   _impl_._cached_size_.Set(size);
396 }
397 
Clear()398 void DsiRxFtraceEvent::Clear() {
399 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DsiRxFtraceEvent)
400   ::uint32_t cached_has_bits = 0;
401   // Prevent compiler warnings about cached_has_bits being unused
402   (void) cached_has_bits;
403 
404   cached_has_bits = _impl_._has_bits_[0];
405   if (cached_has_bits & 0x00000003u) {
406     ::memset(&_impl_.cmd_, 0, static_cast<size_t>(
407         reinterpret_cast<char*>(&_impl_.rx_buf_) -
408         reinterpret_cast<char*>(&_impl_.cmd_)) + sizeof(_impl_.rx_buf_));
409   }
410   _impl_._has_bits_.Clear();
411   _internal_metadata_.Clear<std::string>();
412 }
413 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)414 const char* DsiRxFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
415 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
416   _Internal::HasBits has_bits{};
417   while (!ctx->Done(&ptr)) {
418     ::uint32_t tag;
419     ptr = ::_pbi::ReadTag(ptr, &tag);
420     switch (tag >> 3) {
421       // optional uint32 cmd = 1;
422       case 1:
423         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
424           _Internal::set_has_cmd(&has_bits);
425           _impl_.cmd_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
426           CHK_(ptr);
427         } else {
428           goto handle_unusual;
429         }
430         continue;
431       // optional uint32 rx_buf = 2;
432       case 2:
433         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
434           _Internal::set_has_rx_buf(&has_bits);
435           _impl_.rx_buf_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
436           CHK_(ptr);
437         } else {
438           goto handle_unusual;
439         }
440         continue;
441       default:
442         goto handle_unusual;
443     }  // switch
444   handle_unusual:
445     if ((tag == 0) || ((tag & 7) == 4)) {
446       CHK_(ptr);
447       ctx->SetLastTag(tag);
448       goto message_done;
449     }
450     ptr = UnknownFieldParse(
451         tag,
452         _internal_metadata_.mutable_unknown_fields<std::string>(),
453         ptr, ctx);
454     CHK_(ptr != nullptr);
455   }  // while
456 message_done:
457   _impl_._has_bits_.Or(has_bits);
458   return ptr;
459 failure:
460   ptr = nullptr;
461   goto message_done;
462 #undef CHK_
463 }
464 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const465 ::uint8_t* DsiRxFtraceEvent::_InternalSerialize(
466     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
467   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DsiRxFtraceEvent)
468   ::uint32_t cached_has_bits = 0;
469   (void) cached_has_bits;
470 
471   cached_has_bits = _impl_._has_bits_[0];
472   // optional uint32 cmd = 1;
473   if (cached_has_bits & 0x00000001u) {
474     target = stream->EnsureSpace(target);
475     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cmd(), target);
476   }
477 
478   // optional uint32 rx_buf = 2;
479   if (cached_has_bits & 0x00000002u) {
480     target = stream->EnsureSpace(target);
481     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_rx_buf(), target);
482   }
483 
484   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
485     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
486         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
487   }
488   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DsiRxFtraceEvent)
489   return target;
490 }
491 
ByteSizeLong() const492 size_t DsiRxFtraceEvent::ByteSizeLong() const {
493 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DsiRxFtraceEvent)
494   size_t total_size = 0;
495 
496   ::uint32_t cached_has_bits = 0;
497   // Prevent compiler warnings about cached_has_bits being unused
498   (void) cached_has_bits;
499 
500   cached_has_bits = _impl_._has_bits_[0];
501   if (cached_has_bits & 0x00000003u) {
502     // optional uint32 cmd = 1;
503     if (cached_has_bits & 0x00000001u) {
504       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cmd());
505     }
506 
507     // optional uint32 rx_buf = 2;
508     if (cached_has_bits & 0x00000002u) {
509       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_rx_buf());
510     }
511 
512   }
513   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
514     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
515   }
516   int cached_size = ::_pbi::ToCachedSize(total_size);
517   SetCachedSize(cached_size);
518   return total_size;
519 }
520 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)521 void DsiRxFtraceEvent::CheckTypeAndMergeFrom(
522     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
523   MergeFrom(*::_pbi::DownCast<const DsiRxFtraceEvent*>(
524       &from));
525 }
526 
MergeFrom(const DsiRxFtraceEvent & from)527 void DsiRxFtraceEvent::MergeFrom(const DsiRxFtraceEvent& from) {
528   DsiRxFtraceEvent* const _this = this;
529   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DsiRxFtraceEvent)
530   GOOGLE_DCHECK_NE(&from, _this);
531   ::uint32_t cached_has_bits = 0;
532   (void) cached_has_bits;
533 
534   cached_has_bits = from._impl_._has_bits_[0];
535   if (cached_has_bits & 0x00000003u) {
536     if (cached_has_bits & 0x00000001u) {
537       _this->_impl_.cmd_ = from._impl_.cmd_;
538     }
539     if (cached_has_bits & 0x00000002u) {
540       _this->_impl_.rx_buf_ = from._impl_.rx_buf_;
541     }
542     _this->_impl_._has_bits_[0] |= cached_has_bits;
543   }
544   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
545 }
546 
CopyFrom(const DsiRxFtraceEvent & from)547 void DsiRxFtraceEvent::CopyFrom(const DsiRxFtraceEvent& from) {
548 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DsiRxFtraceEvent)
549   if (&from == this) return;
550   Clear();
551   MergeFrom(from);
552 }
553 
IsInitialized() const554 bool DsiRxFtraceEvent::IsInitialized() const {
555   return true;
556 }
557 
InternalSwap(DsiRxFtraceEvent * other)558 void DsiRxFtraceEvent::InternalSwap(DsiRxFtraceEvent* other) {
559   using std::swap;
560   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
561   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
562   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
563       PROTOBUF_FIELD_OFFSET(DsiRxFtraceEvent, _impl_.rx_buf_)
564       + sizeof(DsiRxFtraceEvent::_impl_.rx_buf_)  // NOLINT
565       - PROTOBUF_FIELD_OFFSET(DsiRxFtraceEvent, _impl_.cmd_)>(
566           reinterpret_cast<char*>(&_impl_.cmd_),
567           reinterpret_cast<char*>(&other->_impl_.cmd_));
568 }
569 
GetTypeName() const570 std::string DsiRxFtraceEvent::GetTypeName() const {
571   return "perfetto.protos.DsiRxFtraceEvent";
572 }
573 
574 
575 // ===================================================================
576 
577 class DsiTxFtraceEvent::_Internal {
578  public:
579   using HasBits = decltype(std::declval<DsiTxFtraceEvent>()._impl_._has_bits_);
set_has_last(HasBits * has_bits)580   static void set_has_last(HasBits* has_bits) {
581     (*has_bits)[0] |= 1u;
582   }
set_has_tx_buf(HasBits * has_bits)583   static void set_has_tx_buf(HasBits* has_bits) {
584     (*has_bits)[0] |= 2u;
585   }
set_has_type(HasBits * has_bits)586   static void set_has_type(HasBits* has_bits) {
587     (*has_bits)[0] |= 4u;
588   }
589 };
590 
DsiTxFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)591 DsiTxFtraceEvent::DsiTxFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
592                          bool is_message_owned)
593   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
594   SharedCtor(arena, is_message_owned);
595   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DsiTxFtraceEvent)
596 }
DsiTxFtraceEvent(const DsiTxFtraceEvent & from)597 DsiTxFtraceEvent::DsiTxFtraceEvent(const DsiTxFtraceEvent& from)
598   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
599   DsiTxFtraceEvent* const _this = this; (void)_this;
600   new (&_impl_) Impl_{
601       decltype(_impl_._has_bits_){from._impl_._has_bits_}
602     , /*decltype(_impl_._cached_size_)*/{}
603     , decltype(_impl_.last_){}
604     , decltype(_impl_.tx_buf_){}
605     , decltype(_impl_.type_){}};
606 
607   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
608   ::memcpy(&_impl_.last_, &from._impl_.last_,
609     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.type_) -
610     reinterpret_cast<char*>(&_impl_.last_)) + sizeof(_impl_.type_));
611   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DsiTxFtraceEvent)
612 }
613 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)614 inline void DsiTxFtraceEvent::SharedCtor(
615     ::_pb::Arena* arena, bool is_message_owned) {
616   (void)arena;
617   (void)is_message_owned;
618   new (&_impl_) Impl_{
619       decltype(_impl_._has_bits_){}
620     , /*decltype(_impl_._cached_size_)*/{}
621     , decltype(_impl_.last_){0u}
622     , decltype(_impl_.tx_buf_){0u}
623     , decltype(_impl_.type_){0u}
624   };
625 }
626 
~DsiTxFtraceEvent()627 DsiTxFtraceEvent::~DsiTxFtraceEvent() {
628   // @@protoc_insertion_point(destructor:perfetto.protos.DsiTxFtraceEvent)
629   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
630   (void)arena;
631     return;
632   }
633   SharedDtor();
634 }
635 
SharedDtor()636 inline void DsiTxFtraceEvent::SharedDtor() {
637   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
638 }
639 
SetCachedSize(int size) const640 void DsiTxFtraceEvent::SetCachedSize(int size) const {
641   _impl_._cached_size_.Set(size);
642 }
643 
Clear()644 void DsiTxFtraceEvent::Clear() {
645 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DsiTxFtraceEvent)
646   ::uint32_t cached_has_bits = 0;
647   // Prevent compiler warnings about cached_has_bits being unused
648   (void) cached_has_bits;
649 
650   cached_has_bits = _impl_._has_bits_[0];
651   if (cached_has_bits & 0x00000007u) {
652     ::memset(&_impl_.last_, 0, static_cast<size_t>(
653         reinterpret_cast<char*>(&_impl_.type_) -
654         reinterpret_cast<char*>(&_impl_.last_)) + sizeof(_impl_.type_));
655   }
656   _impl_._has_bits_.Clear();
657   _internal_metadata_.Clear<std::string>();
658 }
659 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)660 const char* DsiTxFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
661 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
662   _Internal::HasBits has_bits{};
663   while (!ctx->Done(&ptr)) {
664     ::uint32_t tag;
665     ptr = ::_pbi::ReadTag(ptr, &tag);
666     switch (tag >> 3) {
667       // optional uint32 last = 1;
668       case 1:
669         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
670           _Internal::set_has_last(&has_bits);
671           _impl_.last_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
672           CHK_(ptr);
673         } else {
674           goto handle_unusual;
675         }
676         continue;
677       // optional uint32 tx_buf = 2;
678       case 2:
679         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
680           _Internal::set_has_tx_buf(&has_bits);
681           _impl_.tx_buf_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
682           CHK_(ptr);
683         } else {
684           goto handle_unusual;
685         }
686         continue;
687       // optional uint32 type = 3;
688       case 3:
689         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
690           _Internal::set_has_type(&has_bits);
691           _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
692           CHK_(ptr);
693         } else {
694           goto handle_unusual;
695         }
696         continue;
697       default:
698         goto handle_unusual;
699     }  // switch
700   handle_unusual:
701     if ((tag == 0) || ((tag & 7) == 4)) {
702       CHK_(ptr);
703       ctx->SetLastTag(tag);
704       goto message_done;
705     }
706     ptr = UnknownFieldParse(
707         tag,
708         _internal_metadata_.mutable_unknown_fields<std::string>(),
709         ptr, ctx);
710     CHK_(ptr != nullptr);
711   }  // while
712 message_done:
713   _impl_._has_bits_.Or(has_bits);
714   return ptr;
715 failure:
716   ptr = nullptr;
717   goto message_done;
718 #undef CHK_
719 }
720 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const721 ::uint8_t* DsiTxFtraceEvent::_InternalSerialize(
722     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
723   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DsiTxFtraceEvent)
724   ::uint32_t cached_has_bits = 0;
725   (void) cached_has_bits;
726 
727   cached_has_bits = _impl_._has_bits_[0];
728   // optional uint32 last = 1;
729   if (cached_has_bits & 0x00000001u) {
730     target = stream->EnsureSpace(target);
731     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_last(), target);
732   }
733 
734   // optional uint32 tx_buf = 2;
735   if (cached_has_bits & 0x00000002u) {
736     target = stream->EnsureSpace(target);
737     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_tx_buf(), target);
738   }
739 
740   // optional uint32 type = 3;
741   if (cached_has_bits & 0x00000004u) {
742     target = stream->EnsureSpace(target);
743     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_type(), target);
744   }
745 
746   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
747     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
748         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
749   }
750   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DsiTxFtraceEvent)
751   return target;
752 }
753 
ByteSizeLong() const754 size_t DsiTxFtraceEvent::ByteSizeLong() const {
755 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DsiTxFtraceEvent)
756   size_t total_size = 0;
757 
758   ::uint32_t cached_has_bits = 0;
759   // Prevent compiler warnings about cached_has_bits being unused
760   (void) cached_has_bits;
761 
762   cached_has_bits = _impl_._has_bits_[0];
763   if (cached_has_bits & 0x00000007u) {
764     // optional uint32 last = 1;
765     if (cached_has_bits & 0x00000001u) {
766       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_last());
767     }
768 
769     // optional uint32 tx_buf = 2;
770     if (cached_has_bits & 0x00000002u) {
771       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_tx_buf());
772     }
773 
774     // optional uint32 type = 3;
775     if (cached_has_bits & 0x00000004u) {
776       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type());
777     }
778 
779   }
780   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
781     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
782   }
783   int cached_size = ::_pbi::ToCachedSize(total_size);
784   SetCachedSize(cached_size);
785   return total_size;
786 }
787 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)788 void DsiTxFtraceEvent::CheckTypeAndMergeFrom(
789     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
790   MergeFrom(*::_pbi::DownCast<const DsiTxFtraceEvent*>(
791       &from));
792 }
793 
MergeFrom(const DsiTxFtraceEvent & from)794 void DsiTxFtraceEvent::MergeFrom(const DsiTxFtraceEvent& from) {
795   DsiTxFtraceEvent* const _this = this;
796   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DsiTxFtraceEvent)
797   GOOGLE_DCHECK_NE(&from, _this);
798   ::uint32_t cached_has_bits = 0;
799   (void) cached_has_bits;
800 
801   cached_has_bits = from._impl_._has_bits_[0];
802   if (cached_has_bits & 0x00000007u) {
803     if (cached_has_bits & 0x00000001u) {
804       _this->_impl_.last_ = from._impl_.last_;
805     }
806     if (cached_has_bits & 0x00000002u) {
807       _this->_impl_.tx_buf_ = from._impl_.tx_buf_;
808     }
809     if (cached_has_bits & 0x00000004u) {
810       _this->_impl_.type_ = from._impl_.type_;
811     }
812     _this->_impl_._has_bits_[0] |= cached_has_bits;
813   }
814   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
815 }
816 
CopyFrom(const DsiTxFtraceEvent & from)817 void DsiTxFtraceEvent::CopyFrom(const DsiTxFtraceEvent& from) {
818 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DsiTxFtraceEvent)
819   if (&from == this) return;
820   Clear();
821   MergeFrom(from);
822 }
823 
IsInitialized() const824 bool DsiTxFtraceEvent::IsInitialized() const {
825   return true;
826 }
827 
InternalSwap(DsiTxFtraceEvent * other)828 void DsiTxFtraceEvent::InternalSwap(DsiTxFtraceEvent* other) {
829   using std::swap;
830   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
831   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
832   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
833       PROTOBUF_FIELD_OFFSET(DsiTxFtraceEvent, _impl_.type_)
834       + sizeof(DsiTxFtraceEvent::_impl_.type_)  // NOLINT
835       - PROTOBUF_FIELD_OFFSET(DsiTxFtraceEvent, _impl_.last_)>(
836           reinterpret_cast<char*>(&_impl_.last_),
837           reinterpret_cast<char*>(&other->_impl_.last_));
838 }
839 
GetTypeName() const840 std::string DsiTxFtraceEvent::GetTypeName() const {
841   return "perfetto.protos.DsiTxFtraceEvent";
842 }
843 
844 
845 // ===================================================================
846 
847 class PanelWriteGenericFtraceEvent::_Internal {
848  public:
849   using HasBits = decltype(std::declval<PanelWriteGenericFtraceEvent>()._impl_._has_bits_);
set_has_pid(HasBits * has_bits)850   static void set_has_pid(HasBits* has_bits) {
851     (*has_bits)[0] |= 4u;
852   }
set_has_trace_name(HasBits * has_bits)853   static void set_has_trace_name(HasBits* has_bits) {
854     (*has_bits)[0] |= 1u;
855   }
set_has_trace_begin(HasBits * has_bits)856   static void set_has_trace_begin(HasBits* has_bits) {
857     (*has_bits)[0] |= 8u;
858   }
set_has_name(HasBits * has_bits)859   static void set_has_name(HasBits* has_bits) {
860     (*has_bits)[0] |= 2u;
861   }
set_has_type(HasBits * has_bits)862   static void set_has_type(HasBits* has_bits) {
863     (*has_bits)[0] |= 16u;
864   }
set_has_value(HasBits * has_bits)865   static void set_has_value(HasBits* has_bits) {
866     (*has_bits)[0] |= 32u;
867   }
868 };
869 
PanelWriteGenericFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)870 PanelWriteGenericFtraceEvent::PanelWriteGenericFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
871                          bool is_message_owned)
872   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
873   SharedCtor(arena, is_message_owned);
874   // @@protoc_insertion_point(arena_constructor:perfetto.protos.PanelWriteGenericFtraceEvent)
875 }
PanelWriteGenericFtraceEvent(const PanelWriteGenericFtraceEvent & from)876 PanelWriteGenericFtraceEvent::PanelWriteGenericFtraceEvent(const PanelWriteGenericFtraceEvent& from)
877   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
878   PanelWriteGenericFtraceEvent* const _this = this; (void)_this;
879   new (&_impl_) Impl_{
880       decltype(_impl_._has_bits_){from._impl_._has_bits_}
881     , /*decltype(_impl_._cached_size_)*/{}
882     , decltype(_impl_.trace_name_){}
883     , decltype(_impl_.name_){}
884     , decltype(_impl_.pid_){}
885     , decltype(_impl_.trace_begin_){}
886     , decltype(_impl_.type_){}
887     , decltype(_impl_.value_){}};
888 
889   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
890   _impl_.trace_name_.InitDefault();
891   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
892     _impl_.trace_name_.Set("", GetArenaForAllocation());
893   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
894   if (from._internal_has_trace_name()) {
895     _this->_impl_.trace_name_.Set(from._internal_trace_name(),
896       _this->GetArenaForAllocation());
897   }
898   _impl_.name_.InitDefault();
899   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
900     _impl_.name_.Set("", GetArenaForAllocation());
901   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
902   if (from._internal_has_name()) {
903     _this->_impl_.name_.Set(from._internal_name(),
904       _this->GetArenaForAllocation());
905   }
906   ::memcpy(&_impl_.pid_, &from._impl_.pid_,
907     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.value_) -
908     reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.value_));
909   // @@protoc_insertion_point(copy_constructor:perfetto.protos.PanelWriteGenericFtraceEvent)
910 }
911 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)912 inline void PanelWriteGenericFtraceEvent::SharedCtor(
913     ::_pb::Arena* arena, bool is_message_owned) {
914   (void)arena;
915   (void)is_message_owned;
916   new (&_impl_) Impl_{
917       decltype(_impl_._has_bits_){}
918     , /*decltype(_impl_._cached_size_)*/{}
919     , decltype(_impl_.trace_name_){}
920     , decltype(_impl_.name_){}
921     , decltype(_impl_.pid_){0}
922     , decltype(_impl_.trace_begin_){0u}
923     , decltype(_impl_.type_){0u}
924     , decltype(_impl_.value_){0}
925   };
926   _impl_.trace_name_.InitDefault();
927   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
928     _impl_.trace_name_.Set("", GetArenaForAllocation());
929   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
930   _impl_.name_.InitDefault();
931   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
932     _impl_.name_.Set("", GetArenaForAllocation());
933   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
934 }
935 
~PanelWriteGenericFtraceEvent()936 PanelWriteGenericFtraceEvent::~PanelWriteGenericFtraceEvent() {
937   // @@protoc_insertion_point(destructor:perfetto.protos.PanelWriteGenericFtraceEvent)
938   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
939   (void)arena;
940     return;
941   }
942   SharedDtor();
943 }
944 
SharedDtor()945 inline void PanelWriteGenericFtraceEvent::SharedDtor() {
946   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
947   _impl_.trace_name_.Destroy();
948   _impl_.name_.Destroy();
949 }
950 
SetCachedSize(int size) const951 void PanelWriteGenericFtraceEvent::SetCachedSize(int size) const {
952   _impl_._cached_size_.Set(size);
953 }
954 
Clear()955 void PanelWriteGenericFtraceEvent::Clear() {
956 // @@protoc_insertion_point(message_clear_start:perfetto.protos.PanelWriteGenericFtraceEvent)
957   ::uint32_t cached_has_bits = 0;
958   // Prevent compiler warnings about cached_has_bits being unused
959   (void) cached_has_bits;
960 
961   cached_has_bits = _impl_._has_bits_[0];
962   if (cached_has_bits & 0x00000003u) {
963     if (cached_has_bits & 0x00000001u) {
964       _impl_.trace_name_.ClearNonDefaultToEmpty();
965     }
966     if (cached_has_bits & 0x00000002u) {
967       _impl_.name_.ClearNonDefaultToEmpty();
968     }
969   }
970   if (cached_has_bits & 0x0000003cu) {
971     ::memset(&_impl_.pid_, 0, static_cast<size_t>(
972         reinterpret_cast<char*>(&_impl_.value_) -
973         reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.value_));
974   }
975   _impl_._has_bits_.Clear();
976   _internal_metadata_.Clear<std::string>();
977 }
978 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)979 const char* PanelWriteGenericFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
980 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
981   _Internal::HasBits has_bits{};
982   while (!ctx->Done(&ptr)) {
983     ::uint32_t tag;
984     ptr = ::_pbi::ReadTag(ptr, &tag);
985     switch (tag >> 3) {
986       // optional int32 pid = 1;
987       case 1:
988         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
989           _Internal::set_has_pid(&has_bits);
990           _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
991           CHK_(ptr);
992         } else {
993           goto handle_unusual;
994         }
995         continue;
996       // optional string trace_name = 2;
997       case 2:
998         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
999           auto str = _internal_mutable_trace_name();
1000           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1001           CHK_(ptr);
1002         } else {
1003           goto handle_unusual;
1004         }
1005         continue;
1006       // optional uint32 trace_begin = 3;
1007       case 3:
1008         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1009           _Internal::set_has_trace_begin(&has_bits);
1010           _impl_.trace_begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1011           CHK_(ptr);
1012         } else {
1013           goto handle_unusual;
1014         }
1015         continue;
1016       // optional string name = 4;
1017       case 4:
1018         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1019           auto str = _internal_mutable_name();
1020           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1021           CHK_(ptr);
1022         } else {
1023           goto handle_unusual;
1024         }
1025         continue;
1026       // optional uint32 type = 5;
1027       case 5:
1028         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1029           _Internal::set_has_type(&has_bits);
1030           _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1031           CHK_(ptr);
1032         } else {
1033           goto handle_unusual;
1034         }
1035         continue;
1036       // optional int32 value = 6;
1037       case 6:
1038         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1039           _Internal::set_has_value(&has_bits);
1040           _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1041           CHK_(ptr);
1042         } else {
1043           goto handle_unusual;
1044         }
1045         continue;
1046       default:
1047         goto handle_unusual;
1048     }  // switch
1049   handle_unusual:
1050     if ((tag == 0) || ((tag & 7) == 4)) {
1051       CHK_(ptr);
1052       ctx->SetLastTag(tag);
1053       goto message_done;
1054     }
1055     ptr = UnknownFieldParse(
1056         tag,
1057         _internal_metadata_.mutable_unknown_fields<std::string>(),
1058         ptr, ctx);
1059     CHK_(ptr != nullptr);
1060   }  // while
1061 message_done:
1062   _impl_._has_bits_.Or(has_bits);
1063   return ptr;
1064 failure:
1065   ptr = nullptr;
1066   goto message_done;
1067 #undef CHK_
1068 }
1069 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1070 ::uint8_t* PanelWriteGenericFtraceEvent::_InternalSerialize(
1071     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1072   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.PanelWriteGenericFtraceEvent)
1073   ::uint32_t cached_has_bits = 0;
1074   (void) cached_has_bits;
1075 
1076   cached_has_bits = _impl_._has_bits_[0];
1077   // optional int32 pid = 1;
1078   if (cached_has_bits & 0x00000004u) {
1079     target = stream->EnsureSpace(target);
1080     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_pid(), target);
1081   }
1082 
1083   // optional string trace_name = 2;
1084   if (cached_has_bits & 0x00000001u) {
1085     target = stream->WriteStringMaybeAliased(
1086         2, this->_internal_trace_name(), target);
1087   }
1088 
1089   // optional uint32 trace_begin = 3;
1090   if (cached_has_bits & 0x00000008u) {
1091     target = stream->EnsureSpace(target);
1092     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_trace_begin(), target);
1093   }
1094 
1095   // optional string name = 4;
1096   if (cached_has_bits & 0x00000002u) {
1097     target = stream->WriteStringMaybeAliased(
1098         4, this->_internal_name(), target);
1099   }
1100 
1101   // optional uint32 type = 5;
1102   if (cached_has_bits & 0x00000010u) {
1103     target = stream->EnsureSpace(target);
1104     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_type(), target);
1105   }
1106 
1107   // optional int32 value = 6;
1108   if (cached_has_bits & 0x00000020u) {
1109     target = stream->EnsureSpace(target);
1110     target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_value(), target);
1111   }
1112 
1113   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1114     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1115         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1116   }
1117   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.PanelWriteGenericFtraceEvent)
1118   return target;
1119 }
1120 
ByteSizeLong() const1121 size_t PanelWriteGenericFtraceEvent::ByteSizeLong() const {
1122 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.PanelWriteGenericFtraceEvent)
1123   size_t total_size = 0;
1124 
1125   ::uint32_t cached_has_bits = 0;
1126   // Prevent compiler warnings about cached_has_bits being unused
1127   (void) cached_has_bits;
1128 
1129   cached_has_bits = _impl_._has_bits_[0];
1130   if (cached_has_bits & 0x0000003fu) {
1131     // optional string trace_name = 2;
1132     if (cached_has_bits & 0x00000001u) {
1133       total_size += 1 +
1134         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1135           this->_internal_trace_name());
1136     }
1137 
1138     // optional string name = 4;
1139     if (cached_has_bits & 0x00000002u) {
1140       total_size += 1 +
1141         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1142           this->_internal_name());
1143     }
1144 
1145     // optional int32 pid = 1;
1146     if (cached_has_bits & 0x00000004u) {
1147       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
1148     }
1149 
1150     // optional uint32 trace_begin = 3;
1151     if (cached_has_bits & 0x00000008u) {
1152       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_trace_begin());
1153     }
1154 
1155     // optional uint32 type = 5;
1156     if (cached_has_bits & 0x00000010u) {
1157       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type());
1158     }
1159 
1160     // optional int32 value = 6;
1161     if (cached_has_bits & 0x00000020u) {
1162       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_value());
1163     }
1164 
1165   }
1166   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1167     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1168   }
1169   int cached_size = ::_pbi::ToCachedSize(total_size);
1170   SetCachedSize(cached_size);
1171   return total_size;
1172 }
1173 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1174 void PanelWriteGenericFtraceEvent::CheckTypeAndMergeFrom(
1175     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1176   MergeFrom(*::_pbi::DownCast<const PanelWriteGenericFtraceEvent*>(
1177       &from));
1178 }
1179 
MergeFrom(const PanelWriteGenericFtraceEvent & from)1180 void PanelWriteGenericFtraceEvent::MergeFrom(const PanelWriteGenericFtraceEvent& from) {
1181   PanelWriteGenericFtraceEvent* const _this = this;
1182   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.PanelWriteGenericFtraceEvent)
1183   GOOGLE_DCHECK_NE(&from, _this);
1184   ::uint32_t cached_has_bits = 0;
1185   (void) cached_has_bits;
1186 
1187   cached_has_bits = from._impl_._has_bits_[0];
1188   if (cached_has_bits & 0x0000003fu) {
1189     if (cached_has_bits & 0x00000001u) {
1190       _this->_internal_set_trace_name(from._internal_trace_name());
1191     }
1192     if (cached_has_bits & 0x00000002u) {
1193       _this->_internal_set_name(from._internal_name());
1194     }
1195     if (cached_has_bits & 0x00000004u) {
1196       _this->_impl_.pid_ = from._impl_.pid_;
1197     }
1198     if (cached_has_bits & 0x00000008u) {
1199       _this->_impl_.trace_begin_ = from._impl_.trace_begin_;
1200     }
1201     if (cached_has_bits & 0x00000010u) {
1202       _this->_impl_.type_ = from._impl_.type_;
1203     }
1204     if (cached_has_bits & 0x00000020u) {
1205       _this->_impl_.value_ = from._impl_.value_;
1206     }
1207     _this->_impl_._has_bits_[0] |= cached_has_bits;
1208   }
1209   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1210 }
1211 
CopyFrom(const PanelWriteGenericFtraceEvent & from)1212 void PanelWriteGenericFtraceEvent::CopyFrom(const PanelWriteGenericFtraceEvent& from) {
1213 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.PanelWriteGenericFtraceEvent)
1214   if (&from == this) return;
1215   Clear();
1216   MergeFrom(from);
1217 }
1218 
IsInitialized() const1219 bool PanelWriteGenericFtraceEvent::IsInitialized() const {
1220   return true;
1221 }
1222 
InternalSwap(PanelWriteGenericFtraceEvent * other)1223 void PanelWriteGenericFtraceEvent::InternalSwap(PanelWriteGenericFtraceEvent* other) {
1224   using std::swap;
1225   auto* lhs_arena = GetArenaForAllocation();
1226   auto* rhs_arena = other->GetArenaForAllocation();
1227   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1228   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1229   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1230       &_impl_.trace_name_, lhs_arena,
1231       &other->_impl_.trace_name_, rhs_arena
1232   );
1233   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1234       &_impl_.name_, lhs_arena,
1235       &other->_impl_.name_, rhs_arena
1236   );
1237   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1238       PROTOBUF_FIELD_OFFSET(PanelWriteGenericFtraceEvent, _impl_.value_)
1239       + sizeof(PanelWriteGenericFtraceEvent::_impl_.value_)  // NOLINT
1240       - PROTOBUF_FIELD_OFFSET(PanelWriteGenericFtraceEvent, _impl_.pid_)>(
1241           reinterpret_cast<char*>(&_impl_.pid_),
1242           reinterpret_cast<char*>(&other->_impl_.pid_));
1243 }
1244 
GetTypeName() const1245 std::string PanelWriteGenericFtraceEvent::GetTypeName() const {
1246   return "perfetto.protos.PanelWriteGenericFtraceEvent";
1247 }
1248 
1249 
1250 // @@protoc_insertion_point(namespace_scope)
1251 }  // namespace protos
1252 }  // namespace perfetto
1253 PROTOBUF_NAMESPACE_OPEN
1254 template<> PROTOBUF_NOINLINE ::perfetto::protos::DsiCmdFifoStatusFtraceEvent*
CreateMaybeMessage(Arena * arena)1255 Arena::CreateMaybeMessage< ::perfetto::protos::DsiCmdFifoStatusFtraceEvent >(Arena* arena) {
1256   return Arena::CreateMessageInternal< ::perfetto::protos::DsiCmdFifoStatusFtraceEvent >(arena);
1257 }
1258 template<> PROTOBUF_NOINLINE ::perfetto::protos::DsiRxFtraceEvent*
CreateMaybeMessage(Arena * arena)1259 Arena::CreateMaybeMessage< ::perfetto::protos::DsiRxFtraceEvent >(Arena* arena) {
1260   return Arena::CreateMessageInternal< ::perfetto::protos::DsiRxFtraceEvent >(arena);
1261 }
1262 template<> PROTOBUF_NOINLINE ::perfetto::protos::DsiTxFtraceEvent*
CreateMaybeMessage(Arena * arena)1263 Arena::CreateMaybeMessage< ::perfetto::protos::DsiTxFtraceEvent >(Arena* arena) {
1264   return Arena::CreateMessageInternal< ::perfetto::protos::DsiTxFtraceEvent >(arena);
1265 }
1266 template<> PROTOBUF_NOINLINE ::perfetto::protos::PanelWriteGenericFtraceEvent*
CreateMaybeMessage(Arena * arena)1267 Arena::CreateMaybeMessage< ::perfetto::protos::PanelWriteGenericFtraceEvent >(Arena* arena) {
1268   return Arena::CreateMessageInternal< ::perfetto::protos::PanelWriteGenericFtraceEvent >(arena);
1269 }
1270 PROTOBUF_NAMESPACE_CLOSE
1271 
1272 // @@protoc_insertion_point(global_scope)
1273 #include <google/protobuf/port_undef.inc>
1274