1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/profiling/profile_common.proto
3
4 #include "protos/perfetto/trace/profiling/profile_common.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 {
InternedString(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR InternedString::InternedString(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.str_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.iid_)*/::uint64_t{0u}} {}
29 struct InternedStringDefaultTypeInternal {
InternedStringDefaultTypeInternalperfetto::protos::InternedStringDefaultTypeInternal30 PROTOBUF_CONSTEXPR InternedStringDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~InternedStringDefaultTypeInternalperfetto::protos::InternedStringDefaultTypeInternal32 ~InternedStringDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 InternedString _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InternedStringDefaultTypeInternal _InternedString_default_instance_;
ProfiledFrameSymbols(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR ProfiledFrameSymbols::ProfiledFrameSymbols(
39 ::_pbi::ConstantInitialized): _impl_{
40 /*decltype(_impl_._has_bits_)*/{}
41 , /*decltype(_impl_._cached_size_)*/{}
42 , /*decltype(_impl_.function_name_id_)*/{}
43 , /*decltype(_impl_.file_name_id_)*/{}
44 , /*decltype(_impl_.line_number_)*/{}
45 , /*decltype(_impl_.frame_iid_)*/::uint64_t{0u}} {}
46 struct ProfiledFrameSymbolsDefaultTypeInternal {
ProfiledFrameSymbolsDefaultTypeInternalperfetto::protos::ProfiledFrameSymbolsDefaultTypeInternal47 PROTOBUF_CONSTEXPR ProfiledFrameSymbolsDefaultTypeInternal()
48 : _instance(::_pbi::ConstantInitialized{}) {}
~ProfiledFrameSymbolsDefaultTypeInternalperfetto::protos::ProfiledFrameSymbolsDefaultTypeInternal49 ~ProfiledFrameSymbolsDefaultTypeInternal() {}
50 union { // NOLINT(misc-non-private-member-variables-in-classes)
51 ProfiledFrameSymbols _instance;
52 };
53 };
54 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProfiledFrameSymbolsDefaultTypeInternal _ProfiledFrameSymbols_default_instance_;
Line(::_pbi::ConstantInitialized)55 PROTOBUF_CONSTEXPR Line::Line(
56 ::_pbi::ConstantInitialized): _impl_{
57 /*decltype(_impl_._has_bits_)*/{}
58 , /*decltype(_impl_._cached_size_)*/{}
59 , /*decltype(_impl_.function_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
60 , /*decltype(_impl_.source_file_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
61 , /*decltype(_impl_.line_number_)*/0u} {}
62 struct LineDefaultTypeInternal {
LineDefaultTypeInternalperfetto::protos::LineDefaultTypeInternal63 PROTOBUF_CONSTEXPR LineDefaultTypeInternal()
64 : _instance(::_pbi::ConstantInitialized{}) {}
~LineDefaultTypeInternalperfetto::protos::LineDefaultTypeInternal65 ~LineDefaultTypeInternal() {}
66 union { // NOLINT(misc-non-private-member-variables-in-classes)
67 Line _instance;
68 };
69 };
70 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LineDefaultTypeInternal _Line_default_instance_;
AddressSymbols(::_pbi::ConstantInitialized)71 PROTOBUF_CONSTEXPR AddressSymbols::AddressSymbols(
72 ::_pbi::ConstantInitialized): _impl_{
73 /*decltype(_impl_._has_bits_)*/{}
74 , /*decltype(_impl_._cached_size_)*/{}
75 , /*decltype(_impl_.lines_)*/{}
76 , /*decltype(_impl_.address_)*/::uint64_t{0u}} {}
77 struct AddressSymbolsDefaultTypeInternal {
AddressSymbolsDefaultTypeInternalperfetto::protos::AddressSymbolsDefaultTypeInternal78 PROTOBUF_CONSTEXPR AddressSymbolsDefaultTypeInternal()
79 : _instance(::_pbi::ConstantInitialized{}) {}
~AddressSymbolsDefaultTypeInternalperfetto::protos::AddressSymbolsDefaultTypeInternal80 ~AddressSymbolsDefaultTypeInternal() {}
81 union { // NOLINT(misc-non-private-member-variables-in-classes)
82 AddressSymbols _instance;
83 };
84 };
85 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AddressSymbolsDefaultTypeInternal _AddressSymbols_default_instance_;
ModuleSymbols(::_pbi::ConstantInitialized)86 PROTOBUF_CONSTEXPR ModuleSymbols::ModuleSymbols(
87 ::_pbi::ConstantInitialized): _impl_{
88 /*decltype(_impl_._has_bits_)*/{}
89 , /*decltype(_impl_._cached_size_)*/{}
90 , /*decltype(_impl_.address_symbols_)*/{}
91 , /*decltype(_impl_.path_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
92 , /*decltype(_impl_.build_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
93 struct ModuleSymbolsDefaultTypeInternal {
ModuleSymbolsDefaultTypeInternalperfetto::protos::ModuleSymbolsDefaultTypeInternal94 PROTOBUF_CONSTEXPR ModuleSymbolsDefaultTypeInternal()
95 : _instance(::_pbi::ConstantInitialized{}) {}
~ModuleSymbolsDefaultTypeInternalperfetto::protos::ModuleSymbolsDefaultTypeInternal96 ~ModuleSymbolsDefaultTypeInternal() {}
97 union { // NOLINT(misc-non-private-member-variables-in-classes)
98 ModuleSymbols _instance;
99 };
100 };
101 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModuleSymbolsDefaultTypeInternal _ModuleSymbols_default_instance_;
Mapping(::_pbi::ConstantInitialized)102 PROTOBUF_CONSTEXPR Mapping::Mapping(
103 ::_pbi::ConstantInitialized): _impl_{
104 /*decltype(_impl_._has_bits_)*/{}
105 , /*decltype(_impl_._cached_size_)*/{}
106 , /*decltype(_impl_.path_string_ids_)*/{}
107 , /*decltype(_impl_.iid_)*/::uint64_t{0u}
108 , /*decltype(_impl_.build_id_)*/::uint64_t{0u}
109 , /*decltype(_impl_.start_offset_)*/::uint64_t{0u}
110 , /*decltype(_impl_.start_)*/::uint64_t{0u}
111 , /*decltype(_impl_.end_)*/::uint64_t{0u}
112 , /*decltype(_impl_.load_bias_)*/::uint64_t{0u}
113 , /*decltype(_impl_.exact_offset_)*/::uint64_t{0u}} {}
114 struct MappingDefaultTypeInternal {
MappingDefaultTypeInternalperfetto::protos::MappingDefaultTypeInternal115 PROTOBUF_CONSTEXPR MappingDefaultTypeInternal()
116 : _instance(::_pbi::ConstantInitialized{}) {}
~MappingDefaultTypeInternalperfetto::protos::MappingDefaultTypeInternal117 ~MappingDefaultTypeInternal() {}
118 union { // NOLINT(misc-non-private-member-variables-in-classes)
119 Mapping _instance;
120 };
121 };
122 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MappingDefaultTypeInternal _Mapping_default_instance_;
Frame(::_pbi::ConstantInitialized)123 PROTOBUF_CONSTEXPR Frame::Frame(
124 ::_pbi::ConstantInitialized): _impl_{
125 /*decltype(_impl_._has_bits_)*/{}
126 , /*decltype(_impl_._cached_size_)*/{}
127 , /*decltype(_impl_.iid_)*/::uint64_t{0u}
128 , /*decltype(_impl_.function_name_id_)*/::uint64_t{0u}
129 , /*decltype(_impl_.mapping_id_)*/::uint64_t{0u}
130 , /*decltype(_impl_.rel_pc_)*/::uint64_t{0u}} {}
131 struct FrameDefaultTypeInternal {
FrameDefaultTypeInternalperfetto::protos::FrameDefaultTypeInternal132 PROTOBUF_CONSTEXPR FrameDefaultTypeInternal()
133 : _instance(::_pbi::ConstantInitialized{}) {}
~FrameDefaultTypeInternalperfetto::protos::FrameDefaultTypeInternal134 ~FrameDefaultTypeInternal() {}
135 union { // NOLINT(misc-non-private-member-variables-in-classes)
136 Frame _instance;
137 };
138 };
139 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FrameDefaultTypeInternal _Frame_default_instance_;
Callstack(::_pbi::ConstantInitialized)140 PROTOBUF_CONSTEXPR Callstack::Callstack(
141 ::_pbi::ConstantInitialized): _impl_{
142 /*decltype(_impl_._has_bits_)*/{}
143 , /*decltype(_impl_._cached_size_)*/{}
144 , /*decltype(_impl_.frame_ids_)*/{}
145 , /*decltype(_impl_.iid_)*/::uint64_t{0u}} {}
146 struct CallstackDefaultTypeInternal {
CallstackDefaultTypeInternalperfetto::protos::CallstackDefaultTypeInternal147 PROTOBUF_CONSTEXPR CallstackDefaultTypeInternal()
148 : _instance(::_pbi::ConstantInitialized{}) {}
~CallstackDefaultTypeInternalperfetto::protos::CallstackDefaultTypeInternal149 ~CallstackDefaultTypeInternal() {}
150 union { // NOLINT(misc-non-private-member-variables-in-classes)
151 Callstack _instance;
152 };
153 };
154 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CallstackDefaultTypeInternal _Callstack_default_instance_;
155 } // namespace protos
156 } // namespace perfetto
157 namespace perfetto {
158 namespace protos {
159
160 // ===================================================================
161
162 class InternedString::_Internal {
163 public:
164 using HasBits = decltype(std::declval<InternedString>()._impl_._has_bits_);
set_has_iid(HasBits * has_bits)165 static void set_has_iid(HasBits* has_bits) {
166 (*has_bits)[0] |= 2u;
167 }
set_has_str(HasBits * has_bits)168 static void set_has_str(HasBits* has_bits) {
169 (*has_bits)[0] |= 1u;
170 }
171 };
172
InternedString(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)173 InternedString::InternedString(::PROTOBUF_NAMESPACE_ID::Arena* arena,
174 bool is_message_owned)
175 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
176 SharedCtor(arena, is_message_owned);
177 // @@protoc_insertion_point(arena_constructor:perfetto.protos.InternedString)
178 }
InternedString(const InternedString & from)179 InternedString::InternedString(const InternedString& from)
180 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
181 InternedString* const _this = this; (void)_this;
182 new (&_impl_) Impl_{
183 decltype(_impl_._has_bits_){from._impl_._has_bits_}
184 , /*decltype(_impl_._cached_size_)*/{}
185 , decltype(_impl_.str_){}
186 , decltype(_impl_.iid_){}};
187
188 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
189 _impl_.str_.InitDefault();
190 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
191 _impl_.str_.Set("", GetArenaForAllocation());
192 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
193 if (from._internal_has_str()) {
194 _this->_impl_.str_.Set(from._internal_str(),
195 _this->GetArenaForAllocation());
196 }
197 _this->_impl_.iid_ = from._impl_.iid_;
198 // @@protoc_insertion_point(copy_constructor:perfetto.protos.InternedString)
199 }
200
SharedCtor(::_pb::Arena * arena,bool is_message_owned)201 inline void InternedString::SharedCtor(
202 ::_pb::Arena* arena, bool is_message_owned) {
203 (void)arena;
204 (void)is_message_owned;
205 new (&_impl_) Impl_{
206 decltype(_impl_._has_bits_){}
207 , /*decltype(_impl_._cached_size_)*/{}
208 , decltype(_impl_.str_){}
209 , decltype(_impl_.iid_){::uint64_t{0u}}
210 };
211 _impl_.str_.InitDefault();
212 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
213 _impl_.str_.Set("", GetArenaForAllocation());
214 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
215 }
216
~InternedString()217 InternedString::~InternedString() {
218 // @@protoc_insertion_point(destructor:perfetto.protos.InternedString)
219 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
220 (void)arena;
221 return;
222 }
223 SharedDtor();
224 }
225
SharedDtor()226 inline void InternedString::SharedDtor() {
227 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
228 _impl_.str_.Destroy();
229 }
230
SetCachedSize(int size) const231 void InternedString::SetCachedSize(int size) const {
232 _impl_._cached_size_.Set(size);
233 }
234
Clear()235 void InternedString::Clear() {
236 // @@protoc_insertion_point(message_clear_start:perfetto.protos.InternedString)
237 ::uint32_t cached_has_bits = 0;
238 // Prevent compiler warnings about cached_has_bits being unused
239 (void) cached_has_bits;
240
241 cached_has_bits = _impl_._has_bits_[0];
242 if (cached_has_bits & 0x00000001u) {
243 _impl_.str_.ClearNonDefaultToEmpty();
244 }
245 _impl_.iid_ = ::uint64_t{0u};
246 _impl_._has_bits_.Clear();
247 _internal_metadata_.Clear<std::string>();
248 }
249
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)250 const char* InternedString::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
251 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
252 _Internal::HasBits has_bits{};
253 while (!ctx->Done(&ptr)) {
254 ::uint32_t tag;
255 ptr = ::_pbi::ReadTag(ptr, &tag);
256 switch (tag >> 3) {
257 // optional uint64 iid = 1;
258 case 1:
259 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
260 _Internal::set_has_iid(&has_bits);
261 _impl_.iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
262 CHK_(ptr);
263 } else {
264 goto handle_unusual;
265 }
266 continue;
267 // optional bytes str = 2;
268 case 2:
269 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
270 auto str = _internal_mutable_str();
271 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
272 CHK_(ptr);
273 } else {
274 goto handle_unusual;
275 }
276 continue;
277 default:
278 goto handle_unusual;
279 } // switch
280 handle_unusual:
281 if ((tag == 0) || ((tag & 7) == 4)) {
282 CHK_(ptr);
283 ctx->SetLastTag(tag);
284 goto message_done;
285 }
286 ptr = UnknownFieldParse(
287 tag,
288 _internal_metadata_.mutable_unknown_fields<std::string>(),
289 ptr, ctx);
290 CHK_(ptr != nullptr);
291 } // while
292 message_done:
293 _impl_._has_bits_.Or(has_bits);
294 return ptr;
295 failure:
296 ptr = nullptr;
297 goto message_done;
298 #undef CHK_
299 }
300
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const301 ::uint8_t* InternedString::_InternalSerialize(
302 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
303 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.InternedString)
304 ::uint32_t cached_has_bits = 0;
305 (void) cached_has_bits;
306
307 cached_has_bits = _impl_._has_bits_[0];
308 // optional uint64 iid = 1;
309 if (cached_has_bits & 0x00000002u) {
310 target = stream->EnsureSpace(target);
311 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_iid(), target);
312 }
313
314 // optional bytes str = 2;
315 if (cached_has_bits & 0x00000001u) {
316 target = stream->WriteBytesMaybeAliased(
317 2, this->_internal_str(), target);
318 }
319
320 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
321 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
322 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
323 }
324 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.InternedString)
325 return target;
326 }
327
ByteSizeLong() const328 size_t InternedString::ByteSizeLong() const {
329 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.InternedString)
330 size_t total_size = 0;
331
332 ::uint32_t cached_has_bits = 0;
333 // Prevent compiler warnings about cached_has_bits being unused
334 (void) cached_has_bits;
335
336 cached_has_bits = _impl_._has_bits_[0];
337 if (cached_has_bits & 0x00000003u) {
338 // optional bytes str = 2;
339 if (cached_has_bits & 0x00000001u) {
340 total_size += 1 +
341 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
342 this->_internal_str());
343 }
344
345 // optional uint64 iid = 1;
346 if (cached_has_bits & 0x00000002u) {
347 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_iid());
348 }
349
350 }
351 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
352 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
353 }
354 int cached_size = ::_pbi::ToCachedSize(total_size);
355 SetCachedSize(cached_size);
356 return total_size;
357 }
358
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)359 void InternedString::CheckTypeAndMergeFrom(
360 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
361 MergeFrom(*::_pbi::DownCast<const InternedString*>(
362 &from));
363 }
364
MergeFrom(const InternedString & from)365 void InternedString::MergeFrom(const InternedString& from) {
366 InternedString* const _this = this;
367 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.InternedString)
368 GOOGLE_DCHECK_NE(&from, _this);
369 ::uint32_t cached_has_bits = 0;
370 (void) cached_has_bits;
371
372 cached_has_bits = from._impl_._has_bits_[0];
373 if (cached_has_bits & 0x00000003u) {
374 if (cached_has_bits & 0x00000001u) {
375 _this->_internal_set_str(from._internal_str());
376 }
377 if (cached_has_bits & 0x00000002u) {
378 _this->_impl_.iid_ = from._impl_.iid_;
379 }
380 _this->_impl_._has_bits_[0] |= cached_has_bits;
381 }
382 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
383 }
384
CopyFrom(const InternedString & from)385 void InternedString::CopyFrom(const InternedString& from) {
386 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.InternedString)
387 if (&from == this) return;
388 Clear();
389 MergeFrom(from);
390 }
391
IsInitialized() const392 bool InternedString::IsInitialized() const {
393 return true;
394 }
395
InternalSwap(InternedString * other)396 void InternedString::InternalSwap(InternedString* other) {
397 using std::swap;
398 auto* lhs_arena = GetArenaForAllocation();
399 auto* rhs_arena = other->GetArenaForAllocation();
400 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
401 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
402 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
403 &_impl_.str_, lhs_arena,
404 &other->_impl_.str_, rhs_arena
405 );
406 swap(_impl_.iid_, other->_impl_.iid_);
407 }
408
GetTypeName() const409 std::string InternedString::GetTypeName() const {
410 return "perfetto.protos.InternedString";
411 }
412
413
414 // ===================================================================
415
416 class ProfiledFrameSymbols::_Internal {
417 public:
418 using HasBits = decltype(std::declval<ProfiledFrameSymbols>()._impl_._has_bits_);
set_has_frame_iid(HasBits * has_bits)419 static void set_has_frame_iid(HasBits* has_bits) {
420 (*has_bits)[0] |= 1u;
421 }
422 };
423
ProfiledFrameSymbols(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)424 ProfiledFrameSymbols::ProfiledFrameSymbols(::PROTOBUF_NAMESPACE_ID::Arena* arena,
425 bool is_message_owned)
426 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
427 SharedCtor(arena, is_message_owned);
428 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProfiledFrameSymbols)
429 }
ProfiledFrameSymbols(const ProfiledFrameSymbols & from)430 ProfiledFrameSymbols::ProfiledFrameSymbols(const ProfiledFrameSymbols& from)
431 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
432 ProfiledFrameSymbols* const _this = this; (void)_this;
433 new (&_impl_) Impl_{
434 decltype(_impl_._has_bits_){from._impl_._has_bits_}
435 , /*decltype(_impl_._cached_size_)*/{}
436 , decltype(_impl_.function_name_id_){from._impl_.function_name_id_}
437 , decltype(_impl_.file_name_id_){from._impl_.file_name_id_}
438 , decltype(_impl_.line_number_){from._impl_.line_number_}
439 , decltype(_impl_.frame_iid_){}};
440
441 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
442 _this->_impl_.frame_iid_ = from._impl_.frame_iid_;
443 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProfiledFrameSymbols)
444 }
445
SharedCtor(::_pb::Arena * arena,bool is_message_owned)446 inline void ProfiledFrameSymbols::SharedCtor(
447 ::_pb::Arena* arena, bool is_message_owned) {
448 (void)arena;
449 (void)is_message_owned;
450 new (&_impl_) Impl_{
451 decltype(_impl_._has_bits_){}
452 , /*decltype(_impl_._cached_size_)*/{}
453 , decltype(_impl_.function_name_id_){arena}
454 , decltype(_impl_.file_name_id_){arena}
455 , decltype(_impl_.line_number_){arena}
456 , decltype(_impl_.frame_iid_){::uint64_t{0u}}
457 };
458 }
459
~ProfiledFrameSymbols()460 ProfiledFrameSymbols::~ProfiledFrameSymbols() {
461 // @@protoc_insertion_point(destructor:perfetto.protos.ProfiledFrameSymbols)
462 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
463 (void)arena;
464 return;
465 }
466 SharedDtor();
467 }
468
SharedDtor()469 inline void ProfiledFrameSymbols::SharedDtor() {
470 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
471 _impl_.function_name_id_.~RepeatedField();
472 _impl_.file_name_id_.~RepeatedField();
473 _impl_.line_number_.~RepeatedField();
474 }
475
SetCachedSize(int size) const476 void ProfiledFrameSymbols::SetCachedSize(int size) const {
477 _impl_._cached_size_.Set(size);
478 }
479
Clear()480 void ProfiledFrameSymbols::Clear() {
481 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProfiledFrameSymbols)
482 ::uint32_t cached_has_bits = 0;
483 // Prevent compiler warnings about cached_has_bits being unused
484 (void) cached_has_bits;
485
486 _impl_.function_name_id_.Clear();
487 _impl_.file_name_id_.Clear();
488 _impl_.line_number_.Clear();
489 _impl_.frame_iid_ = ::uint64_t{0u};
490 _impl_._has_bits_.Clear();
491 _internal_metadata_.Clear<std::string>();
492 }
493
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)494 const char* ProfiledFrameSymbols::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
495 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
496 _Internal::HasBits has_bits{};
497 while (!ctx->Done(&ptr)) {
498 ::uint32_t tag;
499 ptr = ::_pbi::ReadTag(ptr, &tag);
500 switch (tag >> 3) {
501 // optional uint64 frame_iid = 1;
502 case 1:
503 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
504 _Internal::set_has_frame_iid(&has_bits);
505 _impl_.frame_iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
506 CHK_(ptr);
507 } else {
508 goto handle_unusual;
509 }
510 continue;
511 // repeated uint64 function_name_id = 2;
512 case 2:
513 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
514 ptr -= 1;
515 do {
516 ptr += 1;
517 _internal_add_function_name_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
518 CHK_(ptr);
519 if (!ctx->DataAvailable(ptr)) break;
520 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
521 } else if (static_cast<::uint8_t>(tag) == 18) {
522 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_function_name_id(), ptr, ctx);
523 CHK_(ptr);
524 } else {
525 goto handle_unusual;
526 }
527 continue;
528 // repeated uint64 file_name_id = 3;
529 case 3:
530 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
531 ptr -= 1;
532 do {
533 ptr += 1;
534 _internal_add_file_name_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
535 CHK_(ptr);
536 if (!ctx->DataAvailable(ptr)) break;
537 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
538 } else if (static_cast<::uint8_t>(tag) == 26) {
539 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_file_name_id(), ptr, ctx);
540 CHK_(ptr);
541 } else {
542 goto handle_unusual;
543 }
544 continue;
545 // repeated uint32 line_number = 4;
546 case 4:
547 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
548 ptr -= 1;
549 do {
550 ptr += 1;
551 _internal_add_line_number(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
552 CHK_(ptr);
553 if (!ctx->DataAvailable(ptr)) break;
554 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
555 } else if (static_cast<::uint8_t>(tag) == 34) {
556 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_line_number(), ptr, ctx);
557 CHK_(ptr);
558 } else {
559 goto handle_unusual;
560 }
561 continue;
562 default:
563 goto handle_unusual;
564 } // switch
565 handle_unusual:
566 if ((tag == 0) || ((tag & 7) == 4)) {
567 CHK_(ptr);
568 ctx->SetLastTag(tag);
569 goto message_done;
570 }
571 ptr = UnknownFieldParse(
572 tag,
573 _internal_metadata_.mutable_unknown_fields<std::string>(),
574 ptr, ctx);
575 CHK_(ptr != nullptr);
576 } // while
577 message_done:
578 _impl_._has_bits_.Or(has_bits);
579 return ptr;
580 failure:
581 ptr = nullptr;
582 goto message_done;
583 #undef CHK_
584 }
585
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const586 ::uint8_t* ProfiledFrameSymbols::_InternalSerialize(
587 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
588 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProfiledFrameSymbols)
589 ::uint32_t cached_has_bits = 0;
590 (void) cached_has_bits;
591
592 cached_has_bits = _impl_._has_bits_[0];
593 // optional uint64 frame_iid = 1;
594 if (cached_has_bits & 0x00000001u) {
595 target = stream->EnsureSpace(target);
596 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_frame_iid(), target);
597 }
598
599 // repeated uint64 function_name_id = 2;
600 for (int i = 0, n = this->_internal_function_name_id_size(); i < n; i++) {
601 target = stream->EnsureSpace(target);
602 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_function_name_id(i), target);
603 }
604
605 // repeated uint64 file_name_id = 3;
606 for (int i = 0, n = this->_internal_file_name_id_size(); i < n; i++) {
607 target = stream->EnsureSpace(target);
608 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_file_name_id(i), target);
609 }
610
611 // repeated uint32 line_number = 4;
612 for (int i = 0, n = this->_internal_line_number_size(); i < n; i++) {
613 target = stream->EnsureSpace(target);
614 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_line_number(i), target);
615 }
616
617 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
618 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
619 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
620 }
621 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProfiledFrameSymbols)
622 return target;
623 }
624
ByteSizeLong() const625 size_t ProfiledFrameSymbols::ByteSizeLong() const {
626 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProfiledFrameSymbols)
627 size_t total_size = 0;
628
629 ::uint32_t cached_has_bits = 0;
630 // Prevent compiler warnings about cached_has_bits being unused
631 (void) cached_has_bits;
632
633 // repeated uint64 function_name_id = 2;
634 {
635 size_t data_size = ::_pbi::WireFormatLite::
636 UInt64Size(this->_impl_.function_name_id_);
637 total_size += 1 *
638 ::_pbi::FromIntSize(this->_internal_function_name_id_size());
639 total_size += data_size;
640 }
641
642 // repeated uint64 file_name_id = 3;
643 {
644 size_t data_size = ::_pbi::WireFormatLite::
645 UInt64Size(this->_impl_.file_name_id_);
646 total_size += 1 *
647 ::_pbi::FromIntSize(this->_internal_file_name_id_size());
648 total_size += data_size;
649 }
650
651 // repeated uint32 line_number = 4;
652 {
653 size_t data_size = ::_pbi::WireFormatLite::
654 UInt32Size(this->_impl_.line_number_);
655 total_size += 1 *
656 ::_pbi::FromIntSize(this->_internal_line_number_size());
657 total_size += data_size;
658 }
659
660 // optional uint64 frame_iid = 1;
661 cached_has_bits = _impl_._has_bits_[0];
662 if (cached_has_bits & 0x00000001u) {
663 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_frame_iid());
664 }
665
666 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
667 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
668 }
669 int cached_size = ::_pbi::ToCachedSize(total_size);
670 SetCachedSize(cached_size);
671 return total_size;
672 }
673
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)674 void ProfiledFrameSymbols::CheckTypeAndMergeFrom(
675 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
676 MergeFrom(*::_pbi::DownCast<const ProfiledFrameSymbols*>(
677 &from));
678 }
679
MergeFrom(const ProfiledFrameSymbols & from)680 void ProfiledFrameSymbols::MergeFrom(const ProfiledFrameSymbols& from) {
681 ProfiledFrameSymbols* const _this = this;
682 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProfiledFrameSymbols)
683 GOOGLE_DCHECK_NE(&from, _this);
684 ::uint32_t cached_has_bits = 0;
685 (void) cached_has_bits;
686
687 _this->_impl_.function_name_id_.MergeFrom(from._impl_.function_name_id_);
688 _this->_impl_.file_name_id_.MergeFrom(from._impl_.file_name_id_);
689 _this->_impl_.line_number_.MergeFrom(from._impl_.line_number_);
690 if (from._internal_has_frame_iid()) {
691 _this->_internal_set_frame_iid(from._internal_frame_iid());
692 }
693 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
694 }
695
CopyFrom(const ProfiledFrameSymbols & from)696 void ProfiledFrameSymbols::CopyFrom(const ProfiledFrameSymbols& from) {
697 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProfiledFrameSymbols)
698 if (&from == this) return;
699 Clear();
700 MergeFrom(from);
701 }
702
IsInitialized() const703 bool ProfiledFrameSymbols::IsInitialized() const {
704 return true;
705 }
706
InternalSwap(ProfiledFrameSymbols * other)707 void ProfiledFrameSymbols::InternalSwap(ProfiledFrameSymbols* other) {
708 using std::swap;
709 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
710 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
711 _impl_.function_name_id_.InternalSwap(&other->_impl_.function_name_id_);
712 _impl_.file_name_id_.InternalSwap(&other->_impl_.file_name_id_);
713 _impl_.line_number_.InternalSwap(&other->_impl_.line_number_);
714 swap(_impl_.frame_iid_, other->_impl_.frame_iid_);
715 }
716
GetTypeName() const717 std::string ProfiledFrameSymbols::GetTypeName() const {
718 return "perfetto.protos.ProfiledFrameSymbols";
719 }
720
721
722 // ===================================================================
723
724 class Line::_Internal {
725 public:
726 using HasBits = decltype(std::declval<Line>()._impl_._has_bits_);
set_has_function_name(HasBits * has_bits)727 static void set_has_function_name(HasBits* has_bits) {
728 (*has_bits)[0] |= 1u;
729 }
set_has_source_file_name(HasBits * has_bits)730 static void set_has_source_file_name(HasBits* has_bits) {
731 (*has_bits)[0] |= 2u;
732 }
set_has_line_number(HasBits * has_bits)733 static void set_has_line_number(HasBits* has_bits) {
734 (*has_bits)[0] |= 4u;
735 }
736 };
737
Line(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)738 Line::Line(::PROTOBUF_NAMESPACE_ID::Arena* arena,
739 bool is_message_owned)
740 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
741 SharedCtor(arena, is_message_owned);
742 // @@protoc_insertion_point(arena_constructor:perfetto.protos.Line)
743 }
Line(const Line & from)744 Line::Line(const Line& from)
745 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
746 Line* const _this = this; (void)_this;
747 new (&_impl_) Impl_{
748 decltype(_impl_._has_bits_){from._impl_._has_bits_}
749 , /*decltype(_impl_._cached_size_)*/{}
750 , decltype(_impl_.function_name_){}
751 , decltype(_impl_.source_file_name_){}
752 , decltype(_impl_.line_number_){}};
753
754 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
755 _impl_.function_name_.InitDefault();
756 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
757 _impl_.function_name_.Set("", GetArenaForAllocation());
758 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
759 if (from._internal_has_function_name()) {
760 _this->_impl_.function_name_.Set(from._internal_function_name(),
761 _this->GetArenaForAllocation());
762 }
763 _impl_.source_file_name_.InitDefault();
764 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
765 _impl_.source_file_name_.Set("", GetArenaForAllocation());
766 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
767 if (from._internal_has_source_file_name()) {
768 _this->_impl_.source_file_name_.Set(from._internal_source_file_name(),
769 _this->GetArenaForAllocation());
770 }
771 _this->_impl_.line_number_ = from._impl_.line_number_;
772 // @@protoc_insertion_point(copy_constructor:perfetto.protos.Line)
773 }
774
SharedCtor(::_pb::Arena * arena,bool is_message_owned)775 inline void Line::SharedCtor(
776 ::_pb::Arena* arena, bool is_message_owned) {
777 (void)arena;
778 (void)is_message_owned;
779 new (&_impl_) Impl_{
780 decltype(_impl_._has_bits_){}
781 , /*decltype(_impl_._cached_size_)*/{}
782 , decltype(_impl_.function_name_){}
783 , decltype(_impl_.source_file_name_){}
784 , decltype(_impl_.line_number_){0u}
785 };
786 _impl_.function_name_.InitDefault();
787 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
788 _impl_.function_name_.Set("", GetArenaForAllocation());
789 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
790 _impl_.source_file_name_.InitDefault();
791 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
792 _impl_.source_file_name_.Set("", GetArenaForAllocation());
793 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
794 }
795
~Line()796 Line::~Line() {
797 // @@protoc_insertion_point(destructor:perfetto.protos.Line)
798 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
799 (void)arena;
800 return;
801 }
802 SharedDtor();
803 }
804
SharedDtor()805 inline void Line::SharedDtor() {
806 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
807 _impl_.function_name_.Destroy();
808 _impl_.source_file_name_.Destroy();
809 }
810
SetCachedSize(int size) const811 void Line::SetCachedSize(int size) const {
812 _impl_._cached_size_.Set(size);
813 }
814
Clear()815 void Line::Clear() {
816 // @@protoc_insertion_point(message_clear_start:perfetto.protos.Line)
817 ::uint32_t cached_has_bits = 0;
818 // Prevent compiler warnings about cached_has_bits being unused
819 (void) cached_has_bits;
820
821 cached_has_bits = _impl_._has_bits_[0];
822 if (cached_has_bits & 0x00000003u) {
823 if (cached_has_bits & 0x00000001u) {
824 _impl_.function_name_.ClearNonDefaultToEmpty();
825 }
826 if (cached_has_bits & 0x00000002u) {
827 _impl_.source_file_name_.ClearNonDefaultToEmpty();
828 }
829 }
830 _impl_.line_number_ = 0u;
831 _impl_._has_bits_.Clear();
832 _internal_metadata_.Clear<std::string>();
833 }
834
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)835 const char* Line::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
836 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
837 _Internal::HasBits has_bits{};
838 while (!ctx->Done(&ptr)) {
839 ::uint32_t tag;
840 ptr = ::_pbi::ReadTag(ptr, &tag);
841 switch (tag >> 3) {
842 // optional string function_name = 1;
843 case 1:
844 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
845 auto str = _internal_mutable_function_name();
846 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
847 CHK_(ptr);
848 } else {
849 goto handle_unusual;
850 }
851 continue;
852 // optional string source_file_name = 2;
853 case 2:
854 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
855 auto str = _internal_mutable_source_file_name();
856 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
857 CHK_(ptr);
858 } else {
859 goto handle_unusual;
860 }
861 continue;
862 // optional uint32 line_number = 3;
863 case 3:
864 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
865 _Internal::set_has_line_number(&has_bits);
866 _impl_.line_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
867 CHK_(ptr);
868 } else {
869 goto handle_unusual;
870 }
871 continue;
872 default:
873 goto handle_unusual;
874 } // switch
875 handle_unusual:
876 if ((tag == 0) || ((tag & 7) == 4)) {
877 CHK_(ptr);
878 ctx->SetLastTag(tag);
879 goto message_done;
880 }
881 ptr = UnknownFieldParse(
882 tag,
883 _internal_metadata_.mutable_unknown_fields<std::string>(),
884 ptr, ctx);
885 CHK_(ptr != nullptr);
886 } // while
887 message_done:
888 _impl_._has_bits_.Or(has_bits);
889 return ptr;
890 failure:
891 ptr = nullptr;
892 goto message_done;
893 #undef CHK_
894 }
895
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const896 ::uint8_t* Line::_InternalSerialize(
897 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
898 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.Line)
899 ::uint32_t cached_has_bits = 0;
900 (void) cached_has_bits;
901
902 cached_has_bits = _impl_._has_bits_[0];
903 // optional string function_name = 1;
904 if (cached_has_bits & 0x00000001u) {
905 target = stream->WriteStringMaybeAliased(
906 1, this->_internal_function_name(), target);
907 }
908
909 // optional string source_file_name = 2;
910 if (cached_has_bits & 0x00000002u) {
911 target = stream->WriteStringMaybeAliased(
912 2, this->_internal_source_file_name(), target);
913 }
914
915 // optional uint32 line_number = 3;
916 if (cached_has_bits & 0x00000004u) {
917 target = stream->EnsureSpace(target);
918 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_line_number(), target);
919 }
920
921 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
922 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
923 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
924 }
925 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.Line)
926 return target;
927 }
928
ByteSizeLong() const929 size_t Line::ByteSizeLong() const {
930 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.Line)
931 size_t total_size = 0;
932
933 ::uint32_t cached_has_bits = 0;
934 // Prevent compiler warnings about cached_has_bits being unused
935 (void) cached_has_bits;
936
937 cached_has_bits = _impl_._has_bits_[0];
938 if (cached_has_bits & 0x00000007u) {
939 // optional string function_name = 1;
940 if (cached_has_bits & 0x00000001u) {
941 total_size += 1 +
942 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
943 this->_internal_function_name());
944 }
945
946 // optional string source_file_name = 2;
947 if (cached_has_bits & 0x00000002u) {
948 total_size += 1 +
949 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
950 this->_internal_source_file_name());
951 }
952
953 // optional uint32 line_number = 3;
954 if (cached_has_bits & 0x00000004u) {
955 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_line_number());
956 }
957
958 }
959 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
960 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
961 }
962 int cached_size = ::_pbi::ToCachedSize(total_size);
963 SetCachedSize(cached_size);
964 return total_size;
965 }
966
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)967 void Line::CheckTypeAndMergeFrom(
968 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
969 MergeFrom(*::_pbi::DownCast<const Line*>(
970 &from));
971 }
972
MergeFrom(const Line & from)973 void Line::MergeFrom(const Line& from) {
974 Line* const _this = this;
975 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.Line)
976 GOOGLE_DCHECK_NE(&from, _this);
977 ::uint32_t cached_has_bits = 0;
978 (void) cached_has_bits;
979
980 cached_has_bits = from._impl_._has_bits_[0];
981 if (cached_has_bits & 0x00000007u) {
982 if (cached_has_bits & 0x00000001u) {
983 _this->_internal_set_function_name(from._internal_function_name());
984 }
985 if (cached_has_bits & 0x00000002u) {
986 _this->_internal_set_source_file_name(from._internal_source_file_name());
987 }
988 if (cached_has_bits & 0x00000004u) {
989 _this->_impl_.line_number_ = from._impl_.line_number_;
990 }
991 _this->_impl_._has_bits_[0] |= cached_has_bits;
992 }
993 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
994 }
995
CopyFrom(const Line & from)996 void Line::CopyFrom(const Line& from) {
997 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.Line)
998 if (&from == this) return;
999 Clear();
1000 MergeFrom(from);
1001 }
1002
IsInitialized() const1003 bool Line::IsInitialized() const {
1004 return true;
1005 }
1006
InternalSwap(Line * other)1007 void Line::InternalSwap(Line* other) {
1008 using std::swap;
1009 auto* lhs_arena = GetArenaForAllocation();
1010 auto* rhs_arena = other->GetArenaForAllocation();
1011 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1012 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1013 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1014 &_impl_.function_name_, lhs_arena,
1015 &other->_impl_.function_name_, rhs_arena
1016 );
1017 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1018 &_impl_.source_file_name_, lhs_arena,
1019 &other->_impl_.source_file_name_, rhs_arena
1020 );
1021 swap(_impl_.line_number_, other->_impl_.line_number_);
1022 }
1023
GetTypeName() const1024 std::string Line::GetTypeName() const {
1025 return "perfetto.protos.Line";
1026 }
1027
1028
1029 // ===================================================================
1030
1031 class AddressSymbols::_Internal {
1032 public:
1033 using HasBits = decltype(std::declval<AddressSymbols>()._impl_._has_bits_);
set_has_address(HasBits * has_bits)1034 static void set_has_address(HasBits* has_bits) {
1035 (*has_bits)[0] |= 1u;
1036 }
1037 };
1038
AddressSymbols(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1039 AddressSymbols::AddressSymbols(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1040 bool is_message_owned)
1041 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1042 SharedCtor(arena, is_message_owned);
1043 // @@protoc_insertion_point(arena_constructor:perfetto.protos.AddressSymbols)
1044 }
AddressSymbols(const AddressSymbols & from)1045 AddressSymbols::AddressSymbols(const AddressSymbols& from)
1046 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1047 AddressSymbols* const _this = this; (void)_this;
1048 new (&_impl_) Impl_{
1049 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1050 , /*decltype(_impl_._cached_size_)*/{}
1051 , decltype(_impl_.lines_){from._impl_.lines_}
1052 , decltype(_impl_.address_){}};
1053
1054 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1055 _this->_impl_.address_ = from._impl_.address_;
1056 // @@protoc_insertion_point(copy_constructor:perfetto.protos.AddressSymbols)
1057 }
1058
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1059 inline void AddressSymbols::SharedCtor(
1060 ::_pb::Arena* arena, bool is_message_owned) {
1061 (void)arena;
1062 (void)is_message_owned;
1063 new (&_impl_) Impl_{
1064 decltype(_impl_._has_bits_){}
1065 , /*decltype(_impl_._cached_size_)*/{}
1066 , decltype(_impl_.lines_){arena}
1067 , decltype(_impl_.address_){::uint64_t{0u}}
1068 };
1069 }
1070
~AddressSymbols()1071 AddressSymbols::~AddressSymbols() {
1072 // @@protoc_insertion_point(destructor:perfetto.protos.AddressSymbols)
1073 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1074 (void)arena;
1075 return;
1076 }
1077 SharedDtor();
1078 }
1079
SharedDtor()1080 inline void AddressSymbols::SharedDtor() {
1081 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1082 _impl_.lines_.~RepeatedPtrField();
1083 }
1084
SetCachedSize(int size) const1085 void AddressSymbols::SetCachedSize(int size) const {
1086 _impl_._cached_size_.Set(size);
1087 }
1088
Clear()1089 void AddressSymbols::Clear() {
1090 // @@protoc_insertion_point(message_clear_start:perfetto.protos.AddressSymbols)
1091 ::uint32_t cached_has_bits = 0;
1092 // Prevent compiler warnings about cached_has_bits being unused
1093 (void) cached_has_bits;
1094
1095 _impl_.lines_.Clear();
1096 _impl_.address_ = ::uint64_t{0u};
1097 _impl_._has_bits_.Clear();
1098 _internal_metadata_.Clear<std::string>();
1099 }
1100
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1101 const char* AddressSymbols::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1102 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1103 _Internal::HasBits has_bits{};
1104 while (!ctx->Done(&ptr)) {
1105 ::uint32_t tag;
1106 ptr = ::_pbi::ReadTag(ptr, &tag);
1107 switch (tag >> 3) {
1108 // optional uint64 address = 1;
1109 case 1:
1110 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1111 _Internal::set_has_address(&has_bits);
1112 _impl_.address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1113 CHK_(ptr);
1114 } else {
1115 goto handle_unusual;
1116 }
1117 continue;
1118 // repeated .perfetto.protos.Line lines = 2;
1119 case 2:
1120 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1121 ptr -= 1;
1122 do {
1123 ptr += 1;
1124 ptr = ctx->ParseMessage(_internal_add_lines(), ptr);
1125 CHK_(ptr);
1126 if (!ctx->DataAvailable(ptr)) break;
1127 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1128 } else {
1129 goto handle_unusual;
1130 }
1131 continue;
1132 default:
1133 goto handle_unusual;
1134 } // switch
1135 handle_unusual:
1136 if ((tag == 0) || ((tag & 7) == 4)) {
1137 CHK_(ptr);
1138 ctx->SetLastTag(tag);
1139 goto message_done;
1140 }
1141 ptr = UnknownFieldParse(
1142 tag,
1143 _internal_metadata_.mutable_unknown_fields<std::string>(),
1144 ptr, ctx);
1145 CHK_(ptr != nullptr);
1146 } // while
1147 message_done:
1148 _impl_._has_bits_.Or(has_bits);
1149 return ptr;
1150 failure:
1151 ptr = nullptr;
1152 goto message_done;
1153 #undef CHK_
1154 }
1155
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1156 ::uint8_t* AddressSymbols::_InternalSerialize(
1157 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1158 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.AddressSymbols)
1159 ::uint32_t cached_has_bits = 0;
1160 (void) cached_has_bits;
1161
1162 cached_has_bits = _impl_._has_bits_[0];
1163 // optional uint64 address = 1;
1164 if (cached_has_bits & 0x00000001u) {
1165 target = stream->EnsureSpace(target);
1166 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_address(), target);
1167 }
1168
1169 // repeated .perfetto.protos.Line lines = 2;
1170 for (unsigned i = 0,
1171 n = static_cast<unsigned>(this->_internal_lines_size()); i < n; i++) {
1172 const auto& repfield = this->_internal_lines(i);
1173 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1174 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
1175 }
1176
1177 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1178 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1179 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1180 }
1181 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.AddressSymbols)
1182 return target;
1183 }
1184
ByteSizeLong() const1185 size_t AddressSymbols::ByteSizeLong() const {
1186 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.AddressSymbols)
1187 size_t total_size = 0;
1188
1189 ::uint32_t cached_has_bits = 0;
1190 // Prevent compiler warnings about cached_has_bits being unused
1191 (void) cached_has_bits;
1192
1193 // repeated .perfetto.protos.Line lines = 2;
1194 total_size += 1UL * this->_internal_lines_size();
1195 for (const auto& msg : this->_impl_.lines_) {
1196 total_size +=
1197 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1198 }
1199
1200 // optional uint64 address = 1;
1201 cached_has_bits = _impl_._has_bits_[0];
1202 if (cached_has_bits & 0x00000001u) {
1203 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_address());
1204 }
1205
1206 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1207 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1208 }
1209 int cached_size = ::_pbi::ToCachedSize(total_size);
1210 SetCachedSize(cached_size);
1211 return total_size;
1212 }
1213
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1214 void AddressSymbols::CheckTypeAndMergeFrom(
1215 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1216 MergeFrom(*::_pbi::DownCast<const AddressSymbols*>(
1217 &from));
1218 }
1219
MergeFrom(const AddressSymbols & from)1220 void AddressSymbols::MergeFrom(const AddressSymbols& from) {
1221 AddressSymbols* const _this = this;
1222 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.AddressSymbols)
1223 GOOGLE_DCHECK_NE(&from, _this);
1224 ::uint32_t cached_has_bits = 0;
1225 (void) cached_has_bits;
1226
1227 _this->_impl_.lines_.MergeFrom(from._impl_.lines_);
1228 if (from._internal_has_address()) {
1229 _this->_internal_set_address(from._internal_address());
1230 }
1231 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1232 }
1233
CopyFrom(const AddressSymbols & from)1234 void AddressSymbols::CopyFrom(const AddressSymbols& from) {
1235 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.AddressSymbols)
1236 if (&from == this) return;
1237 Clear();
1238 MergeFrom(from);
1239 }
1240
IsInitialized() const1241 bool AddressSymbols::IsInitialized() const {
1242 return true;
1243 }
1244
InternalSwap(AddressSymbols * other)1245 void AddressSymbols::InternalSwap(AddressSymbols* other) {
1246 using std::swap;
1247 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1248 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1249 _impl_.lines_.InternalSwap(&other->_impl_.lines_);
1250 swap(_impl_.address_, other->_impl_.address_);
1251 }
1252
GetTypeName() const1253 std::string AddressSymbols::GetTypeName() const {
1254 return "perfetto.protos.AddressSymbols";
1255 }
1256
1257
1258 // ===================================================================
1259
1260 class ModuleSymbols::_Internal {
1261 public:
1262 using HasBits = decltype(std::declval<ModuleSymbols>()._impl_._has_bits_);
set_has_path(HasBits * has_bits)1263 static void set_has_path(HasBits* has_bits) {
1264 (*has_bits)[0] |= 1u;
1265 }
set_has_build_id(HasBits * has_bits)1266 static void set_has_build_id(HasBits* has_bits) {
1267 (*has_bits)[0] |= 2u;
1268 }
1269 };
1270
ModuleSymbols(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1271 ModuleSymbols::ModuleSymbols(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1272 bool is_message_owned)
1273 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1274 SharedCtor(arena, is_message_owned);
1275 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ModuleSymbols)
1276 }
ModuleSymbols(const ModuleSymbols & from)1277 ModuleSymbols::ModuleSymbols(const ModuleSymbols& from)
1278 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1279 ModuleSymbols* const _this = this; (void)_this;
1280 new (&_impl_) Impl_{
1281 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1282 , /*decltype(_impl_._cached_size_)*/{}
1283 , decltype(_impl_.address_symbols_){from._impl_.address_symbols_}
1284 , decltype(_impl_.path_){}
1285 , decltype(_impl_.build_id_){}};
1286
1287 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1288 _impl_.path_.InitDefault();
1289 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1290 _impl_.path_.Set("", GetArenaForAllocation());
1291 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1292 if (from._internal_has_path()) {
1293 _this->_impl_.path_.Set(from._internal_path(),
1294 _this->GetArenaForAllocation());
1295 }
1296 _impl_.build_id_.InitDefault();
1297 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1298 _impl_.build_id_.Set("", GetArenaForAllocation());
1299 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1300 if (from._internal_has_build_id()) {
1301 _this->_impl_.build_id_.Set(from._internal_build_id(),
1302 _this->GetArenaForAllocation());
1303 }
1304 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ModuleSymbols)
1305 }
1306
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1307 inline void ModuleSymbols::SharedCtor(
1308 ::_pb::Arena* arena, bool is_message_owned) {
1309 (void)arena;
1310 (void)is_message_owned;
1311 new (&_impl_) Impl_{
1312 decltype(_impl_._has_bits_){}
1313 , /*decltype(_impl_._cached_size_)*/{}
1314 , decltype(_impl_.address_symbols_){arena}
1315 , decltype(_impl_.path_){}
1316 , decltype(_impl_.build_id_){}
1317 };
1318 _impl_.path_.InitDefault();
1319 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1320 _impl_.path_.Set("", GetArenaForAllocation());
1321 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1322 _impl_.build_id_.InitDefault();
1323 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1324 _impl_.build_id_.Set("", GetArenaForAllocation());
1325 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1326 }
1327
~ModuleSymbols()1328 ModuleSymbols::~ModuleSymbols() {
1329 // @@protoc_insertion_point(destructor:perfetto.protos.ModuleSymbols)
1330 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1331 (void)arena;
1332 return;
1333 }
1334 SharedDtor();
1335 }
1336
SharedDtor()1337 inline void ModuleSymbols::SharedDtor() {
1338 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1339 _impl_.address_symbols_.~RepeatedPtrField();
1340 _impl_.path_.Destroy();
1341 _impl_.build_id_.Destroy();
1342 }
1343
SetCachedSize(int size) const1344 void ModuleSymbols::SetCachedSize(int size) const {
1345 _impl_._cached_size_.Set(size);
1346 }
1347
Clear()1348 void ModuleSymbols::Clear() {
1349 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ModuleSymbols)
1350 ::uint32_t cached_has_bits = 0;
1351 // Prevent compiler warnings about cached_has_bits being unused
1352 (void) cached_has_bits;
1353
1354 _impl_.address_symbols_.Clear();
1355 cached_has_bits = _impl_._has_bits_[0];
1356 if (cached_has_bits & 0x00000003u) {
1357 if (cached_has_bits & 0x00000001u) {
1358 _impl_.path_.ClearNonDefaultToEmpty();
1359 }
1360 if (cached_has_bits & 0x00000002u) {
1361 _impl_.build_id_.ClearNonDefaultToEmpty();
1362 }
1363 }
1364 _impl_._has_bits_.Clear();
1365 _internal_metadata_.Clear<std::string>();
1366 }
1367
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1368 const char* ModuleSymbols::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1369 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1370 _Internal::HasBits has_bits{};
1371 while (!ctx->Done(&ptr)) {
1372 ::uint32_t tag;
1373 ptr = ::_pbi::ReadTag(ptr, &tag);
1374 switch (tag >> 3) {
1375 // optional string path = 1;
1376 case 1:
1377 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1378 auto str = _internal_mutable_path();
1379 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1380 CHK_(ptr);
1381 } else {
1382 goto handle_unusual;
1383 }
1384 continue;
1385 // optional string build_id = 2;
1386 case 2:
1387 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1388 auto str = _internal_mutable_build_id();
1389 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1390 CHK_(ptr);
1391 } else {
1392 goto handle_unusual;
1393 }
1394 continue;
1395 // repeated .perfetto.protos.AddressSymbols address_symbols = 3;
1396 case 3:
1397 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1398 ptr -= 1;
1399 do {
1400 ptr += 1;
1401 ptr = ctx->ParseMessage(_internal_add_address_symbols(), ptr);
1402 CHK_(ptr);
1403 if (!ctx->DataAvailable(ptr)) break;
1404 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1405 } else {
1406 goto handle_unusual;
1407 }
1408 continue;
1409 default:
1410 goto handle_unusual;
1411 } // switch
1412 handle_unusual:
1413 if ((tag == 0) || ((tag & 7) == 4)) {
1414 CHK_(ptr);
1415 ctx->SetLastTag(tag);
1416 goto message_done;
1417 }
1418 ptr = UnknownFieldParse(
1419 tag,
1420 _internal_metadata_.mutable_unknown_fields<std::string>(),
1421 ptr, ctx);
1422 CHK_(ptr != nullptr);
1423 } // while
1424 message_done:
1425 _impl_._has_bits_.Or(has_bits);
1426 return ptr;
1427 failure:
1428 ptr = nullptr;
1429 goto message_done;
1430 #undef CHK_
1431 }
1432
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1433 ::uint8_t* ModuleSymbols::_InternalSerialize(
1434 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1435 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ModuleSymbols)
1436 ::uint32_t cached_has_bits = 0;
1437 (void) cached_has_bits;
1438
1439 cached_has_bits = _impl_._has_bits_[0];
1440 // optional string path = 1;
1441 if (cached_has_bits & 0x00000001u) {
1442 target = stream->WriteStringMaybeAliased(
1443 1, this->_internal_path(), target);
1444 }
1445
1446 // optional string build_id = 2;
1447 if (cached_has_bits & 0x00000002u) {
1448 target = stream->WriteStringMaybeAliased(
1449 2, this->_internal_build_id(), target);
1450 }
1451
1452 // repeated .perfetto.protos.AddressSymbols address_symbols = 3;
1453 for (unsigned i = 0,
1454 n = static_cast<unsigned>(this->_internal_address_symbols_size()); i < n; i++) {
1455 const auto& repfield = this->_internal_address_symbols(i);
1456 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1457 InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
1458 }
1459
1460 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1461 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1462 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1463 }
1464 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ModuleSymbols)
1465 return target;
1466 }
1467
ByteSizeLong() const1468 size_t ModuleSymbols::ByteSizeLong() const {
1469 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ModuleSymbols)
1470 size_t total_size = 0;
1471
1472 ::uint32_t cached_has_bits = 0;
1473 // Prevent compiler warnings about cached_has_bits being unused
1474 (void) cached_has_bits;
1475
1476 // repeated .perfetto.protos.AddressSymbols address_symbols = 3;
1477 total_size += 1UL * this->_internal_address_symbols_size();
1478 for (const auto& msg : this->_impl_.address_symbols_) {
1479 total_size +=
1480 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1481 }
1482
1483 cached_has_bits = _impl_._has_bits_[0];
1484 if (cached_has_bits & 0x00000003u) {
1485 // optional string path = 1;
1486 if (cached_has_bits & 0x00000001u) {
1487 total_size += 1 +
1488 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1489 this->_internal_path());
1490 }
1491
1492 // optional string build_id = 2;
1493 if (cached_has_bits & 0x00000002u) {
1494 total_size += 1 +
1495 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1496 this->_internal_build_id());
1497 }
1498
1499 }
1500 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1501 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1502 }
1503 int cached_size = ::_pbi::ToCachedSize(total_size);
1504 SetCachedSize(cached_size);
1505 return total_size;
1506 }
1507
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1508 void ModuleSymbols::CheckTypeAndMergeFrom(
1509 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1510 MergeFrom(*::_pbi::DownCast<const ModuleSymbols*>(
1511 &from));
1512 }
1513
MergeFrom(const ModuleSymbols & from)1514 void ModuleSymbols::MergeFrom(const ModuleSymbols& from) {
1515 ModuleSymbols* const _this = this;
1516 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ModuleSymbols)
1517 GOOGLE_DCHECK_NE(&from, _this);
1518 ::uint32_t cached_has_bits = 0;
1519 (void) cached_has_bits;
1520
1521 _this->_impl_.address_symbols_.MergeFrom(from._impl_.address_symbols_);
1522 cached_has_bits = from._impl_._has_bits_[0];
1523 if (cached_has_bits & 0x00000003u) {
1524 if (cached_has_bits & 0x00000001u) {
1525 _this->_internal_set_path(from._internal_path());
1526 }
1527 if (cached_has_bits & 0x00000002u) {
1528 _this->_internal_set_build_id(from._internal_build_id());
1529 }
1530 }
1531 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1532 }
1533
CopyFrom(const ModuleSymbols & from)1534 void ModuleSymbols::CopyFrom(const ModuleSymbols& from) {
1535 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ModuleSymbols)
1536 if (&from == this) return;
1537 Clear();
1538 MergeFrom(from);
1539 }
1540
IsInitialized() const1541 bool ModuleSymbols::IsInitialized() const {
1542 return true;
1543 }
1544
InternalSwap(ModuleSymbols * other)1545 void ModuleSymbols::InternalSwap(ModuleSymbols* other) {
1546 using std::swap;
1547 auto* lhs_arena = GetArenaForAllocation();
1548 auto* rhs_arena = other->GetArenaForAllocation();
1549 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1550 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1551 _impl_.address_symbols_.InternalSwap(&other->_impl_.address_symbols_);
1552 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1553 &_impl_.path_, lhs_arena,
1554 &other->_impl_.path_, rhs_arena
1555 );
1556 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1557 &_impl_.build_id_, lhs_arena,
1558 &other->_impl_.build_id_, rhs_arena
1559 );
1560 }
1561
GetTypeName() const1562 std::string ModuleSymbols::GetTypeName() const {
1563 return "perfetto.protos.ModuleSymbols";
1564 }
1565
1566
1567 // ===================================================================
1568
1569 class Mapping::_Internal {
1570 public:
1571 using HasBits = decltype(std::declval<Mapping>()._impl_._has_bits_);
set_has_iid(HasBits * has_bits)1572 static void set_has_iid(HasBits* has_bits) {
1573 (*has_bits)[0] |= 1u;
1574 }
set_has_build_id(HasBits * has_bits)1575 static void set_has_build_id(HasBits* has_bits) {
1576 (*has_bits)[0] |= 2u;
1577 }
set_has_exact_offset(HasBits * has_bits)1578 static void set_has_exact_offset(HasBits* has_bits) {
1579 (*has_bits)[0] |= 64u;
1580 }
set_has_start_offset(HasBits * has_bits)1581 static void set_has_start_offset(HasBits* has_bits) {
1582 (*has_bits)[0] |= 4u;
1583 }
set_has_start(HasBits * has_bits)1584 static void set_has_start(HasBits* has_bits) {
1585 (*has_bits)[0] |= 8u;
1586 }
set_has_end(HasBits * has_bits)1587 static void set_has_end(HasBits* has_bits) {
1588 (*has_bits)[0] |= 16u;
1589 }
set_has_load_bias(HasBits * has_bits)1590 static void set_has_load_bias(HasBits* has_bits) {
1591 (*has_bits)[0] |= 32u;
1592 }
1593 };
1594
Mapping(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1595 Mapping::Mapping(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1596 bool is_message_owned)
1597 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1598 SharedCtor(arena, is_message_owned);
1599 // @@protoc_insertion_point(arena_constructor:perfetto.protos.Mapping)
1600 }
Mapping(const Mapping & from)1601 Mapping::Mapping(const Mapping& from)
1602 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1603 Mapping* const _this = this; (void)_this;
1604 new (&_impl_) Impl_{
1605 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1606 , /*decltype(_impl_._cached_size_)*/{}
1607 , decltype(_impl_.path_string_ids_){from._impl_.path_string_ids_}
1608 , decltype(_impl_.iid_){}
1609 , decltype(_impl_.build_id_){}
1610 , decltype(_impl_.start_offset_){}
1611 , decltype(_impl_.start_){}
1612 , decltype(_impl_.end_){}
1613 , decltype(_impl_.load_bias_){}
1614 , decltype(_impl_.exact_offset_){}};
1615
1616 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1617 ::memcpy(&_impl_.iid_, &from._impl_.iid_,
1618 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.exact_offset_) -
1619 reinterpret_cast<char*>(&_impl_.iid_)) + sizeof(_impl_.exact_offset_));
1620 // @@protoc_insertion_point(copy_constructor:perfetto.protos.Mapping)
1621 }
1622
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1623 inline void Mapping::SharedCtor(
1624 ::_pb::Arena* arena, bool is_message_owned) {
1625 (void)arena;
1626 (void)is_message_owned;
1627 new (&_impl_) Impl_{
1628 decltype(_impl_._has_bits_){}
1629 , /*decltype(_impl_._cached_size_)*/{}
1630 , decltype(_impl_.path_string_ids_){arena}
1631 , decltype(_impl_.iid_){::uint64_t{0u}}
1632 , decltype(_impl_.build_id_){::uint64_t{0u}}
1633 , decltype(_impl_.start_offset_){::uint64_t{0u}}
1634 , decltype(_impl_.start_){::uint64_t{0u}}
1635 , decltype(_impl_.end_){::uint64_t{0u}}
1636 , decltype(_impl_.load_bias_){::uint64_t{0u}}
1637 , decltype(_impl_.exact_offset_){::uint64_t{0u}}
1638 };
1639 }
1640
~Mapping()1641 Mapping::~Mapping() {
1642 // @@protoc_insertion_point(destructor:perfetto.protos.Mapping)
1643 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1644 (void)arena;
1645 return;
1646 }
1647 SharedDtor();
1648 }
1649
SharedDtor()1650 inline void Mapping::SharedDtor() {
1651 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1652 _impl_.path_string_ids_.~RepeatedField();
1653 }
1654
SetCachedSize(int size) const1655 void Mapping::SetCachedSize(int size) const {
1656 _impl_._cached_size_.Set(size);
1657 }
1658
Clear()1659 void Mapping::Clear() {
1660 // @@protoc_insertion_point(message_clear_start:perfetto.protos.Mapping)
1661 ::uint32_t cached_has_bits = 0;
1662 // Prevent compiler warnings about cached_has_bits being unused
1663 (void) cached_has_bits;
1664
1665 _impl_.path_string_ids_.Clear();
1666 cached_has_bits = _impl_._has_bits_[0];
1667 if (cached_has_bits & 0x0000007fu) {
1668 ::memset(&_impl_.iid_, 0, static_cast<size_t>(
1669 reinterpret_cast<char*>(&_impl_.exact_offset_) -
1670 reinterpret_cast<char*>(&_impl_.iid_)) + sizeof(_impl_.exact_offset_));
1671 }
1672 _impl_._has_bits_.Clear();
1673 _internal_metadata_.Clear<std::string>();
1674 }
1675
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1676 const char* Mapping::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1677 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1678 _Internal::HasBits has_bits{};
1679 while (!ctx->Done(&ptr)) {
1680 ::uint32_t tag;
1681 ptr = ::_pbi::ReadTag(ptr, &tag);
1682 switch (tag >> 3) {
1683 // optional uint64 iid = 1;
1684 case 1:
1685 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1686 _Internal::set_has_iid(&has_bits);
1687 _impl_.iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1688 CHK_(ptr);
1689 } else {
1690 goto handle_unusual;
1691 }
1692 continue;
1693 // optional uint64 build_id = 2;
1694 case 2:
1695 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1696 _Internal::set_has_build_id(&has_bits);
1697 _impl_.build_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1698 CHK_(ptr);
1699 } else {
1700 goto handle_unusual;
1701 }
1702 continue;
1703 // optional uint64 start_offset = 3;
1704 case 3:
1705 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1706 _Internal::set_has_start_offset(&has_bits);
1707 _impl_.start_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1708 CHK_(ptr);
1709 } else {
1710 goto handle_unusual;
1711 }
1712 continue;
1713 // optional uint64 start = 4;
1714 case 4:
1715 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1716 _Internal::set_has_start(&has_bits);
1717 _impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1718 CHK_(ptr);
1719 } else {
1720 goto handle_unusual;
1721 }
1722 continue;
1723 // optional uint64 end = 5;
1724 case 5:
1725 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1726 _Internal::set_has_end(&has_bits);
1727 _impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1728 CHK_(ptr);
1729 } else {
1730 goto handle_unusual;
1731 }
1732 continue;
1733 // optional uint64 load_bias = 6;
1734 case 6:
1735 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1736 _Internal::set_has_load_bias(&has_bits);
1737 _impl_.load_bias_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1738 CHK_(ptr);
1739 } else {
1740 goto handle_unusual;
1741 }
1742 continue;
1743 // repeated uint64 path_string_ids = 7;
1744 case 7:
1745 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1746 ptr -= 1;
1747 do {
1748 ptr += 1;
1749 _internal_add_path_string_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
1750 CHK_(ptr);
1751 if (!ctx->DataAvailable(ptr)) break;
1752 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<56>(ptr));
1753 } else if (static_cast<::uint8_t>(tag) == 58) {
1754 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_path_string_ids(), ptr, ctx);
1755 CHK_(ptr);
1756 } else {
1757 goto handle_unusual;
1758 }
1759 continue;
1760 // optional uint64 exact_offset = 8;
1761 case 8:
1762 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1763 _Internal::set_has_exact_offset(&has_bits);
1764 _impl_.exact_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1765 CHK_(ptr);
1766 } else {
1767 goto handle_unusual;
1768 }
1769 continue;
1770 default:
1771 goto handle_unusual;
1772 } // switch
1773 handle_unusual:
1774 if ((tag == 0) || ((tag & 7) == 4)) {
1775 CHK_(ptr);
1776 ctx->SetLastTag(tag);
1777 goto message_done;
1778 }
1779 ptr = UnknownFieldParse(
1780 tag,
1781 _internal_metadata_.mutable_unknown_fields<std::string>(),
1782 ptr, ctx);
1783 CHK_(ptr != nullptr);
1784 } // while
1785 message_done:
1786 _impl_._has_bits_.Or(has_bits);
1787 return ptr;
1788 failure:
1789 ptr = nullptr;
1790 goto message_done;
1791 #undef CHK_
1792 }
1793
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1794 ::uint8_t* Mapping::_InternalSerialize(
1795 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1796 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.Mapping)
1797 ::uint32_t cached_has_bits = 0;
1798 (void) cached_has_bits;
1799
1800 cached_has_bits = _impl_._has_bits_[0];
1801 // optional uint64 iid = 1;
1802 if (cached_has_bits & 0x00000001u) {
1803 target = stream->EnsureSpace(target);
1804 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_iid(), target);
1805 }
1806
1807 // optional uint64 build_id = 2;
1808 if (cached_has_bits & 0x00000002u) {
1809 target = stream->EnsureSpace(target);
1810 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_build_id(), target);
1811 }
1812
1813 // optional uint64 start_offset = 3;
1814 if (cached_has_bits & 0x00000004u) {
1815 target = stream->EnsureSpace(target);
1816 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_start_offset(), target);
1817 }
1818
1819 // optional uint64 start = 4;
1820 if (cached_has_bits & 0x00000008u) {
1821 target = stream->EnsureSpace(target);
1822 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_start(), target);
1823 }
1824
1825 // optional uint64 end = 5;
1826 if (cached_has_bits & 0x00000010u) {
1827 target = stream->EnsureSpace(target);
1828 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_end(), target);
1829 }
1830
1831 // optional uint64 load_bias = 6;
1832 if (cached_has_bits & 0x00000020u) {
1833 target = stream->EnsureSpace(target);
1834 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_load_bias(), target);
1835 }
1836
1837 // repeated uint64 path_string_ids = 7;
1838 for (int i = 0, n = this->_internal_path_string_ids_size(); i < n; i++) {
1839 target = stream->EnsureSpace(target);
1840 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_path_string_ids(i), target);
1841 }
1842
1843 // optional uint64 exact_offset = 8;
1844 if (cached_has_bits & 0x00000040u) {
1845 target = stream->EnsureSpace(target);
1846 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_exact_offset(), target);
1847 }
1848
1849 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1850 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1851 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1852 }
1853 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.Mapping)
1854 return target;
1855 }
1856
ByteSizeLong() const1857 size_t Mapping::ByteSizeLong() const {
1858 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.Mapping)
1859 size_t total_size = 0;
1860
1861 ::uint32_t cached_has_bits = 0;
1862 // Prevent compiler warnings about cached_has_bits being unused
1863 (void) cached_has_bits;
1864
1865 // repeated uint64 path_string_ids = 7;
1866 {
1867 size_t data_size = ::_pbi::WireFormatLite::
1868 UInt64Size(this->_impl_.path_string_ids_);
1869 total_size += 1 *
1870 ::_pbi::FromIntSize(this->_internal_path_string_ids_size());
1871 total_size += data_size;
1872 }
1873
1874 cached_has_bits = _impl_._has_bits_[0];
1875 if (cached_has_bits & 0x0000007fu) {
1876 // optional uint64 iid = 1;
1877 if (cached_has_bits & 0x00000001u) {
1878 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_iid());
1879 }
1880
1881 // optional uint64 build_id = 2;
1882 if (cached_has_bits & 0x00000002u) {
1883 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_build_id());
1884 }
1885
1886 // optional uint64 start_offset = 3;
1887 if (cached_has_bits & 0x00000004u) {
1888 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_start_offset());
1889 }
1890
1891 // optional uint64 start = 4;
1892 if (cached_has_bits & 0x00000008u) {
1893 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_start());
1894 }
1895
1896 // optional uint64 end = 5;
1897 if (cached_has_bits & 0x00000010u) {
1898 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_end());
1899 }
1900
1901 // optional uint64 load_bias = 6;
1902 if (cached_has_bits & 0x00000020u) {
1903 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_load_bias());
1904 }
1905
1906 // optional uint64 exact_offset = 8;
1907 if (cached_has_bits & 0x00000040u) {
1908 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_exact_offset());
1909 }
1910
1911 }
1912 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1913 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1914 }
1915 int cached_size = ::_pbi::ToCachedSize(total_size);
1916 SetCachedSize(cached_size);
1917 return total_size;
1918 }
1919
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1920 void Mapping::CheckTypeAndMergeFrom(
1921 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1922 MergeFrom(*::_pbi::DownCast<const Mapping*>(
1923 &from));
1924 }
1925
MergeFrom(const Mapping & from)1926 void Mapping::MergeFrom(const Mapping& from) {
1927 Mapping* const _this = this;
1928 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.Mapping)
1929 GOOGLE_DCHECK_NE(&from, _this);
1930 ::uint32_t cached_has_bits = 0;
1931 (void) cached_has_bits;
1932
1933 _this->_impl_.path_string_ids_.MergeFrom(from._impl_.path_string_ids_);
1934 cached_has_bits = from._impl_._has_bits_[0];
1935 if (cached_has_bits & 0x0000007fu) {
1936 if (cached_has_bits & 0x00000001u) {
1937 _this->_impl_.iid_ = from._impl_.iid_;
1938 }
1939 if (cached_has_bits & 0x00000002u) {
1940 _this->_impl_.build_id_ = from._impl_.build_id_;
1941 }
1942 if (cached_has_bits & 0x00000004u) {
1943 _this->_impl_.start_offset_ = from._impl_.start_offset_;
1944 }
1945 if (cached_has_bits & 0x00000008u) {
1946 _this->_impl_.start_ = from._impl_.start_;
1947 }
1948 if (cached_has_bits & 0x00000010u) {
1949 _this->_impl_.end_ = from._impl_.end_;
1950 }
1951 if (cached_has_bits & 0x00000020u) {
1952 _this->_impl_.load_bias_ = from._impl_.load_bias_;
1953 }
1954 if (cached_has_bits & 0x00000040u) {
1955 _this->_impl_.exact_offset_ = from._impl_.exact_offset_;
1956 }
1957 _this->_impl_._has_bits_[0] |= cached_has_bits;
1958 }
1959 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1960 }
1961
CopyFrom(const Mapping & from)1962 void Mapping::CopyFrom(const Mapping& from) {
1963 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.Mapping)
1964 if (&from == this) return;
1965 Clear();
1966 MergeFrom(from);
1967 }
1968
IsInitialized() const1969 bool Mapping::IsInitialized() const {
1970 return true;
1971 }
1972
InternalSwap(Mapping * other)1973 void Mapping::InternalSwap(Mapping* other) {
1974 using std::swap;
1975 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1976 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1977 _impl_.path_string_ids_.InternalSwap(&other->_impl_.path_string_ids_);
1978 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1979 PROTOBUF_FIELD_OFFSET(Mapping, _impl_.exact_offset_)
1980 + sizeof(Mapping::_impl_.exact_offset_) // NOLINT
1981 - PROTOBUF_FIELD_OFFSET(Mapping, _impl_.iid_)>(
1982 reinterpret_cast<char*>(&_impl_.iid_),
1983 reinterpret_cast<char*>(&other->_impl_.iid_));
1984 }
1985
GetTypeName() const1986 std::string Mapping::GetTypeName() const {
1987 return "perfetto.protos.Mapping";
1988 }
1989
1990
1991 // ===================================================================
1992
1993 class Frame::_Internal {
1994 public:
1995 using HasBits = decltype(std::declval<Frame>()._impl_._has_bits_);
set_has_iid(HasBits * has_bits)1996 static void set_has_iid(HasBits* has_bits) {
1997 (*has_bits)[0] |= 1u;
1998 }
set_has_function_name_id(HasBits * has_bits)1999 static void set_has_function_name_id(HasBits* has_bits) {
2000 (*has_bits)[0] |= 2u;
2001 }
set_has_mapping_id(HasBits * has_bits)2002 static void set_has_mapping_id(HasBits* has_bits) {
2003 (*has_bits)[0] |= 4u;
2004 }
set_has_rel_pc(HasBits * has_bits)2005 static void set_has_rel_pc(HasBits* has_bits) {
2006 (*has_bits)[0] |= 8u;
2007 }
2008 };
2009
Frame(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2010 Frame::Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2011 bool is_message_owned)
2012 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2013 SharedCtor(arena, is_message_owned);
2014 // @@protoc_insertion_point(arena_constructor:perfetto.protos.Frame)
2015 }
Frame(const Frame & from)2016 Frame::Frame(const Frame& from)
2017 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2018 Frame* const _this = this; (void)_this;
2019 new (&_impl_) Impl_{
2020 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2021 , /*decltype(_impl_._cached_size_)*/{}
2022 , decltype(_impl_.iid_){}
2023 , decltype(_impl_.function_name_id_){}
2024 , decltype(_impl_.mapping_id_){}
2025 , decltype(_impl_.rel_pc_){}};
2026
2027 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2028 ::memcpy(&_impl_.iid_, &from._impl_.iid_,
2029 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.rel_pc_) -
2030 reinterpret_cast<char*>(&_impl_.iid_)) + sizeof(_impl_.rel_pc_));
2031 // @@protoc_insertion_point(copy_constructor:perfetto.protos.Frame)
2032 }
2033
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2034 inline void Frame::SharedCtor(
2035 ::_pb::Arena* arena, bool is_message_owned) {
2036 (void)arena;
2037 (void)is_message_owned;
2038 new (&_impl_) Impl_{
2039 decltype(_impl_._has_bits_){}
2040 , /*decltype(_impl_._cached_size_)*/{}
2041 , decltype(_impl_.iid_){::uint64_t{0u}}
2042 , decltype(_impl_.function_name_id_){::uint64_t{0u}}
2043 , decltype(_impl_.mapping_id_){::uint64_t{0u}}
2044 , decltype(_impl_.rel_pc_){::uint64_t{0u}}
2045 };
2046 }
2047
~Frame()2048 Frame::~Frame() {
2049 // @@protoc_insertion_point(destructor:perfetto.protos.Frame)
2050 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2051 (void)arena;
2052 return;
2053 }
2054 SharedDtor();
2055 }
2056
SharedDtor()2057 inline void Frame::SharedDtor() {
2058 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2059 }
2060
SetCachedSize(int size) const2061 void Frame::SetCachedSize(int size) const {
2062 _impl_._cached_size_.Set(size);
2063 }
2064
Clear()2065 void Frame::Clear() {
2066 // @@protoc_insertion_point(message_clear_start:perfetto.protos.Frame)
2067 ::uint32_t cached_has_bits = 0;
2068 // Prevent compiler warnings about cached_has_bits being unused
2069 (void) cached_has_bits;
2070
2071 cached_has_bits = _impl_._has_bits_[0];
2072 if (cached_has_bits & 0x0000000fu) {
2073 ::memset(&_impl_.iid_, 0, static_cast<size_t>(
2074 reinterpret_cast<char*>(&_impl_.rel_pc_) -
2075 reinterpret_cast<char*>(&_impl_.iid_)) + sizeof(_impl_.rel_pc_));
2076 }
2077 _impl_._has_bits_.Clear();
2078 _internal_metadata_.Clear<std::string>();
2079 }
2080
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2081 const char* Frame::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2082 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2083 _Internal::HasBits has_bits{};
2084 while (!ctx->Done(&ptr)) {
2085 ::uint32_t tag;
2086 ptr = ::_pbi::ReadTag(ptr, &tag);
2087 switch (tag >> 3) {
2088 // optional uint64 iid = 1;
2089 case 1:
2090 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2091 _Internal::set_has_iid(&has_bits);
2092 _impl_.iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2093 CHK_(ptr);
2094 } else {
2095 goto handle_unusual;
2096 }
2097 continue;
2098 // optional uint64 function_name_id = 2;
2099 case 2:
2100 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2101 _Internal::set_has_function_name_id(&has_bits);
2102 _impl_.function_name_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2103 CHK_(ptr);
2104 } else {
2105 goto handle_unusual;
2106 }
2107 continue;
2108 // optional uint64 mapping_id = 3;
2109 case 3:
2110 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2111 _Internal::set_has_mapping_id(&has_bits);
2112 _impl_.mapping_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2113 CHK_(ptr);
2114 } else {
2115 goto handle_unusual;
2116 }
2117 continue;
2118 // optional uint64 rel_pc = 4;
2119 case 4:
2120 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2121 _Internal::set_has_rel_pc(&has_bits);
2122 _impl_.rel_pc_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2123 CHK_(ptr);
2124 } else {
2125 goto handle_unusual;
2126 }
2127 continue;
2128 default:
2129 goto handle_unusual;
2130 } // switch
2131 handle_unusual:
2132 if ((tag == 0) || ((tag & 7) == 4)) {
2133 CHK_(ptr);
2134 ctx->SetLastTag(tag);
2135 goto message_done;
2136 }
2137 ptr = UnknownFieldParse(
2138 tag,
2139 _internal_metadata_.mutable_unknown_fields<std::string>(),
2140 ptr, ctx);
2141 CHK_(ptr != nullptr);
2142 } // while
2143 message_done:
2144 _impl_._has_bits_.Or(has_bits);
2145 return ptr;
2146 failure:
2147 ptr = nullptr;
2148 goto message_done;
2149 #undef CHK_
2150 }
2151
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2152 ::uint8_t* Frame::_InternalSerialize(
2153 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2154 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.Frame)
2155 ::uint32_t cached_has_bits = 0;
2156 (void) cached_has_bits;
2157
2158 cached_has_bits = _impl_._has_bits_[0];
2159 // optional uint64 iid = 1;
2160 if (cached_has_bits & 0x00000001u) {
2161 target = stream->EnsureSpace(target);
2162 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_iid(), target);
2163 }
2164
2165 // optional uint64 function_name_id = 2;
2166 if (cached_has_bits & 0x00000002u) {
2167 target = stream->EnsureSpace(target);
2168 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_function_name_id(), target);
2169 }
2170
2171 // optional uint64 mapping_id = 3;
2172 if (cached_has_bits & 0x00000004u) {
2173 target = stream->EnsureSpace(target);
2174 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_mapping_id(), target);
2175 }
2176
2177 // optional uint64 rel_pc = 4;
2178 if (cached_has_bits & 0x00000008u) {
2179 target = stream->EnsureSpace(target);
2180 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_rel_pc(), target);
2181 }
2182
2183 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2184 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2185 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2186 }
2187 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.Frame)
2188 return target;
2189 }
2190
ByteSizeLong() const2191 size_t Frame::ByteSizeLong() const {
2192 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.Frame)
2193 size_t total_size = 0;
2194
2195 ::uint32_t cached_has_bits = 0;
2196 // Prevent compiler warnings about cached_has_bits being unused
2197 (void) cached_has_bits;
2198
2199 cached_has_bits = _impl_._has_bits_[0];
2200 if (cached_has_bits & 0x0000000fu) {
2201 // optional uint64 iid = 1;
2202 if (cached_has_bits & 0x00000001u) {
2203 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_iid());
2204 }
2205
2206 // optional uint64 function_name_id = 2;
2207 if (cached_has_bits & 0x00000002u) {
2208 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_function_name_id());
2209 }
2210
2211 // optional uint64 mapping_id = 3;
2212 if (cached_has_bits & 0x00000004u) {
2213 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_mapping_id());
2214 }
2215
2216 // optional uint64 rel_pc = 4;
2217 if (cached_has_bits & 0x00000008u) {
2218 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_rel_pc());
2219 }
2220
2221 }
2222 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2223 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2224 }
2225 int cached_size = ::_pbi::ToCachedSize(total_size);
2226 SetCachedSize(cached_size);
2227 return total_size;
2228 }
2229
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2230 void Frame::CheckTypeAndMergeFrom(
2231 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2232 MergeFrom(*::_pbi::DownCast<const Frame*>(
2233 &from));
2234 }
2235
MergeFrom(const Frame & from)2236 void Frame::MergeFrom(const Frame& from) {
2237 Frame* const _this = this;
2238 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.Frame)
2239 GOOGLE_DCHECK_NE(&from, _this);
2240 ::uint32_t cached_has_bits = 0;
2241 (void) cached_has_bits;
2242
2243 cached_has_bits = from._impl_._has_bits_[0];
2244 if (cached_has_bits & 0x0000000fu) {
2245 if (cached_has_bits & 0x00000001u) {
2246 _this->_impl_.iid_ = from._impl_.iid_;
2247 }
2248 if (cached_has_bits & 0x00000002u) {
2249 _this->_impl_.function_name_id_ = from._impl_.function_name_id_;
2250 }
2251 if (cached_has_bits & 0x00000004u) {
2252 _this->_impl_.mapping_id_ = from._impl_.mapping_id_;
2253 }
2254 if (cached_has_bits & 0x00000008u) {
2255 _this->_impl_.rel_pc_ = from._impl_.rel_pc_;
2256 }
2257 _this->_impl_._has_bits_[0] |= cached_has_bits;
2258 }
2259 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2260 }
2261
CopyFrom(const Frame & from)2262 void Frame::CopyFrom(const Frame& from) {
2263 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.Frame)
2264 if (&from == this) return;
2265 Clear();
2266 MergeFrom(from);
2267 }
2268
IsInitialized() const2269 bool Frame::IsInitialized() const {
2270 return true;
2271 }
2272
InternalSwap(Frame * other)2273 void Frame::InternalSwap(Frame* other) {
2274 using std::swap;
2275 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2276 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2277 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2278 PROTOBUF_FIELD_OFFSET(Frame, _impl_.rel_pc_)
2279 + sizeof(Frame::_impl_.rel_pc_) // NOLINT
2280 - PROTOBUF_FIELD_OFFSET(Frame, _impl_.iid_)>(
2281 reinterpret_cast<char*>(&_impl_.iid_),
2282 reinterpret_cast<char*>(&other->_impl_.iid_));
2283 }
2284
GetTypeName() const2285 std::string Frame::GetTypeName() const {
2286 return "perfetto.protos.Frame";
2287 }
2288
2289
2290 // ===================================================================
2291
2292 class Callstack::_Internal {
2293 public:
2294 using HasBits = decltype(std::declval<Callstack>()._impl_._has_bits_);
set_has_iid(HasBits * has_bits)2295 static void set_has_iid(HasBits* has_bits) {
2296 (*has_bits)[0] |= 1u;
2297 }
2298 };
2299
Callstack(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2300 Callstack::Callstack(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2301 bool is_message_owned)
2302 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2303 SharedCtor(arena, is_message_owned);
2304 // @@protoc_insertion_point(arena_constructor:perfetto.protos.Callstack)
2305 }
Callstack(const Callstack & from)2306 Callstack::Callstack(const Callstack& from)
2307 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2308 Callstack* const _this = this; (void)_this;
2309 new (&_impl_) Impl_{
2310 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2311 , /*decltype(_impl_._cached_size_)*/{}
2312 , decltype(_impl_.frame_ids_){from._impl_.frame_ids_}
2313 , decltype(_impl_.iid_){}};
2314
2315 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2316 _this->_impl_.iid_ = from._impl_.iid_;
2317 // @@protoc_insertion_point(copy_constructor:perfetto.protos.Callstack)
2318 }
2319
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2320 inline void Callstack::SharedCtor(
2321 ::_pb::Arena* arena, bool is_message_owned) {
2322 (void)arena;
2323 (void)is_message_owned;
2324 new (&_impl_) Impl_{
2325 decltype(_impl_._has_bits_){}
2326 , /*decltype(_impl_._cached_size_)*/{}
2327 , decltype(_impl_.frame_ids_){arena}
2328 , decltype(_impl_.iid_){::uint64_t{0u}}
2329 };
2330 }
2331
~Callstack()2332 Callstack::~Callstack() {
2333 // @@protoc_insertion_point(destructor:perfetto.protos.Callstack)
2334 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2335 (void)arena;
2336 return;
2337 }
2338 SharedDtor();
2339 }
2340
SharedDtor()2341 inline void Callstack::SharedDtor() {
2342 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2343 _impl_.frame_ids_.~RepeatedField();
2344 }
2345
SetCachedSize(int size) const2346 void Callstack::SetCachedSize(int size) const {
2347 _impl_._cached_size_.Set(size);
2348 }
2349
Clear()2350 void Callstack::Clear() {
2351 // @@protoc_insertion_point(message_clear_start:perfetto.protos.Callstack)
2352 ::uint32_t cached_has_bits = 0;
2353 // Prevent compiler warnings about cached_has_bits being unused
2354 (void) cached_has_bits;
2355
2356 _impl_.frame_ids_.Clear();
2357 _impl_.iid_ = ::uint64_t{0u};
2358 _impl_._has_bits_.Clear();
2359 _internal_metadata_.Clear<std::string>();
2360 }
2361
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2362 const char* Callstack::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2363 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2364 _Internal::HasBits has_bits{};
2365 while (!ctx->Done(&ptr)) {
2366 ::uint32_t tag;
2367 ptr = ::_pbi::ReadTag(ptr, &tag);
2368 switch (tag >> 3) {
2369 // optional uint64 iid = 1;
2370 case 1:
2371 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2372 _Internal::set_has_iid(&has_bits);
2373 _impl_.iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2374 CHK_(ptr);
2375 } else {
2376 goto handle_unusual;
2377 }
2378 continue;
2379 // repeated uint64 frame_ids = 2;
2380 case 2:
2381 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2382 ptr -= 1;
2383 do {
2384 ptr += 1;
2385 _internal_add_frame_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
2386 CHK_(ptr);
2387 if (!ctx->DataAvailable(ptr)) break;
2388 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
2389 } else if (static_cast<::uint8_t>(tag) == 18) {
2390 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_frame_ids(), ptr, ctx);
2391 CHK_(ptr);
2392 } else {
2393 goto handle_unusual;
2394 }
2395 continue;
2396 default:
2397 goto handle_unusual;
2398 } // switch
2399 handle_unusual:
2400 if ((tag == 0) || ((tag & 7) == 4)) {
2401 CHK_(ptr);
2402 ctx->SetLastTag(tag);
2403 goto message_done;
2404 }
2405 ptr = UnknownFieldParse(
2406 tag,
2407 _internal_metadata_.mutable_unknown_fields<std::string>(),
2408 ptr, ctx);
2409 CHK_(ptr != nullptr);
2410 } // while
2411 message_done:
2412 _impl_._has_bits_.Or(has_bits);
2413 return ptr;
2414 failure:
2415 ptr = nullptr;
2416 goto message_done;
2417 #undef CHK_
2418 }
2419
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2420 ::uint8_t* Callstack::_InternalSerialize(
2421 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2422 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.Callstack)
2423 ::uint32_t cached_has_bits = 0;
2424 (void) cached_has_bits;
2425
2426 cached_has_bits = _impl_._has_bits_[0];
2427 // optional uint64 iid = 1;
2428 if (cached_has_bits & 0x00000001u) {
2429 target = stream->EnsureSpace(target);
2430 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_iid(), target);
2431 }
2432
2433 // repeated uint64 frame_ids = 2;
2434 for (int i = 0, n = this->_internal_frame_ids_size(); i < n; i++) {
2435 target = stream->EnsureSpace(target);
2436 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_frame_ids(i), target);
2437 }
2438
2439 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2440 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2441 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2442 }
2443 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.Callstack)
2444 return target;
2445 }
2446
ByteSizeLong() const2447 size_t Callstack::ByteSizeLong() const {
2448 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.Callstack)
2449 size_t total_size = 0;
2450
2451 ::uint32_t cached_has_bits = 0;
2452 // Prevent compiler warnings about cached_has_bits being unused
2453 (void) cached_has_bits;
2454
2455 // repeated uint64 frame_ids = 2;
2456 {
2457 size_t data_size = ::_pbi::WireFormatLite::
2458 UInt64Size(this->_impl_.frame_ids_);
2459 total_size += 1 *
2460 ::_pbi::FromIntSize(this->_internal_frame_ids_size());
2461 total_size += data_size;
2462 }
2463
2464 // optional uint64 iid = 1;
2465 cached_has_bits = _impl_._has_bits_[0];
2466 if (cached_has_bits & 0x00000001u) {
2467 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_iid());
2468 }
2469
2470 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2471 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2472 }
2473 int cached_size = ::_pbi::ToCachedSize(total_size);
2474 SetCachedSize(cached_size);
2475 return total_size;
2476 }
2477
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2478 void Callstack::CheckTypeAndMergeFrom(
2479 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2480 MergeFrom(*::_pbi::DownCast<const Callstack*>(
2481 &from));
2482 }
2483
MergeFrom(const Callstack & from)2484 void Callstack::MergeFrom(const Callstack& from) {
2485 Callstack* const _this = this;
2486 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.Callstack)
2487 GOOGLE_DCHECK_NE(&from, _this);
2488 ::uint32_t cached_has_bits = 0;
2489 (void) cached_has_bits;
2490
2491 _this->_impl_.frame_ids_.MergeFrom(from._impl_.frame_ids_);
2492 if (from._internal_has_iid()) {
2493 _this->_internal_set_iid(from._internal_iid());
2494 }
2495 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2496 }
2497
CopyFrom(const Callstack & from)2498 void Callstack::CopyFrom(const Callstack& from) {
2499 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.Callstack)
2500 if (&from == this) return;
2501 Clear();
2502 MergeFrom(from);
2503 }
2504
IsInitialized() const2505 bool Callstack::IsInitialized() const {
2506 return true;
2507 }
2508
InternalSwap(Callstack * other)2509 void Callstack::InternalSwap(Callstack* other) {
2510 using std::swap;
2511 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2512 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2513 _impl_.frame_ids_.InternalSwap(&other->_impl_.frame_ids_);
2514 swap(_impl_.iid_, other->_impl_.iid_);
2515 }
2516
GetTypeName() const2517 std::string Callstack::GetTypeName() const {
2518 return "perfetto.protos.Callstack";
2519 }
2520
2521
2522 // @@protoc_insertion_point(namespace_scope)
2523 } // namespace protos
2524 } // namespace perfetto
2525 PROTOBUF_NAMESPACE_OPEN
2526 template<> PROTOBUF_NOINLINE ::perfetto::protos::InternedString*
CreateMaybeMessage(Arena * arena)2527 Arena::CreateMaybeMessage< ::perfetto::protos::InternedString >(Arena* arena) {
2528 return Arena::CreateMessageInternal< ::perfetto::protos::InternedString >(arena);
2529 }
2530 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProfiledFrameSymbols*
CreateMaybeMessage(Arena * arena)2531 Arena::CreateMaybeMessage< ::perfetto::protos::ProfiledFrameSymbols >(Arena* arena) {
2532 return Arena::CreateMessageInternal< ::perfetto::protos::ProfiledFrameSymbols >(arena);
2533 }
2534 template<> PROTOBUF_NOINLINE ::perfetto::protos::Line*
CreateMaybeMessage(Arena * arena)2535 Arena::CreateMaybeMessage< ::perfetto::protos::Line >(Arena* arena) {
2536 return Arena::CreateMessageInternal< ::perfetto::protos::Line >(arena);
2537 }
2538 template<> PROTOBUF_NOINLINE ::perfetto::protos::AddressSymbols*
CreateMaybeMessage(Arena * arena)2539 Arena::CreateMaybeMessage< ::perfetto::protos::AddressSymbols >(Arena* arena) {
2540 return Arena::CreateMessageInternal< ::perfetto::protos::AddressSymbols >(arena);
2541 }
2542 template<> PROTOBUF_NOINLINE ::perfetto::protos::ModuleSymbols*
CreateMaybeMessage(Arena * arena)2543 Arena::CreateMaybeMessage< ::perfetto::protos::ModuleSymbols >(Arena* arena) {
2544 return Arena::CreateMessageInternal< ::perfetto::protos::ModuleSymbols >(arena);
2545 }
2546 template<> PROTOBUF_NOINLINE ::perfetto::protos::Mapping*
CreateMaybeMessage(Arena * arena)2547 Arena::CreateMaybeMessage< ::perfetto::protos::Mapping >(Arena* arena) {
2548 return Arena::CreateMessageInternal< ::perfetto::protos::Mapping >(arena);
2549 }
2550 template<> PROTOBUF_NOINLINE ::perfetto::protos::Frame*
CreateMaybeMessage(Arena * arena)2551 Arena::CreateMaybeMessage< ::perfetto::protos::Frame >(Arena* arena) {
2552 return Arena::CreateMessageInternal< ::perfetto::protos::Frame >(arena);
2553 }
2554 template<> PROTOBUF_NOINLINE ::perfetto::protos::Callstack*
CreateMaybeMessage(Arena * arena)2555 Arena::CreateMaybeMessage< ::perfetto::protos::Callstack >(Arena* arena) {
2556 return Arena::CreateMessageInternal< ::perfetto::protos::Callstack >(arena);
2557 }
2558 PROTOBUF_NAMESPACE_CLOSE
2559
2560 // @@protoc_insertion_point(global_scope)
2561 #include <google/protobuf/port_undef.inc>
2562