1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/ftrace.proto
3 
4 #include "protos/perfetto/trace/ftrace/ftrace.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 {
PrintFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR PrintFtraceEvent::PrintFtraceEvent(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.buf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28   , /*decltype(_impl_.ip_)*/::uint64_t{0u}} {}
29 struct PrintFtraceEventDefaultTypeInternal {
PrintFtraceEventDefaultTypeInternalperfetto::protos::PrintFtraceEventDefaultTypeInternal30   PROTOBUF_CONSTEXPR PrintFtraceEventDefaultTypeInternal()
31       : _instance(::_pbi::ConstantInitialized{}) {}
~PrintFtraceEventDefaultTypeInternalperfetto::protos::PrintFtraceEventDefaultTypeInternal32   ~PrintFtraceEventDefaultTypeInternal() {}
33   union {  // NOLINT(misc-non-private-member-variables-in-classes)
34     PrintFtraceEvent _instance;
35   };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PrintFtraceEventDefaultTypeInternal _PrintFtraceEvent_default_instance_;
FuncgraphEntryFtraceEvent(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR FuncgraphEntryFtraceEvent::FuncgraphEntryFtraceEvent(
39     ::_pbi::ConstantInitialized): _impl_{
40     /*decltype(_impl_._has_bits_)*/{}
41   , /*decltype(_impl_._cached_size_)*/{}
42   , /*decltype(_impl_.func_)*/::uint64_t{0u}
43   , /*decltype(_impl_.depth_)*/0} {}
44 struct FuncgraphEntryFtraceEventDefaultTypeInternal {
FuncgraphEntryFtraceEventDefaultTypeInternalperfetto::protos::FuncgraphEntryFtraceEventDefaultTypeInternal45   PROTOBUF_CONSTEXPR FuncgraphEntryFtraceEventDefaultTypeInternal()
46       : _instance(::_pbi::ConstantInitialized{}) {}
~FuncgraphEntryFtraceEventDefaultTypeInternalperfetto::protos::FuncgraphEntryFtraceEventDefaultTypeInternal47   ~FuncgraphEntryFtraceEventDefaultTypeInternal() {}
48   union {  // NOLINT(misc-non-private-member-variables-in-classes)
49     FuncgraphEntryFtraceEvent _instance;
50   };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FuncgraphEntryFtraceEventDefaultTypeInternal _FuncgraphEntryFtraceEvent_default_instance_;
FuncgraphExitFtraceEvent(::_pbi::ConstantInitialized)53 PROTOBUF_CONSTEXPR FuncgraphExitFtraceEvent::FuncgraphExitFtraceEvent(
54     ::_pbi::ConstantInitialized): _impl_{
55     /*decltype(_impl_._has_bits_)*/{}
56   , /*decltype(_impl_._cached_size_)*/{}
57   , /*decltype(_impl_.calltime_)*/::uint64_t{0u}
58   , /*decltype(_impl_.func_)*/::uint64_t{0u}
59   , /*decltype(_impl_.overrun_)*/::uint64_t{0u}
60   , /*decltype(_impl_.rettime_)*/::uint64_t{0u}
61   , /*decltype(_impl_.depth_)*/0} {}
62 struct FuncgraphExitFtraceEventDefaultTypeInternal {
FuncgraphExitFtraceEventDefaultTypeInternalperfetto::protos::FuncgraphExitFtraceEventDefaultTypeInternal63   PROTOBUF_CONSTEXPR FuncgraphExitFtraceEventDefaultTypeInternal()
64       : _instance(::_pbi::ConstantInitialized{}) {}
~FuncgraphExitFtraceEventDefaultTypeInternalperfetto::protos::FuncgraphExitFtraceEventDefaultTypeInternal65   ~FuncgraphExitFtraceEventDefaultTypeInternal() {}
66   union {  // NOLINT(misc-non-private-member-variables-in-classes)
67     FuncgraphExitFtraceEvent _instance;
68   };
69 };
70 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FuncgraphExitFtraceEventDefaultTypeInternal _FuncgraphExitFtraceEvent_default_instance_;
71 }  // namespace protos
72 }  // namespace perfetto
73 namespace perfetto {
74 namespace protos {
75 
76 // ===================================================================
77 
78 class PrintFtraceEvent::_Internal {
79  public:
80   using HasBits = decltype(std::declval<PrintFtraceEvent>()._impl_._has_bits_);
set_has_ip(HasBits * has_bits)81   static void set_has_ip(HasBits* has_bits) {
82     (*has_bits)[0] |= 2u;
83   }
set_has_buf(HasBits * has_bits)84   static void set_has_buf(HasBits* has_bits) {
85     (*has_bits)[0] |= 1u;
86   }
87 };
88 
PrintFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)89 PrintFtraceEvent::PrintFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
90                          bool is_message_owned)
91   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
92   SharedCtor(arena, is_message_owned);
93   // @@protoc_insertion_point(arena_constructor:perfetto.protos.PrintFtraceEvent)
94 }
PrintFtraceEvent(const PrintFtraceEvent & from)95 PrintFtraceEvent::PrintFtraceEvent(const PrintFtraceEvent& from)
96   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
97   PrintFtraceEvent* const _this = this; (void)_this;
98   new (&_impl_) Impl_{
99       decltype(_impl_._has_bits_){from._impl_._has_bits_}
100     , /*decltype(_impl_._cached_size_)*/{}
101     , decltype(_impl_.buf_){}
102     , decltype(_impl_.ip_){}};
103 
104   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
105   _impl_.buf_.InitDefault();
106   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
107     _impl_.buf_.Set("", GetArenaForAllocation());
108   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
109   if (from._internal_has_buf()) {
110     _this->_impl_.buf_.Set(from._internal_buf(),
111       _this->GetArenaForAllocation());
112   }
113   _this->_impl_.ip_ = from._impl_.ip_;
114   // @@protoc_insertion_point(copy_constructor:perfetto.protos.PrintFtraceEvent)
115 }
116 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)117 inline void PrintFtraceEvent::SharedCtor(
118     ::_pb::Arena* arena, bool is_message_owned) {
119   (void)arena;
120   (void)is_message_owned;
121   new (&_impl_) Impl_{
122       decltype(_impl_._has_bits_){}
123     , /*decltype(_impl_._cached_size_)*/{}
124     , decltype(_impl_.buf_){}
125     , decltype(_impl_.ip_){::uint64_t{0u}}
126   };
127   _impl_.buf_.InitDefault();
128   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
129     _impl_.buf_.Set("", GetArenaForAllocation());
130   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
131 }
132 
~PrintFtraceEvent()133 PrintFtraceEvent::~PrintFtraceEvent() {
134   // @@protoc_insertion_point(destructor:perfetto.protos.PrintFtraceEvent)
135   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
136   (void)arena;
137     return;
138   }
139   SharedDtor();
140 }
141 
SharedDtor()142 inline void PrintFtraceEvent::SharedDtor() {
143   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
144   _impl_.buf_.Destroy();
145 }
146 
SetCachedSize(int size) const147 void PrintFtraceEvent::SetCachedSize(int size) const {
148   _impl_._cached_size_.Set(size);
149 }
150 
Clear()151 void PrintFtraceEvent::Clear() {
152 // @@protoc_insertion_point(message_clear_start:perfetto.protos.PrintFtraceEvent)
153   ::uint32_t cached_has_bits = 0;
154   // Prevent compiler warnings about cached_has_bits being unused
155   (void) cached_has_bits;
156 
157   cached_has_bits = _impl_._has_bits_[0];
158   if (cached_has_bits & 0x00000001u) {
159     _impl_.buf_.ClearNonDefaultToEmpty();
160   }
161   _impl_.ip_ = ::uint64_t{0u};
162   _impl_._has_bits_.Clear();
163   _internal_metadata_.Clear<std::string>();
164 }
165 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)166 const char* PrintFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
167 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
168   _Internal::HasBits has_bits{};
169   while (!ctx->Done(&ptr)) {
170     ::uint32_t tag;
171     ptr = ::_pbi::ReadTag(ptr, &tag);
172     switch (tag >> 3) {
173       // optional uint64 ip = 1;
174       case 1:
175         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
176           _Internal::set_has_ip(&has_bits);
177           _impl_.ip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
178           CHK_(ptr);
179         } else {
180           goto handle_unusual;
181         }
182         continue;
183       // optional string buf = 2;
184       case 2:
185         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
186           auto str = _internal_mutable_buf();
187           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
188           CHK_(ptr);
189         } else {
190           goto handle_unusual;
191         }
192         continue;
193       default:
194         goto handle_unusual;
195     }  // switch
196   handle_unusual:
197     if ((tag == 0) || ((tag & 7) == 4)) {
198       CHK_(ptr);
199       ctx->SetLastTag(tag);
200       goto message_done;
201     }
202     ptr = UnknownFieldParse(
203         tag,
204         _internal_metadata_.mutable_unknown_fields<std::string>(),
205         ptr, ctx);
206     CHK_(ptr != nullptr);
207   }  // while
208 message_done:
209   _impl_._has_bits_.Or(has_bits);
210   return ptr;
211 failure:
212   ptr = nullptr;
213   goto message_done;
214 #undef CHK_
215 }
216 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const217 ::uint8_t* PrintFtraceEvent::_InternalSerialize(
218     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
219   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.PrintFtraceEvent)
220   ::uint32_t cached_has_bits = 0;
221   (void) cached_has_bits;
222 
223   cached_has_bits = _impl_._has_bits_[0];
224   // optional uint64 ip = 1;
225   if (cached_has_bits & 0x00000002u) {
226     target = stream->EnsureSpace(target);
227     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_ip(), target);
228   }
229 
230   // optional string buf = 2;
231   if (cached_has_bits & 0x00000001u) {
232     target = stream->WriteStringMaybeAliased(
233         2, this->_internal_buf(), target);
234   }
235 
236   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
237     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
238         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
239   }
240   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.PrintFtraceEvent)
241   return target;
242 }
243 
ByteSizeLong() const244 size_t PrintFtraceEvent::ByteSizeLong() const {
245 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.PrintFtraceEvent)
246   size_t total_size = 0;
247 
248   ::uint32_t cached_has_bits = 0;
249   // Prevent compiler warnings about cached_has_bits being unused
250   (void) cached_has_bits;
251 
252   cached_has_bits = _impl_._has_bits_[0];
253   if (cached_has_bits & 0x00000003u) {
254     // optional string buf = 2;
255     if (cached_has_bits & 0x00000001u) {
256       total_size += 1 +
257         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
258           this->_internal_buf());
259     }
260 
261     // optional uint64 ip = 1;
262     if (cached_has_bits & 0x00000002u) {
263       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_ip());
264     }
265 
266   }
267   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
268     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
269   }
270   int cached_size = ::_pbi::ToCachedSize(total_size);
271   SetCachedSize(cached_size);
272   return total_size;
273 }
274 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)275 void PrintFtraceEvent::CheckTypeAndMergeFrom(
276     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
277   MergeFrom(*::_pbi::DownCast<const PrintFtraceEvent*>(
278       &from));
279 }
280 
MergeFrom(const PrintFtraceEvent & from)281 void PrintFtraceEvent::MergeFrom(const PrintFtraceEvent& from) {
282   PrintFtraceEvent* const _this = this;
283   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.PrintFtraceEvent)
284   GOOGLE_DCHECK_NE(&from, _this);
285   ::uint32_t cached_has_bits = 0;
286   (void) cached_has_bits;
287 
288   cached_has_bits = from._impl_._has_bits_[0];
289   if (cached_has_bits & 0x00000003u) {
290     if (cached_has_bits & 0x00000001u) {
291       _this->_internal_set_buf(from._internal_buf());
292     }
293     if (cached_has_bits & 0x00000002u) {
294       _this->_impl_.ip_ = from._impl_.ip_;
295     }
296     _this->_impl_._has_bits_[0] |= cached_has_bits;
297   }
298   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
299 }
300 
CopyFrom(const PrintFtraceEvent & from)301 void PrintFtraceEvent::CopyFrom(const PrintFtraceEvent& from) {
302 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.PrintFtraceEvent)
303   if (&from == this) return;
304   Clear();
305   MergeFrom(from);
306 }
307 
IsInitialized() const308 bool PrintFtraceEvent::IsInitialized() const {
309   return true;
310 }
311 
InternalSwap(PrintFtraceEvent * other)312 void PrintFtraceEvent::InternalSwap(PrintFtraceEvent* other) {
313   using std::swap;
314   auto* lhs_arena = GetArenaForAllocation();
315   auto* rhs_arena = other->GetArenaForAllocation();
316   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
317   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
318   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
319       &_impl_.buf_, lhs_arena,
320       &other->_impl_.buf_, rhs_arena
321   );
322   swap(_impl_.ip_, other->_impl_.ip_);
323 }
324 
GetTypeName() const325 std::string PrintFtraceEvent::GetTypeName() const {
326   return "perfetto.protos.PrintFtraceEvent";
327 }
328 
329 
330 // ===================================================================
331 
332 class FuncgraphEntryFtraceEvent::_Internal {
333  public:
334   using HasBits = decltype(std::declval<FuncgraphEntryFtraceEvent>()._impl_._has_bits_);
set_has_depth(HasBits * has_bits)335   static void set_has_depth(HasBits* has_bits) {
336     (*has_bits)[0] |= 2u;
337   }
set_has_func(HasBits * has_bits)338   static void set_has_func(HasBits* has_bits) {
339     (*has_bits)[0] |= 1u;
340   }
341 };
342 
FuncgraphEntryFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)343 FuncgraphEntryFtraceEvent::FuncgraphEntryFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
344                          bool is_message_owned)
345   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
346   SharedCtor(arena, is_message_owned);
347   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FuncgraphEntryFtraceEvent)
348 }
FuncgraphEntryFtraceEvent(const FuncgraphEntryFtraceEvent & from)349 FuncgraphEntryFtraceEvent::FuncgraphEntryFtraceEvent(const FuncgraphEntryFtraceEvent& from)
350   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
351   FuncgraphEntryFtraceEvent* const _this = this; (void)_this;
352   new (&_impl_) Impl_{
353       decltype(_impl_._has_bits_){from._impl_._has_bits_}
354     , /*decltype(_impl_._cached_size_)*/{}
355     , decltype(_impl_.func_){}
356     , decltype(_impl_.depth_){}};
357 
358   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
359   ::memcpy(&_impl_.func_, &from._impl_.func_,
360     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.depth_) -
361     reinterpret_cast<char*>(&_impl_.func_)) + sizeof(_impl_.depth_));
362   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FuncgraphEntryFtraceEvent)
363 }
364 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)365 inline void FuncgraphEntryFtraceEvent::SharedCtor(
366     ::_pb::Arena* arena, bool is_message_owned) {
367   (void)arena;
368   (void)is_message_owned;
369   new (&_impl_) Impl_{
370       decltype(_impl_._has_bits_){}
371     , /*decltype(_impl_._cached_size_)*/{}
372     , decltype(_impl_.func_){::uint64_t{0u}}
373     , decltype(_impl_.depth_){0}
374   };
375 }
376 
~FuncgraphEntryFtraceEvent()377 FuncgraphEntryFtraceEvent::~FuncgraphEntryFtraceEvent() {
378   // @@protoc_insertion_point(destructor:perfetto.protos.FuncgraphEntryFtraceEvent)
379   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
380   (void)arena;
381     return;
382   }
383   SharedDtor();
384 }
385 
SharedDtor()386 inline void FuncgraphEntryFtraceEvent::SharedDtor() {
387   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
388 }
389 
SetCachedSize(int size) const390 void FuncgraphEntryFtraceEvent::SetCachedSize(int size) const {
391   _impl_._cached_size_.Set(size);
392 }
393 
Clear()394 void FuncgraphEntryFtraceEvent::Clear() {
395 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FuncgraphEntryFtraceEvent)
396   ::uint32_t cached_has_bits = 0;
397   // Prevent compiler warnings about cached_has_bits being unused
398   (void) cached_has_bits;
399 
400   cached_has_bits = _impl_._has_bits_[0];
401   if (cached_has_bits & 0x00000003u) {
402     ::memset(&_impl_.func_, 0, static_cast<size_t>(
403         reinterpret_cast<char*>(&_impl_.depth_) -
404         reinterpret_cast<char*>(&_impl_.func_)) + sizeof(_impl_.depth_));
405   }
406   _impl_._has_bits_.Clear();
407   _internal_metadata_.Clear<std::string>();
408 }
409 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)410 const char* FuncgraphEntryFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
411 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
412   _Internal::HasBits has_bits{};
413   while (!ctx->Done(&ptr)) {
414     ::uint32_t tag;
415     ptr = ::_pbi::ReadTag(ptr, &tag);
416     switch (tag >> 3) {
417       // optional int32 depth = 1;
418       case 1:
419         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
420           _Internal::set_has_depth(&has_bits);
421           _impl_.depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
422           CHK_(ptr);
423         } else {
424           goto handle_unusual;
425         }
426         continue;
427       // optional uint64 func = 2;
428       case 2:
429         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
430           _Internal::set_has_func(&has_bits);
431           _impl_.func_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
432           CHK_(ptr);
433         } else {
434           goto handle_unusual;
435         }
436         continue;
437       default:
438         goto handle_unusual;
439     }  // switch
440   handle_unusual:
441     if ((tag == 0) || ((tag & 7) == 4)) {
442       CHK_(ptr);
443       ctx->SetLastTag(tag);
444       goto message_done;
445     }
446     ptr = UnknownFieldParse(
447         tag,
448         _internal_metadata_.mutable_unknown_fields<std::string>(),
449         ptr, ctx);
450     CHK_(ptr != nullptr);
451   }  // while
452 message_done:
453   _impl_._has_bits_.Or(has_bits);
454   return ptr;
455 failure:
456   ptr = nullptr;
457   goto message_done;
458 #undef CHK_
459 }
460 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const461 ::uint8_t* FuncgraphEntryFtraceEvent::_InternalSerialize(
462     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
463   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FuncgraphEntryFtraceEvent)
464   ::uint32_t cached_has_bits = 0;
465   (void) cached_has_bits;
466 
467   cached_has_bits = _impl_._has_bits_[0];
468   // optional int32 depth = 1;
469   if (cached_has_bits & 0x00000002u) {
470     target = stream->EnsureSpace(target);
471     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_depth(), target);
472   }
473 
474   // optional uint64 func = 2;
475   if (cached_has_bits & 0x00000001u) {
476     target = stream->EnsureSpace(target);
477     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_func(), target);
478   }
479 
480   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
481     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
482         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
483   }
484   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FuncgraphEntryFtraceEvent)
485   return target;
486 }
487 
ByteSizeLong() const488 size_t FuncgraphEntryFtraceEvent::ByteSizeLong() const {
489 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FuncgraphEntryFtraceEvent)
490   size_t total_size = 0;
491 
492   ::uint32_t cached_has_bits = 0;
493   // Prevent compiler warnings about cached_has_bits being unused
494   (void) cached_has_bits;
495 
496   cached_has_bits = _impl_._has_bits_[0];
497   if (cached_has_bits & 0x00000003u) {
498     // optional uint64 func = 2;
499     if (cached_has_bits & 0x00000001u) {
500       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_func());
501     }
502 
503     // optional int32 depth = 1;
504     if (cached_has_bits & 0x00000002u) {
505       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_depth());
506     }
507 
508   }
509   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
510     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
511   }
512   int cached_size = ::_pbi::ToCachedSize(total_size);
513   SetCachedSize(cached_size);
514   return total_size;
515 }
516 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)517 void FuncgraphEntryFtraceEvent::CheckTypeAndMergeFrom(
518     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
519   MergeFrom(*::_pbi::DownCast<const FuncgraphEntryFtraceEvent*>(
520       &from));
521 }
522 
MergeFrom(const FuncgraphEntryFtraceEvent & from)523 void FuncgraphEntryFtraceEvent::MergeFrom(const FuncgraphEntryFtraceEvent& from) {
524   FuncgraphEntryFtraceEvent* const _this = this;
525   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FuncgraphEntryFtraceEvent)
526   GOOGLE_DCHECK_NE(&from, _this);
527   ::uint32_t cached_has_bits = 0;
528   (void) cached_has_bits;
529 
530   cached_has_bits = from._impl_._has_bits_[0];
531   if (cached_has_bits & 0x00000003u) {
532     if (cached_has_bits & 0x00000001u) {
533       _this->_impl_.func_ = from._impl_.func_;
534     }
535     if (cached_has_bits & 0x00000002u) {
536       _this->_impl_.depth_ = from._impl_.depth_;
537     }
538     _this->_impl_._has_bits_[0] |= cached_has_bits;
539   }
540   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
541 }
542 
CopyFrom(const FuncgraphEntryFtraceEvent & from)543 void FuncgraphEntryFtraceEvent::CopyFrom(const FuncgraphEntryFtraceEvent& from) {
544 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FuncgraphEntryFtraceEvent)
545   if (&from == this) return;
546   Clear();
547   MergeFrom(from);
548 }
549 
IsInitialized() const550 bool FuncgraphEntryFtraceEvent::IsInitialized() const {
551   return true;
552 }
553 
InternalSwap(FuncgraphEntryFtraceEvent * other)554 void FuncgraphEntryFtraceEvent::InternalSwap(FuncgraphEntryFtraceEvent* other) {
555   using std::swap;
556   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
557   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
558   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
559       PROTOBUF_FIELD_OFFSET(FuncgraphEntryFtraceEvent, _impl_.depth_)
560       + sizeof(FuncgraphEntryFtraceEvent::_impl_.depth_)  // NOLINT
561       - PROTOBUF_FIELD_OFFSET(FuncgraphEntryFtraceEvent, _impl_.func_)>(
562           reinterpret_cast<char*>(&_impl_.func_),
563           reinterpret_cast<char*>(&other->_impl_.func_));
564 }
565 
GetTypeName() const566 std::string FuncgraphEntryFtraceEvent::GetTypeName() const {
567   return "perfetto.protos.FuncgraphEntryFtraceEvent";
568 }
569 
570 
571 // ===================================================================
572 
573 class FuncgraphExitFtraceEvent::_Internal {
574  public:
575   using HasBits = decltype(std::declval<FuncgraphExitFtraceEvent>()._impl_._has_bits_);
set_has_calltime(HasBits * has_bits)576   static void set_has_calltime(HasBits* has_bits) {
577     (*has_bits)[0] |= 1u;
578   }
set_has_depth(HasBits * has_bits)579   static void set_has_depth(HasBits* has_bits) {
580     (*has_bits)[0] |= 16u;
581   }
set_has_func(HasBits * has_bits)582   static void set_has_func(HasBits* has_bits) {
583     (*has_bits)[0] |= 2u;
584   }
set_has_overrun(HasBits * has_bits)585   static void set_has_overrun(HasBits* has_bits) {
586     (*has_bits)[0] |= 4u;
587   }
set_has_rettime(HasBits * has_bits)588   static void set_has_rettime(HasBits* has_bits) {
589     (*has_bits)[0] |= 8u;
590   }
591 };
592 
FuncgraphExitFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)593 FuncgraphExitFtraceEvent::FuncgraphExitFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
594                          bool is_message_owned)
595   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
596   SharedCtor(arena, is_message_owned);
597   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FuncgraphExitFtraceEvent)
598 }
FuncgraphExitFtraceEvent(const FuncgraphExitFtraceEvent & from)599 FuncgraphExitFtraceEvent::FuncgraphExitFtraceEvent(const FuncgraphExitFtraceEvent& from)
600   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
601   FuncgraphExitFtraceEvent* const _this = this; (void)_this;
602   new (&_impl_) Impl_{
603       decltype(_impl_._has_bits_){from._impl_._has_bits_}
604     , /*decltype(_impl_._cached_size_)*/{}
605     , decltype(_impl_.calltime_){}
606     , decltype(_impl_.func_){}
607     , decltype(_impl_.overrun_){}
608     , decltype(_impl_.rettime_){}
609     , decltype(_impl_.depth_){}};
610 
611   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
612   ::memcpy(&_impl_.calltime_, &from._impl_.calltime_,
613     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.depth_) -
614     reinterpret_cast<char*>(&_impl_.calltime_)) + sizeof(_impl_.depth_));
615   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FuncgraphExitFtraceEvent)
616 }
617 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)618 inline void FuncgraphExitFtraceEvent::SharedCtor(
619     ::_pb::Arena* arena, bool is_message_owned) {
620   (void)arena;
621   (void)is_message_owned;
622   new (&_impl_) Impl_{
623       decltype(_impl_._has_bits_){}
624     , /*decltype(_impl_._cached_size_)*/{}
625     , decltype(_impl_.calltime_){::uint64_t{0u}}
626     , decltype(_impl_.func_){::uint64_t{0u}}
627     , decltype(_impl_.overrun_){::uint64_t{0u}}
628     , decltype(_impl_.rettime_){::uint64_t{0u}}
629     , decltype(_impl_.depth_){0}
630   };
631 }
632 
~FuncgraphExitFtraceEvent()633 FuncgraphExitFtraceEvent::~FuncgraphExitFtraceEvent() {
634   // @@protoc_insertion_point(destructor:perfetto.protos.FuncgraphExitFtraceEvent)
635   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
636   (void)arena;
637     return;
638   }
639   SharedDtor();
640 }
641 
SharedDtor()642 inline void FuncgraphExitFtraceEvent::SharedDtor() {
643   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
644 }
645 
SetCachedSize(int size) const646 void FuncgraphExitFtraceEvent::SetCachedSize(int size) const {
647   _impl_._cached_size_.Set(size);
648 }
649 
Clear()650 void FuncgraphExitFtraceEvent::Clear() {
651 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FuncgraphExitFtraceEvent)
652   ::uint32_t cached_has_bits = 0;
653   // Prevent compiler warnings about cached_has_bits being unused
654   (void) cached_has_bits;
655 
656   cached_has_bits = _impl_._has_bits_[0];
657   if (cached_has_bits & 0x0000001fu) {
658     ::memset(&_impl_.calltime_, 0, static_cast<size_t>(
659         reinterpret_cast<char*>(&_impl_.depth_) -
660         reinterpret_cast<char*>(&_impl_.calltime_)) + sizeof(_impl_.depth_));
661   }
662   _impl_._has_bits_.Clear();
663   _internal_metadata_.Clear<std::string>();
664 }
665 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)666 const char* FuncgraphExitFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
667 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
668   _Internal::HasBits has_bits{};
669   while (!ctx->Done(&ptr)) {
670     ::uint32_t tag;
671     ptr = ::_pbi::ReadTag(ptr, &tag);
672     switch (tag >> 3) {
673       // optional uint64 calltime = 1;
674       case 1:
675         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
676           _Internal::set_has_calltime(&has_bits);
677           _impl_.calltime_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
678           CHK_(ptr);
679         } else {
680           goto handle_unusual;
681         }
682         continue;
683       // optional int32 depth = 2;
684       case 2:
685         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
686           _Internal::set_has_depth(&has_bits);
687           _impl_.depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
688           CHK_(ptr);
689         } else {
690           goto handle_unusual;
691         }
692         continue;
693       // optional uint64 func = 3;
694       case 3:
695         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
696           _Internal::set_has_func(&has_bits);
697           _impl_.func_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
698           CHK_(ptr);
699         } else {
700           goto handle_unusual;
701         }
702         continue;
703       // optional uint64 overrun = 4;
704       case 4:
705         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
706           _Internal::set_has_overrun(&has_bits);
707           _impl_.overrun_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
708           CHK_(ptr);
709         } else {
710           goto handle_unusual;
711         }
712         continue;
713       // optional uint64 rettime = 5;
714       case 5:
715         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
716           _Internal::set_has_rettime(&has_bits);
717           _impl_.rettime_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
718           CHK_(ptr);
719         } else {
720           goto handle_unusual;
721         }
722         continue;
723       default:
724         goto handle_unusual;
725     }  // switch
726   handle_unusual:
727     if ((tag == 0) || ((tag & 7) == 4)) {
728       CHK_(ptr);
729       ctx->SetLastTag(tag);
730       goto message_done;
731     }
732     ptr = UnknownFieldParse(
733         tag,
734         _internal_metadata_.mutable_unknown_fields<std::string>(),
735         ptr, ctx);
736     CHK_(ptr != nullptr);
737   }  // while
738 message_done:
739   _impl_._has_bits_.Or(has_bits);
740   return ptr;
741 failure:
742   ptr = nullptr;
743   goto message_done;
744 #undef CHK_
745 }
746 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const747 ::uint8_t* FuncgraphExitFtraceEvent::_InternalSerialize(
748     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
749   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FuncgraphExitFtraceEvent)
750   ::uint32_t cached_has_bits = 0;
751   (void) cached_has_bits;
752 
753   cached_has_bits = _impl_._has_bits_[0];
754   // optional uint64 calltime = 1;
755   if (cached_has_bits & 0x00000001u) {
756     target = stream->EnsureSpace(target);
757     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_calltime(), target);
758   }
759 
760   // optional int32 depth = 2;
761   if (cached_has_bits & 0x00000010u) {
762     target = stream->EnsureSpace(target);
763     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_depth(), target);
764   }
765 
766   // optional uint64 func = 3;
767   if (cached_has_bits & 0x00000002u) {
768     target = stream->EnsureSpace(target);
769     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_func(), target);
770   }
771 
772   // optional uint64 overrun = 4;
773   if (cached_has_bits & 0x00000004u) {
774     target = stream->EnsureSpace(target);
775     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_overrun(), target);
776   }
777 
778   // optional uint64 rettime = 5;
779   if (cached_has_bits & 0x00000008u) {
780     target = stream->EnsureSpace(target);
781     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_rettime(), target);
782   }
783 
784   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
785     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
786         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
787   }
788   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FuncgraphExitFtraceEvent)
789   return target;
790 }
791 
ByteSizeLong() const792 size_t FuncgraphExitFtraceEvent::ByteSizeLong() const {
793 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FuncgraphExitFtraceEvent)
794   size_t total_size = 0;
795 
796   ::uint32_t cached_has_bits = 0;
797   // Prevent compiler warnings about cached_has_bits being unused
798   (void) cached_has_bits;
799 
800   cached_has_bits = _impl_._has_bits_[0];
801   if (cached_has_bits & 0x0000001fu) {
802     // optional uint64 calltime = 1;
803     if (cached_has_bits & 0x00000001u) {
804       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_calltime());
805     }
806 
807     // optional uint64 func = 3;
808     if (cached_has_bits & 0x00000002u) {
809       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_func());
810     }
811 
812     // optional uint64 overrun = 4;
813     if (cached_has_bits & 0x00000004u) {
814       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_overrun());
815     }
816 
817     // optional uint64 rettime = 5;
818     if (cached_has_bits & 0x00000008u) {
819       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_rettime());
820     }
821 
822     // optional int32 depth = 2;
823     if (cached_has_bits & 0x00000010u) {
824       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_depth());
825     }
826 
827   }
828   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
829     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
830   }
831   int cached_size = ::_pbi::ToCachedSize(total_size);
832   SetCachedSize(cached_size);
833   return total_size;
834 }
835 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)836 void FuncgraphExitFtraceEvent::CheckTypeAndMergeFrom(
837     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
838   MergeFrom(*::_pbi::DownCast<const FuncgraphExitFtraceEvent*>(
839       &from));
840 }
841 
MergeFrom(const FuncgraphExitFtraceEvent & from)842 void FuncgraphExitFtraceEvent::MergeFrom(const FuncgraphExitFtraceEvent& from) {
843   FuncgraphExitFtraceEvent* const _this = this;
844   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FuncgraphExitFtraceEvent)
845   GOOGLE_DCHECK_NE(&from, _this);
846   ::uint32_t cached_has_bits = 0;
847   (void) cached_has_bits;
848 
849   cached_has_bits = from._impl_._has_bits_[0];
850   if (cached_has_bits & 0x0000001fu) {
851     if (cached_has_bits & 0x00000001u) {
852       _this->_impl_.calltime_ = from._impl_.calltime_;
853     }
854     if (cached_has_bits & 0x00000002u) {
855       _this->_impl_.func_ = from._impl_.func_;
856     }
857     if (cached_has_bits & 0x00000004u) {
858       _this->_impl_.overrun_ = from._impl_.overrun_;
859     }
860     if (cached_has_bits & 0x00000008u) {
861       _this->_impl_.rettime_ = from._impl_.rettime_;
862     }
863     if (cached_has_bits & 0x00000010u) {
864       _this->_impl_.depth_ = from._impl_.depth_;
865     }
866     _this->_impl_._has_bits_[0] |= cached_has_bits;
867   }
868   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
869 }
870 
CopyFrom(const FuncgraphExitFtraceEvent & from)871 void FuncgraphExitFtraceEvent::CopyFrom(const FuncgraphExitFtraceEvent& from) {
872 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FuncgraphExitFtraceEvent)
873   if (&from == this) return;
874   Clear();
875   MergeFrom(from);
876 }
877 
IsInitialized() const878 bool FuncgraphExitFtraceEvent::IsInitialized() const {
879   return true;
880 }
881 
InternalSwap(FuncgraphExitFtraceEvent * other)882 void FuncgraphExitFtraceEvent::InternalSwap(FuncgraphExitFtraceEvent* other) {
883   using std::swap;
884   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
885   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
886   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
887       PROTOBUF_FIELD_OFFSET(FuncgraphExitFtraceEvent, _impl_.depth_)
888       + sizeof(FuncgraphExitFtraceEvent::_impl_.depth_)  // NOLINT
889       - PROTOBUF_FIELD_OFFSET(FuncgraphExitFtraceEvent, _impl_.calltime_)>(
890           reinterpret_cast<char*>(&_impl_.calltime_),
891           reinterpret_cast<char*>(&other->_impl_.calltime_));
892 }
893 
GetTypeName() const894 std::string FuncgraphExitFtraceEvent::GetTypeName() const {
895   return "perfetto.protos.FuncgraphExitFtraceEvent";
896 }
897 
898 
899 // @@protoc_insertion_point(namespace_scope)
900 }  // namespace protos
901 }  // namespace perfetto
902 PROTOBUF_NAMESPACE_OPEN
903 template<> PROTOBUF_NOINLINE ::perfetto::protos::PrintFtraceEvent*
CreateMaybeMessage(Arena * arena)904 Arena::CreateMaybeMessage< ::perfetto::protos::PrintFtraceEvent >(Arena* arena) {
905   return Arena::CreateMessageInternal< ::perfetto::protos::PrintFtraceEvent >(arena);
906 }
907 template<> PROTOBUF_NOINLINE ::perfetto::protos::FuncgraphEntryFtraceEvent*
CreateMaybeMessage(Arena * arena)908 Arena::CreateMaybeMessage< ::perfetto::protos::FuncgraphEntryFtraceEvent >(Arena* arena) {
909   return Arena::CreateMessageInternal< ::perfetto::protos::FuncgraphEntryFtraceEvent >(arena);
910 }
911 template<> PROTOBUF_NOINLINE ::perfetto::protos::FuncgraphExitFtraceEvent*
CreateMaybeMessage(Arena * arena)912 Arena::CreateMaybeMessage< ::perfetto::protos::FuncgraphExitFtraceEvent >(Arena* arena) {
913   return Arena::CreateMessageInternal< ::perfetto::protos::FuncgraphExitFtraceEvent >(arena);
914 }
915 PROTOBUF_NAMESPACE_CLOSE
916 
917 // @@protoc_insertion_point(global_scope)
918 #include <google/protobuf/port_undef.inc>
919