1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/virtio_gpu.proto
3 
4 #include "protos/perfetto/trace/ftrace/virtio_gpu.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 {
VirtioGpuCmdQueueFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR VirtioGpuCmdQueueFtraceEvent::VirtioGpuCmdQueueFtraceEvent(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28   , /*decltype(_impl_.ctx_id_)*/0u
29   , /*decltype(_impl_.dev_)*/0
30   , /*decltype(_impl_.fence_id_)*/::uint64_t{0u}
31   , /*decltype(_impl_.flags_)*/0u
32   , /*decltype(_impl_.num_free_)*/0u
33   , /*decltype(_impl_.seqno_)*/0u
34   , /*decltype(_impl_.type_)*/0u
35   , /*decltype(_impl_.vq_)*/0u} {}
36 struct VirtioGpuCmdQueueFtraceEventDefaultTypeInternal {
VirtioGpuCmdQueueFtraceEventDefaultTypeInternalperfetto::protos::VirtioGpuCmdQueueFtraceEventDefaultTypeInternal37   PROTOBUF_CONSTEXPR VirtioGpuCmdQueueFtraceEventDefaultTypeInternal()
38       : _instance(::_pbi::ConstantInitialized{}) {}
~VirtioGpuCmdQueueFtraceEventDefaultTypeInternalperfetto::protos::VirtioGpuCmdQueueFtraceEventDefaultTypeInternal39   ~VirtioGpuCmdQueueFtraceEventDefaultTypeInternal() {}
40   union {  // NOLINT(misc-non-private-member-variables-in-classes)
41     VirtioGpuCmdQueueFtraceEvent _instance;
42   };
43 };
44 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VirtioGpuCmdQueueFtraceEventDefaultTypeInternal _VirtioGpuCmdQueueFtraceEvent_default_instance_;
VirtioGpuCmdResponseFtraceEvent(::_pbi::ConstantInitialized)45 PROTOBUF_CONSTEXPR VirtioGpuCmdResponseFtraceEvent::VirtioGpuCmdResponseFtraceEvent(
46     ::_pbi::ConstantInitialized): _impl_{
47     /*decltype(_impl_._has_bits_)*/{}
48   , /*decltype(_impl_._cached_size_)*/{}
49   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
50   , /*decltype(_impl_.ctx_id_)*/0u
51   , /*decltype(_impl_.dev_)*/0
52   , /*decltype(_impl_.fence_id_)*/::uint64_t{0u}
53   , /*decltype(_impl_.flags_)*/0u
54   , /*decltype(_impl_.num_free_)*/0u
55   , /*decltype(_impl_.seqno_)*/0u
56   , /*decltype(_impl_.type_)*/0u
57   , /*decltype(_impl_.vq_)*/0u} {}
58 struct VirtioGpuCmdResponseFtraceEventDefaultTypeInternal {
VirtioGpuCmdResponseFtraceEventDefaultTypeInternalperfetto::protos::VirtioGpuCmdResponseFtraceEventDefaultTypeInternal59   PROTOBUF_CONSTEXPR VirtioGpuCmdResponseFtraceEventDefaultTypeInternal()
60       : _instance(::_pbi::ConstantInitialized{}) {}
~VirtioGpuCmdResponseFtraceEventDefaultTypeInternalperfetto::protos::VirtioGpuCmdResponseFtraceEventDefaultTypeInternal61   ~VirtioGpuCmdResponseFtraceEventDefaultTypeInternal() {}
62   union {  // NOLINT(misc-non-private-member-variables-in-classes)
63     VirtioGpuCmdResponseFtraceEvent _instance;
64   };
65 };
66 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VirtioGpuCmdResponseFtraceEventDefaultTypeInternal _VirtioGpuCmdResponseFtraceEvent_default_instance_;
67 }  // namespace protos
68 }  // namespace perfetto
69 namespace perfetto {
70 namespace protos {
71 
72 // ===================================================================
73 
74 class VirtioGpuCmdQueueFtraceEvent::_Internal {
75  public:
76   using HasBits = decltype(std::declval<VirtioGpuCmdQueueFtraceEvent>()._impl_._has_bits_);
set_has_ctx_id(HasBits * has_bits)77   static void set_has_ctx_id(HasBits* has_bits) {
78     (*has_bits)[0] |= 2u;
79   }
set_has_dev(HasBits * has_bits)80   static void set_has_dev(HasBits* has_bits) {
81     (*has_bits)[0] |= 4u;
82   }
set_has_fence_id(HasBits * has_bits)83   static void set_has_fence_id(HasBits* has_bits) {
84     (*has_bits)[0] |= 8u;
85   }
set_has_flags(HasBits * has_bits)86   static void set_has_flags(HasBits* has_bits) {
87     (*has_bits)[0] |= 16u;
88   }
set_has_name(HasBits * has_bits)89   static void set_has_name(HasBits* has_bits) {
90     (*has_bits)[0] |= 1u;
91   }
set_has_num_free(HasBits * has_bits)92   static void set_has_num_free(HasBits* has_bits) {
93     (*has_bits)[0] |= 32u;
94   }
set_has_seqno(HasBits * has_bits)95   static void set_has_seqno(HasBits* has_bits) {
96     (*has_bits)[0] |= 64u;
97   }
set_has_type(HasBits * has_bits)98   static void set_has_type(HasBits* has_bits) {
99     (*has_bits)[0] |= 128u;
100   }
set_has_vq(HasBits * has_bits)101   static void set_has_vq(HasBits* has_bits) {
102     (*has_bits)[0] |= 256u;
103   }
104 };
105 
VirtioGpuCmdQueueFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)106 VirtioGpuCmdQueueFtraceEvent::VirtioGpuCmdQueueFtraceEvent(::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.VirtioGpuCmdQueueFtraceEvent)
111 }
VirtioGpuCmdQueueFtraceEvent(const VirtioGpuCmdQueueFtraceEvent & from)112 VirtioGpuCmdQueueFtraceEvent::VirtioGpuCmdQueueFtraceEvent(const VirtioGpuCmdQueueFtraceEvent& from)
113   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
114   VirtioGpuCmdQueueFtraceEvent* 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_.name_){}
119     , decltype(_impl_.ctx_id_){}
120     , decltype(_impl_.dev_){}
121     , decltype(_impl_.fence_id_){}
122     , decltype(_impl_.flags_){}
123     , decltype(_impl_.num_free_){}
124     , decltype(_impl_.seqno_){}
125     , decltype(_impl_.type_){}
126     , decltype(_impl_.vq_){}};
127 
128   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
129   _impl_.name_.InitDefault();
130   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
131     _impl_.name_.Set("", GetArenaForAllocation());
132   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
133   if (from._internal_has_name()) {
134     _this->_impl_.name_.Set(from._internal_name(),
135       _this->GetArenaForAllocation());
136   }
137   ::memcpy(&_impl_.ctx_id_, &from._impl_.ctx_id_,
138     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.vq_) -
139     reinterpret_cast<char*>(&_impl_.ctx_id_)) + sizeof(_impl_.vq_));
140   // @@protoc_insertion_point(copy_constructor:perfetto.protos.VirtioGpuCmdQueueFtraceEvent)
141 }
142 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)143 inline void VirtioGpuCmdQueueFtraceEvent::SharedCtor(
144     ::_pb::Arena* arena, bool is_message_owned) {
145   (void)arena;
146   (void)is_message_owned;
147   new (&_impl_) Impl_{
148       decltype(_impl_._has_bits_){}
149     , /*decltype(_impl_._cached_size_)*/{}
150     , decltype(_impl_.name_){}
151     , decltype(_impl_.ctx_id_){0u}
152     , decltype(_impl_.dev_){0}
153     , decltype(_impl_.fence_id_){::uint64_t{0u}}
154     , decltype(_impl_.flags_){0u}
155     , decltype(_impl_.num_free_){0u}
156     , decltype(_impl_.seqno_){0u}
157     , decltype(_impl_.type_){0u}
158     , decltype(_impl_.vq_){0u}
159   };
160   _impl_.name_.InitDefault();
161   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
162     _impl_.name_.Set("", GetArenaForAllocation());
163   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
164 }
165 
~VirtioGpuCmdQueueFtraceEvent()166 VirtioGpuCmdQueueFtraceEvent::~VirtioGpuCmdQueueFtraceEvent() {
167   // @@protoc_insertion_point(destructor:perfetto.protos.VirtioGpuCmdQueueFtraceEvent)
168   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
169   (void)arena;
170     return;
171   }
172   SharedDtor();
173 }
174 
SharedDtor()175 inline void VirtioGpuCmdQueueFtraceEvent::SharedDtor() {
176   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
177   _impl_.name_.Destroy();
178 }
179 
SetCachedSize(int size) const180 void VirtioGpuCmdQueueFtraceEvent::SetCachedSize(int size) const {
181   _impl_._cached_size_.Set(size);
182 }
183 
Clear()184 void VirtioGpuCmdQueueFtraceEvent::Clear() {
185 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VirtioGpuCmdQueueFtraceEvent)
186   ::uint32_t cached_has_bits = 0;
187   // Prevent compiler warnings about cached_has_bits being unused
188   (void) cached_has_bits;
189 
190   cached_has_bits = _impl_._has_bits_[0];
191   if (cached_has_bits & 0x00000001u) {
192     _impl_.name_.ClearNonDefaultToEmpty();
193   }
194   if (cached_has_bits & 0x000000feu) {
195     ::memset(&_impl_.ctx_id_, 0, static_cast<size_t>(
196         reinterpret_cast<char*>(&_impl_.type_) -
197         reinterpret_cast<char*>(&_impl_.ctx_id_)) + sizeof(_impl_.type_));
198   }
199   _impl_.vq_ = 0u;
200   _impl_._has_bits_.Clear();
201   _internal_metadata_.Clear<std::string>();
202 }
203 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)204 const char* VirtioGpuCmdQueueFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
205 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
206   _Internal::HasBits has_bits{};
207   while (!ctx->Done(&ptr)) {
208     ::uint32_t tag;
209     ptr = ::_pbi::ReadTag(ptr, &tag);
210     switch (tag >> 3) {
211       // optional uint32 ctx_id = 1;
212       case 1:
213         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
214           _Internal::set_has_ctx_id(&has_bits);
215           _impl_.ctx_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
216           CHK_(ptr);
217         } else {
218           goto handle_unusual;
219         }
220         continue;
221       // optional int32 dev = 2;
222       case 2:
223         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
224           _Internal::set_has_dev(&has_bits);
225           _impl_.dev_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
226           CHK_(ptr);
227         } else {
228           goto handle_unusual;
229         }
230         continue;
231       // optional uint64 fence_id = 3;
232       case 3:
233         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
234           _Internal::set_has_fence_id(&has_bits);
235           _impl_.fence_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
236           CHK_(ptr);
237         } else {
238           goto handle_unusual;
239         }
240         continue;
241       // optional uint32 flags = 4;
242       case 4:
243         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
244           _Internal::set_has_flags(&has_bits);
245           _impl_.flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
246           CHK_(ptr);
247         } else {
248           goto handle_unusual;
249         }
250         continue;
251       // optional string name = 5;
252       case 5:
253         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
254           auto str = _internal_mutable_name();
255           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
256           CHK_(ptr);
257         } else {
258           goto handle_unusual;
259         }
260         continue;
261       // optional uint32 num_free = 6;
262       case 6:
263         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
264           _Internal::set_has_num_free(&has_bits);
265           _impl_.num_free_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
266           CHK_(ptr);
267         } else {
268           goto handle_unusual;
269         }
270         continue;
271       // optional uint32 seqno = 7;
272       case 7:
273         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
274           _Internal::set_has_seqno(&has_bits);
275           _impl_.seqno_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
276           CHK_(ptr);
277         } else {
278           goto handle_unusual;
279         }
280         continue;
281       // optional uint32 type = 8;
282       case 8:
283         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
284           _Internal::set_has_type(&has_bits);
285           _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
286           CHK_(ptr);
287         } else {
288           goto handle_unusual;
289         }
290         continue;
291       // optional uint32 vq = 9;
292       case 9:
293         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
294           _Internal::set_has_vq(&has_bits);
295           _impl_.vq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
296           CHK_(ptr);
297         } else {
298           goto handle_unusual;
299         }
300         continue;
301       default:
302         goto handle_unusual;
303     }  // switch
304   handle_unusual:
305     if ((tag == 0) || ((tag & 7) == 4)) {
306       CHK_(ptr);
307       ctx->SetLastTag(tag);
308       goto message_done;
309     }
310     ptr = UnknownFieldParse(
311         tag,
312         _internal_metadata_.mutable_unknown_fields<std::string>(),
313         ptr, ctx);
314     CHK_(ptr != nullptr);
315   }  // while
316 message_done:
317   _impl_._has_bits_.Or(has_bits);
318   return ptr;
319 failure:
320   ptr = nullptr;
321   goto message_done;
322 #undef CHK_
323 }
324 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const325 ::uint8_t* VirtioGpuCmdQueueFtraceEvent::_InternalSerialize(
326     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
327   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VirtioGpuCmdQueueFtraceEvent)
328   ::uint32_t cached_has_bits = 0;
329   (void) cached_has_bits;
330 
331   cached_has_bits = _impl_._has_bits_[0];
332   // optional uint32 ctx_id = 1;
333   if (cached_has_bits & 0x00000002u) {
334     target = stream->EnsureSpace(target);
335     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_ctx_id(), target);
336   }
337 
338   // optional int32 dev = 2;
339   if (cached_has_bits & 0x00000004u) {
340     target = stream->EnsureSpace(target);
341     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_dev(), target);
342   }
343 
344   // optional uint64 fence_id = 3;
345   if (cached_has_bits & 0x00000008u) {
346     target = stream->EnsureSpace(target);
347     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_fence_id(), target);
348   }
349 
350   // optional uint32 flags = 4;
351   if (cached_has_bits & 0x00000010u) {
352     target = stream->EnsureSpace(target);
353     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_flags(), target);
354   }
355 
356   // optional string name = 5;
357   if (cached_has_bits & 0x00000001u) {
358     target = stream->WriteStringMaybeAliased(
359         5, this->_internal_name(), target);
360   }
361 
362   // optional uint32 num_free = 6;
363   if (cached_has_bits & 0x00000020u) {
364     target = stream->EnsureSpace(target);
365     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_num_free(), target);
366   }
367 
368   // optional uint32 seqno = 7;
369   if (cached_has_bits & 0x00000040u) {
370     target = stream->EnsureSpace(target);
371     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_seqno(), target);
372   }
373 
374   // optional uint32 type = 8;
375   if (cached_has_bits & 0x00000080u) {
376     target = stream->EnsureSpace(target);
377     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_type(), target);
378   }
379 
380   // optional uint32 vq = 9;
381   if (cached_has_bits & 0x00000100u) {
382     target = stream->EnsureSpace(target);
383     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_vq(), target);
384   }
385 
386   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
387     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
388         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
389   }
390   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VirtioGpuCmdQueueFtraceEvent)
391   return target;
392 }
393 
ByteSizeLong() const394 size_t VirtioGpuCmdQueueFtraceEvent::ByteSizeLong() const {
395 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VirtioGpuCmdQueueFtraceEvent)
396   size_t total_size = 0;
397 
398   ::uint32_t cached_has_bits = 0;
399   // Prevent compiler warnings about cached_has_bits being unused
400   (void) cached_has_bits;
401 
402   cached_has_bits = _impl_._has_bits_[0];
403   if (cached_has_bits & 0x000000ffu) {
404     // optional string name = 5;
405     if (cached_has_bits & 0x00000001u) {
406       total_size += 1 +
407         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
408           this->_internal_name());
409     }
410 
411     // optional uint32 ctx_id = 1;
412     if (cached_has_bits & 0x00000002u) {
413       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_ctx_id());
414     }
415 
416     // optional int32 dev = 2;
417     if (cached_has_bits & 0x00000004u) {
418       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_dev());
419     }
420 
421     // optional uint64 fence_id = 3;
422     if (cached_has_bits & 0x00000008u) {
423       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_fence_id());
424     }
425 
426     // optional uint32 flags = 4;
427     if (cached_has_bits & 0x00000010u) {
428       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_flags());
429     }
430 
431     // optional uint32 num_free = 6;
432     if (cached_has_bits & 0x00000020u) {
433       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_free());
434     }
435 
436     // optional uint32 seqno = 7;
437     if (cached_has_bits & 0x00000040u) {
438       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_seqno());
439     }
440 
441     // optional uint32 type = 8;
442     if (cached_has_bits & 0x00000080u) {
443       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type());
444     }
445 
446   }
447   // optional uint32 vq = 9;
448   if (cached_has_bits & 0x00000100u) {
449     total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_vq());
450   }
451 
452   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
453     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
454   }
455   int cached_size = ::_pbi::ToCachedSize(total_size);
456   SetCachedSize(cached_size);
457   return total_size;
458 }
459 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)460 void VirtioGpuCmdQueueFtraceEvent::CheckTypeAndMergeFrom(
461     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
462   MergeFrom(*::_pbi::DownCast<const VirtioGpuCmdQueueFtraceEvent*>(
463       &from));
464 }
465 
MergeFrom(const VirtioGpuCmdQueueFtraceEvent & from)466 void VirtioGpuCmdQueueFtraceEvent::MergeFrom(const VirtioGpuCmdQueueFtraceEvent& from) {
467   VirtioGpuCmdQueueFtraceEvent* const _this = this;
468   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VirtioGpuCmdQueueFtraceEvent)
469   GOOGLE_DCHECK_NE(&from, _this);
470   ::uint32_t cached_has_bits = 0;
471   (void) cached_has_bits;
472 
473   cached_has_bits = from._impl_._has_bits_[0];
474   if (cached_has_bits & 0x000000ffu) {
475     if (cached_has_bits & 0x00000001u) {
476       _this->_internal_set_name(from._internal_name());
477     }
478     if (cached_has_bits & 0x00000002u) {
479       _this->_impl_.ctx_id_ = from._impl_.ctx_id_;
480     }
481     if (cached_has_bits & 0x00000004u) {
482       _this->_impl_.dev_ = from._impl_.dev_;
483     }
484     if (cached_has_bits & 0x00000008u) {
485       _this->_impl_.fence_id_ = from._impl_.fence_id_;
486     }
487     if (cached_has_bits & 0x00000010u) {
488       _this->_impl_.flags_ = from._impl_.flags_;
489     }
490     if (cached_has_bits & 0x00000020u) {
491       _this->_impl_.num_free_ = from._impl_.num_free_;
492     }
493     if (cached_has_bits & 0x00000040u) {
494       _this->_impl_.seqno_ = from._impl_.seqno_;
495     }
496     if (cached_has_bits & 0x00000080u) {
497       _this->_impl_.type_ = from._impl_.type_;
498     }
499     _this->_impl_._has_bits_[0] |= cached_has_bits;
500   }
501   if (cached_has_bits & 0x00000100u) {
502     _this->_internal_set_vq(from._internal_vq());
503   }
504   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
505 }
506 
CopyFrom(const VirtioGpuCmdQueueFtraceEvent & from)507 void VirtioGpuCmdQueueFtraceEvent::CopyFrom(const VirtioGpuCmdQueueFtraceEvent& from) {
508 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VirtioGpuCmdQueueFtraceEvent)
509   if (&from == this) return;
510   Clear();
511   MergeFrom(from);
512 }
513 
IsInitialized() const514 bool VirtioGpuCmdQueueFtraceEvent::IsInitialized() const {
515   return true;
516 }
517 
InternalSwap(VirtioGpuCmdQueueFtraceEvent * other)518 void VirtioGpuCmdQueueFtraceEvent::InternalSwap(VirtioGpuCmdQueueFtraceEvent* other) {
519   using std::swap;
520   auto* lhs_arena = GetArenaForAllocation();
521   auto* rhs_arena = other->GetArenaForAllocation();
522   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
523   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
524   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
525       &_impl_.name_, lhs_arena,
526       &other->_impl_.name_, rhs_arena
527   );
528   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
529       PROTOBUF_FIELD_OFFSET(VirtioGpuCmdQueueFtraceEvent, _impl_.vq_)
530       + sizeof(VirtioGpuCmdQueueFtraceEvent::_impl_.vq_)  // NOLINT
531       - PROTOBUF_FIELD_OFFSET(VirtioGpuCmdQueueFtraceEvent, _impl_.ctx_id_)>(
532           reinterpret_cast<char*>(&_impl_.ctx_id_),
533           reinterpret_cast<char*>(&other->_impl_.ctx_id_));
534 }
535 
GetTypeName() const536 std::string VirtioGpuCmdQueueFtraceEvent::GetTypeName() const {
537   return "perfetto.protos.VirtioGpuCmdQueueFtraceEvent";
538 }
539 
540 
541 // ===================================================================
542 
543 class VirtioGpuCmdResponseFtraceEvent::_Internal {
544  public:
545   using HasBits = decltype(std::declval<VirtioGpuCmdResponseFtraceEvent>()._impl_._has_bits_);
set_has_ctx_id(HasBits * has_bits)546   static void set_has_ctx_id(HasBits* has_bits) {
547     (*has_bits)[0] |= 2u;
548   }
set_has_dev(HasBits * has_bits)549   static void set_has_dev(HasBits* has_bits) {
550     (*has_bits)[0] |= 4u;
551   }
set_has_fence_id(HasBits * has_bits)552   static void set_has_fence_id(HasBits* has_bits) {
553     (*has_bits)[0] |= 8u;
554   }
set_has_flags(HasBits * has_bits)555   static void set_has_flags(HasBits* has_bits) {
556     (*has_bits)[0] |= 16u;
557   }
set_has_name(HasBits * has_bits)558   static void set_has_name(HasBits* has_bits) {
559     (*has_bits)[0] |= 1u;
560   }
set_has_num_free(HasBits * has_bits)561   static void set_has_num_free(HasBits* has_bits) {
562     (*has_bits)[0] |= 32u;
563   }
set_has_seqno(HasBits * has_bits)564   static void set_has_seqno(HasBits* has_bits) {
565     (*has_bits)[0] |= 64u;
566   }
set_has_type(HasBits * has_bits)567   static void set_has_type(HasBits* has_bits) {
568     (*has_bits)[0] |= 128u;
569   }
set_has_vq(HasBits * has_bits)570   static void set_has_vq(HasBits* has_bits) {
571     (*has_bits)[0] |= 256u;
572   }
573 };
574 
VirtioGpuCmdResponseFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)575 VirtioGpuCmdResponseFtraceEvent::VirtioGpuCmdResponseFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
576                          bool is_message_owned)
577   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
578   SharedCtor(arena, is_message_owned);
579   // @@protoc_insertion_point(arena_constructor:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
580 }
VirtioGpuCmdResponseFtraceEvent(const VirtioGpuCmdResponseFtraceEvent & from)581 VirtioGpuCmdResponseFtraceEvent::VirtioGpuCmdResponseFtraceEvent(const VirtioGpuCmdResponseFtraceEvent& from)
582   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
583   VirtioGpuCmdResponseFtraceEvent* const _this = this; (void)_this;
584   new (&_impl_) Impl_{
585       decltype(_impl_._has_bits_){from._impl_._has_bits_}
586     , /*decltype(_impl_._cached_size_)*/{}
587     , decltype(_impl_.name_){}
588     , decltype(_impl_.ctx_id_){}
589     , decltype(_impl_.dev_){}
590     , decltype(_impl_.fence_id_){}
591     , decltype(_impl_.flags_){}
592     , decltype(_impl_.num_free_){}
593     , decltype(_impl_.seqno_){}
594     , decltype(_impl_.type_){}
595     , decltype(_impl_.vq_){}};
596 
597   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
598   _impl_.name_.InitDefault();
599   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
600     _impl_.name_.Set("", GetArenaForAllocation());
601   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
602   if (from._internal_has_name()) {
603     _this->_impl_.name_.Set(from._internal_name(),
604       _this->GetArenaForAllocation());
605   }
606   ::memcpy(&_impl_.ctx_id_, &from._impl_.ctx_id_,
607     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.vq_) -
608     reinterpret_cast<char*>(&_impl_.ctx_id_)) + sizeof(_impl_.vq_));
609   // @@protoc_insertion_point(copy_constructor:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
610 }
611 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)612 inline void VirtioGpuCmdResponseFtraceEvent::SharedCtor(
613     ::_pb::Arena* arena, bool is_message_owned) {
614   (void)arena;
615   (void)is_message_owned;
616   new (&_impl_) Impl_{
617       decltype(_impl_._has_bits_){}
618     , /*decltype(_impl_._cached_size_)*/{}
619     , decltype(_impl_.name_){}
620     , decltype(_impl_.ctx_id_){0u}
621     , decltype(_impl_.dev_){0}
622     , decltype(_impl_.fence_id_){::uint64_t{0u}}
623     , decltype(_impl_.flags_){0u}
624     , decltype(_impl_.num_free_){0u}
625     , decltype(_impl_.seqno_){0u}
626     , decltype(_impl_.type_){0u}
627     , decltype(_impl_.vq_){0u}
628   };
629   _impl_.name_.InitDefault();
630   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
631     _impl_.name_.Set("", GetArenaForAllocation());
632   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
633 }
634 
~VirtioGpuCmdResponseFtraceEvent()635 VirtioGpuCmdResponseFtraceEvent::~VirtioGpuCmdResponseFtraceEvent() {
636   // @@protoc_insertion_point(destructor:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
637   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
638   (void)arena;
639     return;
640   }
641   SharedDtor();
642 }
643 
SharedDtor()644 inline void VirtioGpuCmdResponseFtraceEvent::SharedDtor() {
645   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
646   _impl_.name_.Destroy();
647 }
648 
SetCachedSize(int size) const649 void VirtioGpuCmdResponseFtraceEvent::SetCachedSize(int size) const {
650   _impl_._cached_size_.Set(size);
651 }
652 
Clear()653 void VirtioGpuCmdResponseFtraceEvent::Clear() {
654 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
655   ::uint32_t cached_has_bits = 0;
656   // Prevent compiler warnings about cached_has_bits being unused
657   (void) cached_has_bits;
658 
659   cached_has_bits = _impl_._has_bits_[0];
660   if (cached_has_bits & 0x00000001u) {
661     _impl_.name_.ClearNonDefaultToEmpty();
662   }
663   if (cached_has_bits & 0x000000feu) {
664     ::memset(&_impl_.ctx_id_, 0, static_cast<size_t>(
665         reinterpret_cast<char*>(&_impl_.type_) -
666         reinterpret_cast<char*>(&_impl_.ctx_id_)) + sizeof(_impl_.type_));
667   }
668   _impl_.vq_ = 0u;
669   _impl_._has_bits_.Clear();
670   _internal_metadata_.Clear<std::string>();
671 }
672 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)673 const char* VirtioGpuCmdResponseFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
674 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
675   _Internal::HasBits has_bits{};
676   while (!ctx->Done(&ptr)) {
677     ::uint32_t tag;
678     ptr = ::_pbi::ReadTag(ptr, &tag);
679     switch (tag >> 3) {
680       // optional uint32 ctx_id = 1;
681       case 1:
682         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
683           _Internal::set_has_ctx_id(&has_bits);
684           _impl_.ctx_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
685           CHK_(ptr);
686         } else {
687           goto handle_unusual;
688         }
689         continue;
690       // optional int32 dev = 2;
691       case 2:
692         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
693           _Internal::set_has_dev(&has_bits);
694           _impl_.dev_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
695           CHK_(ptr);
696         } else {
697           goto handle_unusual;
698         }
699         continue;
700       // optional uint64 fence_id = 3;
701       case 3:
702         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
703           _Internal::set_has_fence_id(&has_bits);
704           _impl_.fence_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
705           CHK_(ptr);
706         } else {
707           goto handle_unusual;
708         }
709         continue;
710       // optional uint32 flags = 4;
711       case 4:
712         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
713           _Internal::set_has_flags(&has_bits);
714           _impl_.flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
715           CHK_(ptr);
716         } else {
717           goto handle_unusual;
718         }
719         continue;
720       // optional string name = 5;
721       case 5:
722         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
723           auto str = _internal_mutable_name();
724           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
725           CHK_(ptr);
726         } else {
727           goto handle_unusual;
728         }
729         continue;
730       // optional uint32 num_free = 6;
731       case 6:
732         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
733           _Internal::set_has_num_free(&has_bits);
734           _impl_.num_free_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
735           CHK_(ptr);
736         } else {
737           goto handle_unusual;
738         }
739         continue;
740       // optional uint32 seqno = 7;
741       case 7:
742         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
743           _Internal::set_has_seqno(&has_bits);
744           _impl_.seqno_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
745           CHK_(ptr);
746         } else {
747           goto handle_unusual;
748         }
749         continue;
750       // optional uint32 type = 8;
751       case 8:
752         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
753           _Internal::set_has_type(&has_bits);
754           _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
755           CHK_(ptr);
756         } else {
757           goto handle_unusual;
758         }
759         continue;
760       // optional uint32 vq = 9;
761       case 9:
762         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
763           _Internal::set_has_vq(&has_bits);
764           _impl_.vq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
765           CHK_(ptr);
766         } else {
767           goto handle_unusual;
768         }
769         continue;
770       default:
771         goto handle_unusual;
772     }  // switch
773   handle_unusual:
774     if ((tag == 0) || ((tag & 7) == 4)) {
775       CHK_(ptr);
776       ctx->SetLastTag(tag);
777       goto message_done;
778     }
779     ptr = UnknownFieldParse(
780         tag,
781         _internal_metadata_.mutable_unknown_fields<std::string>(),
782         ptr, ctx);
783     CHK_(ptr != nullptr);
784   }  // while
785 message_done:
786   _impl_._has_bits_.Or(has_bits);
787   return ptr;
788 failure:
789   ptr = nullptr;
790   goto message_done;
791 #undef CHK_
792 }
793 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const794 ::uint8_t* VirtioGpuCmdResponseFtraceEvent::_InternalSerialize(
795     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
796   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
797   ::uint32_t cached_has_bits = 0;
798   (void) cached_has_bits;
799 
800   cached_has_bits = _impl_._has_bits_[0];
801   // optional uint32 ctx_id = 1;
802   if (cached_has_bits & 0x00000002u) {
803     target = stream->EnsureSpace(target);
804     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_ctx_id(), target);
805   }
806 
807   // optional int32 dev = 2;
808   if (cached_has_bits & 0x00000004u) {
809     target = stream->EnsureSpace(target);
810     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_dev(), target);
811   }
812 
813   // optional uint64 fence_id = 3;
814   if (cached_has_bits & 0x00000008u) {
815     target = stream->EnsureSpace(target);
816     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_fence_id(), target);
817   }
818 
819   // optional uint32 flags = 4;
820   if (cached_has_bits & 0x00000010u) {
821     target = stream->EnsureSpace(target);
822     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_flags(), target);
823   }
824 
825   // optional string name = 5;
826   if (cached_has_bits & 0x00000001u) {
827     target = stream->WriteStringMaybeAliased(
828         5, this->_internal_name(), target);
829   }
830 
831   // optional uint32 num_free = 6;
832   if (cached_has_bits & 0x00000020u) {
833     target = stream->EnsureSpace(target);
834     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_num_free(), target);
835   }
836 
837   // optional uint32 seqno = 7;
838   if (cached_has_bits & 0x00000040u) {
839     target = stream->EnsureSpace(target);
840     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_seqno(), target);
841   }
842 
843   // optional uint32 type = 8;
844   if (cached_has_bits & 0x00000080u) {
845     target = stream->EnsureSpace(target);
846     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_type(), target);
847   }
848 
849   // optional uint32 vq = 9;
850   if (cached_has_bits & 0x00000100u) {
851     target = stream->EnsureSpace(target);
852     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_vq(), target);
853   }
854 
855   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
856     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
857         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
858   }
859   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
860   return target;
861 }
862 
ByteSizeLong() const863 size_t VirtioGpuCmdResponseFtraceEvent::ByteSizeLong() const {
864 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
865   size_t total_size = 0;
866 
867   ::uint32_t cached_has_bits = 0;
868   // Prevent compiler warnings about cached_has_bits being unused
869   (void) cached_has_bits;
870 
871   cached_has_bits = _impl_._has_bits_[0];
872   if (cached_has_bits & 0x000000ffu) {
873     // optional string name = 5;
874     if (cached_has_bits & 0x00000001u) {
875       total_size += 1 +
876         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
877           this->_internal_name());
878     }
879 
880     // optional uint32 ctx_id = 1;
881     if (cached_has_bits & 0x00000002u) {
882       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_ctx_id());
883     }
884 
885     // optional int32 dev = 2;
886     if (cached_has_bits & 0x00000004u) {
887       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_dev());
888     }
889 
890     // optional uint64 fence_id = 3;
891     if (cached_has_bits & 0x00000008u) {
892       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_fence_id());
893     }
894 
895     // optional uint32 flags = 4;
896     if (cached_has_bits & 0x00000010u) {
897       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_flags());
898     }
899 
900     // optional uint32 num_free = 6;
901     if (cached_has_bits & 0x00000020u) {
902       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_free());
903     }
904 
905     // optional uint32 seqno = 7;
906     if (cached_has_bits & 0x00000040u) {
907       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_seqno());
908     }
909 
910     // optional uint32 type = 8;
911     if (cached_has_bits & 0x00000080u) {
912       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type());
913     }
914 
915   }
916   // optional uint32 vq = 9;
917   if (cached_has_bits & 0x00000100u) {
918     total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_vq());
919   }
920 
921   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
922     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
923   }
924   int cached_size = ::_pbi::ToCachedSize(total_size);
925   SetCachedSize(cached_size);
926   return total_size;
927 }
928 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)929 void VirtioGpuCmdResponseFtraceEvent::CheckTypeAndMergeFrom(
930     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
931   MergeFrom(*::_pbi::DownCast<const VirtioGpuCmdResponseFtraceEvent*>(
932       &from));
933 }
934 
MergeFrom(const VirtioGpuCmdResponseFtraceEvent & from)935 void VirtioGpuCmdResponseFtraceEvent::MergeFrom(const VirtioGpuCmdResponseFtraceEvent& from) {
936   VirtioGpuCmdResponseFtraceEvent* const _this = this;
937   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
938   GOOGLE_DCHECK_NE(&from, _this);
939   ::uint32_t cached_has_bits = 0;
940   (void) cached_has_bits;
941 
942   cached_has_bits = from._impl_._has_bits_[0];
943   if (cached_has_bits & 0x000000ffu) {
944     if (cached_has_bits & 0x00000001u) {
945       _this->_internal_set_name(from._internal_name());
946     }
947     if (cached_has_bits & 0x00000002u) {
948       _this->_impl_.ctx_id_ = from._impl_.ctx_id_;
949     }
950     if (cached_has_bits & 0x00000004u) {
951       _this->_impl_.dev_ = from._impl_.dev_;
952     }
953     if (cached_has_bits & 0x00000008u) {
954       _this->_impl_.fence_id_ = from._impl_.fence_id_;
955     }
956     if (cached_has_bits & 0x00000010u) {
957       _this->_impl_.flags_ = from._impl_.flags_;
958     }
959     if (cached_has_bits & 0x00000020u) {
960       _this->_impl_.num_free_ = from._impl_.num_free_;
961     }
962     if (cached_has_bits & 0x00000040u) {
963       _this->_impl_.seqno_ = from._impl_.seqno_;
964     }
965     if (cached_has_bits & 0x00000080u) {
966       _this->_impl_.type_ = from._impl_.type_;
967     }
968     _this->_impl_._has_bits_[0] |= cached_has_bits;
969   }
970   if (cached_has_bits & 0x00000100u) {
971     _this->_internal_set_vq(from._internal_vq());
972   }
973   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
974 }
975 
CopyFrom(const VirtioGpuCmdResponseFtraceEvent & from)976 void VirtioGpuCmdResponseFtraceEvent::CopyFrom(const VirtioGpuCmdResponseFtraceEvent& from) {
977 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VirtioGpuCmdResponseFtraceEvent)
978   if (&from == this) return;
979   Clear();
980   MergeFrom(from);
981 }
982 
IsInitialized() const983 bool VirtioGpuCmdResponseFtraceEvent::IsInitialized() const {
984   return true;
985 }
986 
InternalSwap(VirtioGpuCmdResponseFtraceEvent * other)987 void VirtioGpuCmdResponseFtraceEvent::InternalSwap(VirtioGpuCmdResponseFtraceEvent* other) {
988   using std::swap;
989   auto* lhs_arena = GetArenaForAllocation();
990   auto* rhs_arena = other->GetArenaForAllocation();
991   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
992   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
993   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
994       &_impl_.name_, lhs_arena,
995       &other->_impl_.name_, rhs_arena
996   );
997   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
998       PROTOBUF_FIELD_OFFSET(VirtioGpuCmdResponseFtraceEvent, _impl_.vq_)
999       + sizeof(VirtioGpuCmdResponseFtraceEvent::_impl_.vq_)  // NOLINT
1000       - PROTOBUF_FIELD_OFFSET(VirtioGpuCmdResponseFtraceEvent, _impl_.ctx_id_)>(
1001           reinterpret_cast<char*>(&_impl_.ctx_id_),
1002           reinterpret_cast<char*>(&other->_impl_.ctx_id_));
1003 }
1004 
GetTypeName() const1005 std::string VirtioGpuCmdResponseFtraceEvent::GetTypeName() const {
1006   return "perfetto.protos.VirtioGpuCmdResponseFtraceEvent";
1007 }
1008 
1009 
1010 // @@protoc_insertion_point(namespace_scope)
1011 }  // namespace protos
1012 }  // namespace perfetto
1013 PROTOBUF_NAMESPACE_OPEN
1014 template<> PROTOBUF_NOINLINE ::perfetto::protos::VirtioGpuCmdQueueFtraceEvent*
CreateMaybeMessage(Arena * arena)1015 Arena::CreateMaybeMessage< ::perfetto::protos::VirtioGpuCmdQueueFtraceEvent >(Arena* arena) {
1016   return Arena::CreateMessageInternal< ::perfetto::protos::VirtioGpuCmdQueueFtraceEvent >(arena);
1017 }
1018 template<> PROTOBUF_NOINLINE ::perfetto::protos::VirtioGpuCmdResponseFtraceEvent*
CreateMaybeMessage(Arena * arena)1019 Arena::CreateMaybeMessage< ::perfetto::protos::VirtioGpuCmdResponseFtraceEvent >(Arena* arena) {
1020   return Arena::CreateMessageInternal< ::perfetto::protos::VirtioGpuCmdResponseFtraceEvent >(arena);
1021 }
1022 PROTOBUF_NAMESPACE_CLOSE
1023 
1024 // @@protoc_insertion_point(global_scope)
1025 #include <google/protobuf/port_undef.inc>
1026