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