1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/task.proto
3 
4 #include "protos/perfetto/trace/ftrace/task.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 {
TaskNewtaskFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR TaskNewtaskFtraceEvent::TaskNewtaskFtraceEvent(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.comm_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28   , /*decltype(_impl_.pid_)*/0
29   , /*decltype(_impl_.oom_score_adj_)*/0
30   , /*decltype(_impl_.clone_flags_)*/::uint64_t{0u}} {}
31 struct TaskNewtaskFtraceEventDefaultTypeInternal {
TaskNewtaskFtraceEventDefaultTypeInternalperfetto::protos::TaskNewtaskFtraceEventDefaultTypeInternal32   PROTOBUF_CONSTEXPR TaskNewtaskFtraceEventDefaultTypeInternal()
33       : _instance(::_pbi::ConstantInitialized{}) {}
~TaskNewtaskFtraceEventDefaultTypeInternalperfetto::protos::TaskNewtaskFtraceEventDefaultTypeInternal34   ~TaskNewtaskFtraceEventDefaultTypeInternal() {}
35   union {  // NOLINT(misc-non-private-member-variables-in-classes)
36     TaskNewtaskFtraceEvent _instance;
37   };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TaskNewtaskFtraceEventDefaultTypeInternal _TaskNewtaskFtraceEvent_default_instance_;
TaskRenameFtraceEvent(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR TaskRenameFtraceEvent::TaskRenameFtraceEvent(
41     ::_pbi::ConstantInitialized): _impl_{
42     /*decltype(_impl_._has_bits_)*/{}
43   , /*decltype(_impl_._cached_size_)*/{}
44   , /*decltype(_impl_.oldcomm_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
45   , /*decltype(_impl_.newcomm_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
46   , /*decltype(_impl_.pid_)*/0
47   , /*decltype(_impl_.oom_score_adj_)*/0} {}
48 struct TaskRenameFtraceEventDefaultTypeInternal {
TaskRenameFtraceEventDefaultTypeInternalperfetto::protos::TaskRenameFtraceEventDefaultTypeInternal49   PROTOBUF_CONSTEXPR TaskRenameFtraceEventDefaultTypeInternal()
50       : _instance(::_pbi::ConstantInitialized{}) {}
~TaskRenameFtraceEventDefaultTypeInternalperfetto::protos::TaskRenameFtraceEventDefaultTypeInternal51   ~TaskRenameFtraceEventDefaultTypeInternal() {}
52   union {  // NOLINT(misc-non-private-member-variables-in-classes)
53     TaskRenameFtraceEvent _instance;
54   };
55 };
56 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TaskRenameFtraceEventDefaultTypeInternal _TaskRenameFtraceEvent_default_instance_;
57 }  // namespace protos
58 }  // namespace perfetto
59 namespace perfetto {
60 namespace protos {
61 
62 // ===================================================================
63 
64 class TaskNewtaskFtraceEvent::_Internal {
65  public:
66   using HasBits = decltype(std::declval<TaskNewtaskFtraceEvent>()._impl_._has_bits_);
set_has_pid(HasBits * has_bits)67   static void set_has_pid(HasBits* has_bits) {
68     (*has_bits)[0] |= 2u;
69   }
set_has_comm(HasBits * has_bits)70   static void set_has_comm(HasBits* has_bits) {
71     (*has_bits)[0] |= 1u;
72   }
set_has_clone_flags(HasBits * has_bits)73   static void set_has_clone_flags(HasBits* has_bits) {
74     (*has_bits)[0] |= 8u;
75   }
set_has_oom_score_adj(HasBits * has_bits)76   static void set_has_oom_score_adj(HasBits* has_bits) {
77     (*has_bits)[0] |= 4u;
78   }
79 };
80 
TaskNewtaskFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)81 TaskNewtaskFtraceEvent::TaskNewtaskFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
82                          bool is_message_owned)
83   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
84   SharedCtor(arena, is_message_owned);
85   // @@protoc_insertion_point(arena_constructor:perfetto.protos.TaskNewtaskFtraceEvent)
86 }
TaskNewtaskFtraceEvent(const TaskNewtaskFtraceEvent & from)87 TaskNewtaskFtraceEvent::TaskNewtaskFtraceEvent(const TaskNewtaskFtraceEvent& from)
88   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
89   TaskNewtaskFtraceEvent* const _this = this; (void)_this;
90   new (&_impl_) Impl_{
91       decltype(_impl_._has_bits_){from._impl_._has_bits_}
92     , /*decltype(_impl_._cached_size_)*/{}
93     , decltype(_impl_.comm_){}
94     , decltype(_impl_.pid_){}
95     , decltype(_impl_.oom_score_adj_){}
96     , decltype(_impl_.clone_flags_){}};
97 
98   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
99   _impl_.comm_.InitDefault();
100   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
101     _impl_.comm_.Set("", GetArenaForAllocation());
102   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
103   if (from._internal_has_comm()) {
104     _this->_impl_.comm_.Set(from._internal_comm(),
105       _this->GetArenaForAllocation());
106   }
107   ::memcpy(&_impl_.pid_, &from._impl_.pid_,
108     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.clone_flags_) -
109     reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.clone_flags_));
110   // @@protoc_insertion_point(copy_constructor:perfetto.protos.TaskNewtaskFtraceEvent)
111 }
112 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)113 inline void TaskNewtaskFtraceEvent::SharedCtor(
114     ::_pb::Arena* arena, bool is_message_owned) {
115   (void)arena;
116   (void)is_message_owned;
117   new (&_impl_) Impl_{
118       decltype(_impl_._has_bits_){}
119     , /*decltype(_impl_._cached_size_)*/{}
120     , decltype(_impl_.comm_){}
121     , decltype(_impl_.pid_){0}
122     , decltype(_impl_.oom_score_adj_){0}
123     , decltype(_impl_.clone_flags_){::uint64_t{0u}}
124   };
125   _impl_.comm_.InitDefault();
126   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
127     _impl_.comm_.Set("", GetArenaForAllocation());
128   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
129 }
130 
~TaskNewtaskFtraceEvent()131 TaskNewtaskFtraceEvent::~TaskNewtaskFtraceEvent() {
132   // @@protoc_insertion_point(destructor:perfetto.protos.TaskNewtaskFtraceEvent)
133   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
134   (void)arena;
135     return;
136   }
137   SharedDtor();
138 }
139 
SharedDtor()140 inline void TaskNewtaskFtraceEvent::SharedDtor() {
141   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
142   _impl_.comm_.Destroy();
143 }
144 
SetCachedSize(int size) const145 void TaskNewtaskFtraceEvent::SetCachedSize(int size) const {
146   _impl_._cached_size_.Set(size);
147 }
148 
Clear()149 void TaskNewtaskFtraceEvent::Clear() {
150 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TaskNewtaskFtraceEvent)
151   ::uint32_t cached_has_bits = 0;
152   // Prevent compiler warnings about cached_has_bits being unused
153   (void) cached_has_bits;
154 
155   cached_has_bits = _impl_._has_bits_[0];
156   if (cached_has_bits & 0x00000001u) {
157     _impl_.comm_.ClearNonDefaultToEmpty();
158   }
159   if (cached_has_bits & 0x0000000eu) {
160     ::memset(&_impl_.pid_, 0, static_cast<size_t>(
161         reinterpret_cast<char*>(&_impl_.clone_flags_) -
162         reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.clone_flags_));
163   }
164   _impl_._has_bits_.Clear();
165   _internal_metadata_.Clear<std::string>();
166 }
167 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)168 const char* TaskNewtaskFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
169 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
170   _Internal::HasBits has_bits{};
171   while (!ctx->Done(&ptr)) {
172     ::uint32_t tag;
173     ptr = ::_pbi::ReadTag(ptr, &tag);
174     switch (tag >> 3) {
175       // optional int32 pid = 1;
176       case 1:
177         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
178           _Internal::set_has_pid(&has_bits);
179           _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
180           CHK_(ptr);
181         } else {
182           goto handle_unusual;
183         }
184         continue;
185       // optional string comm = 2;
186       case 2:
187         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
188           auto str = _internal_mutable_comm();
189           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
190           CHK_(ptr);
191         } else {
192           goto handle_unusual;
193         }
194         continue;
195       // optional uint64 clone_flags = 3;
196       case 3:
197         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
198           _Internal::set_has_clone_flags(&has_bits);
199           _impl_.clone_flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
200           CHK_(ptr);
201         } else {
202           goto handle_unusual;
203         }
204         continue;
205       // optional int32 oom_score_adj = 4;
206       case 4:
207         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
208           _Internal::set_has_oom_score_adj(&has_bits);
209           _impl_.oom_score_adj_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
210           CHK_(ptr);
211         } else {
212           goto handle_unusual;
213         }
214         continue;
215       default:
216         goto handle_unusual;
217     }  // switch
218   handle_unusual:
219     if ((tag == 0) || ((tag & 7) == 4)) {
220       CHK_(ptr);
221       ctx->SetLastTag(tag);
222       goto message_done;
223     }
224     ptr = UnknownFieldParse(
225         tag,
226         _internal_metadata_.mutable_unknown_fields<std::string>(),
227         ptr, ctx);
228     CHK_(ptr != nullptr);
229   }  // while
230 message_done:
231   _impl_._has_bits_.Or(has_bits);
232   return ptr;
233 failure:
234   ptr = nullptr;
235   goto message_done;
236 #undef CHK_
237 }
238 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const239 ::uint8_t* TaskNewtaskFtraceEvent::_InternalSerialize(
240     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
241   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TaskNewtaskFtraceEvent)
242   ::uint32_t cached_has_bits = 0;
243   (void) cached_has_bits;
244 
245   cached_has_bits = _impl_._has_bits_[0];
246   // optional int32 pid = 1;
247   if (cached_has_bits & 0x00000002u) {
248     target = stream->EnsureSpace(target);
249     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_pid(), target);
250   }
251 
252   // optional string comm = 2;
253   if (cached_has_bits & 0x00000001u) {
254     target = stream->WriteStringMaybeAliased(
255         2, this->_internal_comm(), target);
256   }
257 
258   // optional uint64 clone_flags = 3;
259   if (cached_has_bits & 0x00000008u) {
260     target = stream->EnsureSpace(target);
261     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_clone_flags(), target);
262   }
263 
264   // optional int32 oom_score_adj = 4;
265   if (cached_has_bits & 0x00000004u) {
266     target = stream->EnsureSpace(target);
267     target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_oom_score_adj(), target);
268   }
269 
270   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
271     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
272         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
273   }
274   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TaskNewtaskFtraceEvent)
275   return target;
276 }
277 
ByteSizeLong() const278 size_t TaskNewtaskFtraceEvent::ByteSizeLong() const {
279 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TaskNewtaskFtraceEvent)
280   size_t total_size = 0;
281 
282   ::uint32_t cached_has_bits = 0;
283   // Prevent compiler warnings about cached_has_bits being unused
284   (void) cached_has_bits;
285 
286   cached_has_bits = _impl_._has_bits_[0];
287   if (cached_has_bits & 0x0000000fu) {
288     // optional string comm = 2;
289     if (cached_has_bits & 0x00000001u) {
290       total_size += 1 +
291         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
292           this->_internal_comm());
293     }
294 
295     // optional int32 pid = 1;
296     if (cached_has_bits & 0x00000002u) {
297       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
298     }
299 
300     // optional int32 oom_score_adj = 4;
301     if (cached_has_bits & 0x00000004u) {
302       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_oom_score_adj());
303     }
304 
305     // optional uint64 clone_flags = 3;
306     if (cached_has_bits & 0x00000008u) {
307       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_clone_flags());
308     }
309 
310   }
311   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
312     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
313   }
314   int cached_size = ::_pbi::ToCachedSize(total_size);
315   SetCachedSize(cached_size);
316   return total_size;
317 }
318 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)319 void TaskNewtaskFtraceEvent::CheckTypeAndMergeFrom(
320     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
321   MergeFrom(*::_pbi::DownCast<const TaskNewtaskFtraceEvent*>(
322       &from));
323 }
324 
MergeFrom(const TaskNewtaskFtraceEvent & from)325 void TaskNewtaskFtraceEvent::MergeFrom(const TaskNewtaskFtraceEvent& from) {
326   TaskNewtaskFtraceEvent* const _this = this;
327   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TaskNewtaskFtraceEvent)
328   GOOGLE_DCHECK_NE(&from, _this);
329   ::uint32_t cached_has_bits = 0;
330   (void) cached_has_bits;
331 
332   cached_has_bits = from._impl_._has_bits_[0];
333   if (cached_has_bits & 0x0000000fu) {
334     if (cached_has_bits & 0x00000001u) {
335       _this->_internal_set_comm(from._internal_comm());
336     }
337     if (cached_has_bits & 0x00000002u) {
338       _this->_impl_.pid_ = from._impl_.pid_;
339     }
340     if (cached_has_bits & 0x00000004u) {
341       _this->_impl_.oom_score_adj_ = from._impl_.oom_score_adj_;
342     }
343     if (cached_has_bits & 0x00000008u) {
344       _this->_impl_.clone_flags_ = from._impl_.clone_flags_;
345     }
346     _this->_impl_._has_bits_[0] |= cached_has_bits;
347   }
348   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
349 }
350 
CopyFrom(const TaskNewtaskFtraceEvent & from)351 void TaskNewtaskFtraceEvent::CopyFrom(const TaskNewtaskFtraceEvent& from) {
352 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TaskNewtaskFtraceEvent)
353   if (&from == this) return;
354   Clear();
355   MergeFrom(from);
356 }
357 
IsInitialized() const358 bool TaskNewtaskFtraceEvent::IsInitialized() const {
359   return true;
360 }
361 
InternalSwap(TaskNewtaskFtraceEvent * other)362 void TaskNewtaskFtraceEvent::InternalSwap(TaskNewtaskFtraceEvent* other) {
363   using std::swap;
364   auto* lhs_arena = GetArenaForAllocation();
365   auto* rhs_arena = other->GetArenaForAllocation();
366   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
367   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
368   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
369       &_impl_.comm_, lhs_arena,
370       &other->_impl_.comm_, rhs_arena
371   );
372   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
373       PROTOBUF_FIELD_OFFSET(TaskNewtaskFtraceEvent, _impl_.clone_flags_)
374       + sizeof(TaskNewtaskFtraceEvent::_impl_.clone_flags_)  // NOLINT
375       - PROTOBUF_FIELD_OFFSET(TaskNewtaskFtraceEvent, _impl_.pid_)>(
376           reinterpret_cast<char*>(&_impl_.pid_),
377           reinterpret_cast<char*>(&other->_impl_.pid_));
378 }
379 
GetTypeName() const380 std::string TaskNewtaskFtraceEvent::GetTypeName() const {
381   return "perfetto.protos.TaskNewtaskFtraceEvent";
382 }
383 
384 
385 // ===================================================================
386 
387 class TaskRenameFtraceEvent::_Internal {
388  public:
389   using HasBits = decltype(std::declval<TaskRenameFtraceEvent>()._impl_._has_bits_);
set_has_pid(HasBits * has_bits)390   static void set_has_pid(HasBits* has_bits) {
391     (*has_bits)[0] |= 4u;
392   }
set_has_oldcomm(HasBits * has_bits)393   static void set_has_oldcomm(HasBits* has_bits) {
394     (*has_bits)[0] |= 1u;
395   }
set_has_newcomm(HasBits * has_bits)396   static void set_has_newcomm(HasBits* has_bits) {
397     (*has_bits)[0] |= 2u;
398   }
set_has_oom_score_adj(HasBits * has_bits)399   static void set_has_oom_score_adj(HasBits* has_bits) {
400     (*has_bits)[0] |= 8u;
401   }
402 };
403 
TaskRenameFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)404 TaskRenameFtraceEvent::TaskRenameFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
405                          bool is_message_owned)
406   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
407   SharedCtor(arena, is_message_owned);
408   // @@protoc_insertion_point(arena_constructor:perfetto.protos.TaskRenameFtraceEvent)
409 }
TaskRenameFtraceEvent(const TaskRenameFtraceEvent & from)410 TaskRenameFtraceEvent::TaskRenameFtraceEvent(const TaskRenameFtraceEvent& from)
411   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
412   TaskRenameFtraceEvent* const _this = this; (void)_this;
413   new (&_impl_) Impl_{
414       decltype(_impl_._has_bits_){from._impl_._has_bits_}
415     , /*decltype(_impl_._cached_size_)*/{}
416     , decltype(_impl_.oldcomm_){}
417     , decltype(_impl_.newcomm_){}
418     , decltype(_impl_.pid_){}
419     , decltype(_impl_.oom_score_adj_){}};
420 
421   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
422   _impl_.oldcomm_.InitDefault();
423   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
424     _impl_.oldcomm_.Set("", GetArenaForAllocation());
425   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
426   if (from._internal_has_oldcomm()) {
427     _this->_impl_.oldcomm_.Set(from._internal_oldcomm(),
428       _this->GetArenaForAllocation());
429   }
430   _impl_.newcomm_.InitDefault();
431   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
432     _impl_.newcomm_.Set("", GetArenaForAllocation());
433   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
434   if (from._internal_has_newcomm()) {
435     _this->_impl_.newcomm_.Set(from._internal_newcomm(),
436       _this->GetArenaForAllocation());
437   }
438   ::memcpy(&_impl_.pid_, &from._impl_.pid_,
439     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.oom_score_adj_) -
440     reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.oom_score_adj_));
441   // @@protoc_insertion_point(copy_constructor:perfetto.protos.TaskRenameFtraceEvent)
442 }
443 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)444 inline void TaskRenameFtraceEvent::SharedCtor(
445     ::_pb::Arena* arena, bool is_message_owned) {
446   (void)arena;
447   (void)is_message_owned;
448   new (&_impl_) Impl_{
449       decltype(_impl_._has_bits_){}
450     , /*decltype(_impl_._cached_size_)*/{}
451     , decltype(_impl_.oldcomm_){}
452     , decltype(_impl_.newcomm_){}
453     , decltype(_impl_.pid_){0}
454     , decltype(_impl_.oom_score_adj_){0}
455   };
456   _impl_.oldcomm_.InitDefault();
457   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
458     _impl_.oldcomm_.Set("", GetArenaForAllocation());
459   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
460   _impl_.newcomm_.InitDefault();
461   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
462     _impl_.newcomm_.Set("", GetArenaForAllocation());
463   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
464 }
465 
~TaskRenameFtraceEvent()466 TaskRenameFtraceEvent::~TaskRenameFtraceEvent() {
467   // @@protoc_insertion_point(destructor:perfetto.protos.TaskRenameFtraceEvent)
468   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
469   (void)arena;
470     return;
471   }
472   SharedDtor();
473 }
474 
SharedDtor()475 inline void TaskRenameFtraceEvent::SharedDtor() {
476   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
477   _impl_.oldcomm_.Destroy();
478   _impl_.newcomm_.Destroy();
479 }
480 
SetCachedSize(int size) const481 void TaskRenameFtraceEvent::SetCachedSize(int size) const {
482   _impl_._cached_size_.Set(size);
483 }
484 
Clear()485 void TaskRenameFtraceEvent::Clear() {
486 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TaskRenameFtraceEvent)
487   ::uint32_t cached_has_bits = 0;
488   // Prevent compiler warnings about cached_has_bits being unused
489   (void) cached_has_bits;
490 
491   cached_has_bits = _impl_._has_bits_[0];
492   if (cached_has_bits & 0x00000003u) {
493     if (cached_has_bits & 0x00000001u) {
494       _impl_.oldcomm_.ClearNonDefaultToEmpty();
495     }
496     if (cached_has_bits & 0x00000002u) {
497       _impl_.newcomm_.ClearNonDefaultToEmpty();
498     }
499   }
500   if (cached_has_bits & 0x0000000cu) {
501     ::memset(&_impl_.pid_, 0, static_cast<size_t>(
502         reinterpret_cast<char*>(&_impl_.oom_score_adj_) -
503         reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.oom_score_adj_));
504   }
505   _impl_._has_bits_.Clear();
506   _internal_metadata_.Clear<std::string>();
507 }
508 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)509 const char* TaskRenameFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
510 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
511   _Internal::HasBits has_bits{};
512   while (!ctx->Done(&ptr)) {
513     ::uint32_t tag;
514     ptr = ::_pbi::ReadTag(ptr, &tag);
515     switch (tag >> 3) {
516       // optional int32 pid = 1;
517       case 1:
518         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
519           _Internal::set_has_pid(&has_bits);
520           _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
521           CHK_(ptr);
522         } else {
523           goto handle_unusual;
524         }
525         continue;
526       // optional string oldcomm = 2;
527       case 2:
528         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
529           auto str = _internal_mutable_oldcomm();
530           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
531           CHK_(ptr);
532         } else {
533           goto handle_unusual;
534         }
535         continue;
536       // optional string newcomm = 3;
537       case 3:
538         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
539           auto str = _internal_mutable_newcomm();
540           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
541           CHK_(ptr);
542         } else {
543           goto handle_unusual;
544         }
545         continue;
546       // optional int32 oom_score_adj = 4;
547       case 4:
548         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
549           _Internal::set_has_oom_score_adj(&has_bits);
550           _impl_.oom_score_adj_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
551           CHK_(ptr);
552         } else {
553           goto handle_unusual;
554         }
555         continue;
556       default:
557         goto handle_unusual;
558     }  // switch
559   handle_unusual:
560     if ((tag == 0) || ((tag & 7) == 4)) {
561       CHK_(ptr);
562       ctx->SetLastTag(tag);
563       goto message_done;
564     }
565     ptr = UnknownFieldParse(
566         tag,
567         _internal_metadata_.mutable_unknown_fields<std::string>(),
568         ptr, ctx);
569     CHK_(ptr != nullptr);
570   }  // while
571 message_done:
572   _impl_._has_bits_.Or(has_bits);
573   return ptr;
574 failure:
575   ptr = nullptr;
576   goto message_done;
577 #undef CHK_
578 }
579 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const580 ::uint8_t* TaskRenameFtraceEvent::_InternalSerialize(
581     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
582   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TaskRenameFtraceEvent)
583   ::uint32_t cached_has_bits = 0;
584   (void) cached_has_bits;
585 
586   cached_has_bits = _impl_._has_bits_[0];
587   // optional int32 pid = 1;
588   if (cached_has_bits & 0x00000004u) {
589     target = stream->EnsureSpace(target);
590     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_pid(), target);
591   }
592 
593   // optional string oldcomm = 2;
594   if (cached_has_bits & 0x00000001u) {
595     target = stream->WriteStringMaybeAliased(
596         2, this->_internal_oldcomm(), target);
597   }
598 
599   // optional string newcomm = 3;
600   if (cached_has_bits & 0x00000002u) {
601     target = stream->WriteStringMaybeAliased(
602         3, this->_internal_newcomm(), target);
603   }
604 
605   // optional int32 oom_score_adj = 4;
606   if (cached_has_bits & 0x00000008u) {
607     target = stream->EnsureSpace(target);
608     target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_oom_score_adj(), target);
609   }
610 
611   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
612     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
613         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
614   }
615   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TaskRenameFtraceEvent)
616   return target;
617 }
618 
ByteSizeLong() const619 size_t TaskRenameFtraceEvent::ByteSizeLong() const {
620 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TaskRenameFtraceEvent)
621   size_t total_size = 0;
622 
623   ::uint32_t cached_has_bits = 0;
624   // Prevent compiler warnings about cached_has_bits being unused
625   (void) cached_has_bits;
626 
627   cached_has_bits = _impl_._has_bits_[0];
628   if (cached_has_bits & 0x0000000fu) {
629     // optional string oldcomm = 2;
630     if (cached_has_bits & 0x00000001u) {
631       total_size += 1 +
632         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
633           this->_internal_oldcomm());
634     }
635 
636     // optional string newcomm = 3;
637     if (cached_has_bits & 0x00000002u) {
638       total_size += 1 +
639         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
640           this->_internal_newcomm());
641     }
642 
643     // optional int32 pid = 1;
644     if (cached_has_bits & 0x00000004u) {
645       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
646     }
647 
648     // optional int32 oom_score_adj = 4;
649     if (cached_has_bits & 0x00000008u) {
650       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_oom_score_adj());
651     }
652 
653   }
654   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
655     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
656   }
657   int cached_size = ::_pbi::ToCachedSize(total_size);
658   SetCachedSize(cached_size);
659   return total_size;
660 }
661 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)662 void TaskRenameFtraceEvent::CheckTypeAndMergeFrom(
663     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
664   MergeFrom(*::_pbi::DownCast<const TaskRenameFtraceEvent*>(
665       &from));
666 }
667 
MergeFrom(const TaskRenameFtraceEvent & from)668 void TaskRenameFtraceEvent::MergeFrom(const TaskRenameFtraceEvent& from) {
669   TaskRenameFtraceEvent* const _this = this;
670   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TaskRenameFtraceEvent)
671   GOOGLE_DCHECK_NE(&from, _this);
672   ::uint32_t cached_has_bits = 0;
673   (void) cached_has_bits;
674 
675   cached_has_bits = from._impl_._has_bits_[0];
676   if (cached_has_bits & 0x0000000fu) {
677     if (cached_has_bits & 0x00000001u) {
678       _this->_internal_set_oldcomm(from._internal_oldcomm());
679     }
680     if (cached_has_bits & 0x00000002u) {
681       _this->_internal_set_newcomm(from._internal_newcomm());
682     }
683     if (cached_has_bits & 0x00000004u) {
684       _this->_impl_.pid_ = from._impl_.pid_;
685     }
686     if (cached_has_bits & 0x00000008u) {
687       _this->_impl_.oom_score_adj_ = from._impl_.oom_score_adj_;
688     }
689     _this->_impl_._has_bits_[0] |= cached_has_bits;
690   }
691   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
692 }
693 
CopyFrom(const TaskRenameFtraceEvent & from)694 void TaskRenameFtraceEvent::CopyFrom(const TaskRenameFtraceEvent& from) {
695 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TaskRenameFtraceEvent)
696   if (&from == this) return;
697   Clear();
698   MergeFrom(from);
699 }
700 
IsInitialized() const701 bool TaskRenameFtraceEvent::IsInitialized() const {
702   return true;
703 }
704 
InternalSwap(TaskRenameFtraceEvent * other)705 void TaskRenameFtraceEvent::InternalSwap(TaskRenameFtraceEvent* other) {
706   using std::swap;
707   auto* lhs_arena = GetArenaForAllocation();
708   auto* rhs_arena = other->GetArenaForAllocation();
709   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
710   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
711   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
712       &_impl_.oldcomm_, lhs_arena,
713       &other->_impl_.oldcomm_, rhs_arena
714   );
715   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
716       &_impl_.newcomm_, lhs_arena,
717       &other->_impl_.newcomm_, rhs_arena
718   );
719   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
720       PROTOBUF_FIELD_OFFSET(TaskRenameFtraceEvent, _impl_.oom_score_adj_)
721       + sizeof(TaskRenameFtraceEvent::_impl_.oom_score_adj_)  // NOLINT
722       - PROTOBUF_FIELD_OFFSET(TaskRenameFtraceEvent, _impl_.pid_)>(
723           reinterpret_cast<char*>(&_impl_.pid_),
724           reinterpret_cast<char*>(&other->_impl_.pid_));
725 }
726 
GetTypeName() const727 std::string TaskRenameFtraceEvent::GetTypeName() const {
728   return "perfetto.protos.TaskRenameFtraceEvent";
729 }
730 
731 
732 // @@protoc_insertion_point(namespace_scope)
733 }  // namespace protos
734 }  // namespace perfetto
735 PROTOBUF_NAMESPACE_OPEN
736 template<> PROTOBUF_NOINLINE ::perfetto::protos::TaskNewtaskFtraceEvent*
CreateMaybeMessage(Arena * arena)737 Arena::CreateMaybeMessage< ::perfetto::protos::TaskNewtaskFtraceEvent >(Arena* arena) {
738   return Arena::CreateMessageInternal< ::perfetto::protos::TaskNewtaskFtraceEvent >(arena);
739 }
740 template<> PROTOBUF_NOINLINE ::perfetto::protos::TaskRenameFtraceEvent*
CreateMaybeMessage(Arena * arena)741 Arena::CreateMaybeMessage< ::perfetto::protos::TaskRenameFtraceEvent >(Arena* arena) {
742   return Arena::CreateMessageInternal< ::perfetto::protos::TaskRenameFtraceEvent >(arena);
743 }
744 PROTOBUF_NAMESPACE_CLOSE
745 
746 // @@protoc_insertion_point(global_scope)
747 #include <google/protobuf/port_undef.inc>
748