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