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