1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ps/process_tree.proto
3
4 #include "protos/perfetto/trace/ps/process_tree.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 {
ProcessTree_Thread(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR ProcessTree_Thread::ProcessTree_Thread(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.nstid_)*/{}
28 , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29 , /*decltype(_impl_.tid_)*/0
30 , /*decltype(_impl_.tgid_)*/0} {}
31 struct ProcessTree_ThreadDefaultTypeInternal {
ProcessTree_ThreadDefaultTypeInternalperfetto::protos::ProcessTree_ThreadDefaultTypeInternal32 PROTOBUF_CONSTEXPR ProcessTree_ThreadDefaultTypeInternal()
33 : _instance(::_pbi::ConstantInitialized{}) {}
~ProcessTree_ThreadDefaultTypeInternalperfetto::protos::ProcessTree_ThreadDefaultTypeInternal34 ~ProcessTree_ThreadDefaultTypeInternal() {}
35 union { // NOLINT(misc-non-private-member-variables-in-classes)
36 ProcessTree_Thread _instance;
37 };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProcessTree_ThreadDefaultTypeInternal _ProcessTree_Thread_default_instance_;
ProcessTree_Process(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR ProcessTree_Process::ProcessTree_Process(
41 ::_pbi::ConstantInitialized): _impl_{
42 /*decltype(_impl_._has_bits_)*/{}
43 , /*decltype(_impl_._cached_size_)*/{}
44 , /*decltype(_impl_.cmdline_)*/{}
45 , /*decltype(_impl_.nspid_)*/{}
46 , /*decltype(_impl_.pid_)*/0
47 , /*decltype(_impl_.ppid_)*/0
48 , /*decltype(_impl_.process_start_from_boot_)*/::uint64_t{0u}
49 , /*decltype(_impl_.uid_)*/0} {}
50 struct ProcessTree_ProcessDefaultTypeInternal {
ProcessTree_ProcessDefaultTypeInternalperfetto::protos::ProcessTree_ProcessDefaultTypeInternal51 PROTOBUF_CONSTEXPR ProcessTree_ProcessDefaultTypeInternal()
52 : _instance(::_pbi::ConstantInitialized{}) {}
~ProcessTree_ProcessDefaultTypeInternalperfetto::protos::ProcessTree_ProcessDefaultTypeInternal53 ~ProcessTree_ProcessDefaultTypeInternal() {}
54 union { // NOLINT(misc-non-private-member-variables-in-classes)
55 ProcessTree_Process _instance;
56 };
57 };
58 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProcessTree_ProcessDefaultTypeInternal _ProcessTree_Process_default_instance_;
ProcessTree(::_pbi::ConstantInitialized)59 PROTOBUF_CONSTEXPR ProcessTree::ProcessTree(
60 ::_pbi::ConstantInitialized): _impl_{
61 /*decltype(_impl_._has_bits_)*/{}
62 , /*decltype(_impl_._cached_size_)*/{}
63 , /*decltype(_impl_.processes_)*/{}
64 , /*decltype(_impl_.threads_)*/{}
65 , /*decltype(_impl_.collection_end_timestamp_)*/::uint64_t{0u}} {}
66 struct ProcessTreeDefaultTypeInternal {
ProcessTreeDefaultTypeInternalperfetto::protos::ProcessTreeDefaultTypeInternal67 PROTOBUF_CONSTEXPR ProcessTreeDefaultTypeInternal()
68 : _instance(::_pbi::ConstantInitialized{}) {}
~ProcessTreeDefaultTypeInternalperfetto::protos::ProcessTreeDefaultTypeInternal69 ~ProcessTreeDefaultTypeInternal() {}
70 union { // NOLINT(misc-non-private-member-variables-in-classes)
71 ProcessTree _instance;
72 };
73 };
74 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProcessTreeDefaultTypeInternal _ProcessTree_default_instance_;
75 } // namespace protos
76 } // namespace perfetto
77 namespace perfetto {
78 namespace protos {
79
80 // ===================================================================
81
82 class ProcessTree_Thread::_Internal {
83 public:
84 using HasBits = decltype(std::declval<ProcessTree_Thread>()._impl_._has_bits_);
set_has_tid(HasBits * has_bits)85 static void set_has_tid(HasBits* has_bits) {
86 (*has_bits)[0] |= 2u;
87 }
set_has_tgid(HasBits * has_bits)88 static void set_has_tgid(HasBits* has_bits) {
89 (*has_bits)[0] |= 4u;
90 }
set_has_name(HasBits * has_bits)91 static void set_has_name(HasBits* has_bits) {
92 (*has_bits)[0] |= 1u;
93 }
94 };
95
ProcessTree_Thread(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)96 ProcessTree_Thread::ProcessTree_Thread(::PROTOBUF_NAMESPACE_ID::Arena* arena,
97 bool is_message_owned)
98 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
99 SharedCtor(arena, is_message_owned);
100 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProcessTree.Thread)
101 }
ProcessTree_Thread(const ProcessTree_Thread & from)102 ProcessTree_Thread::ProcessTree_Thread(const ProcessTree_Thread& from)
103 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
104 ProcessTree_Thread* const _this = this; (void)_this;
105 new (&_impl_) Impl_{
106 decltype(_impl_._has_bits_){from._impl_._has_bits_}
107 , /*decltype(_impl_._cached_size_)*/{}
108 , decltype(_impl_.nstid_){from._impl_.nstid_}
109 , decltype(_impl_.name_){}
110 , decltype(_impl_.tid_){}
111 , decltype(_impl_.tgid_){}};
112
113 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
114 _impl_.name_.InitDefault();
115 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
116 _impl_.name_.Set("", GetArenaForAllocation());
117 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
118 if (from._internal_has_name()) {
119 _this->_impl_.name_.Set(from._internal_name(),
120 _this->GetArenaForAllocation());
121 }
122 ::memcpy(&_impl_.tid_, &from._impl_.tid_,
123 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.tgid_) -
124 reinterpret_cast<char*>(&_impl_.tid_)) + sizeof(_impl_.tgid_));
125 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProcessTree.Thread)
126 }
127
SharedCtor(::_pb::Arena * arena,bool is_message_owned)128 inline void ProcessTree_Thread::SharedCtor(
129 ::_pb::Arena* arena, bool is_message_owned) {
130 (void)arena;
131 (void)is_message_owned;
132 new (&_impl_) Impl_{
133 decltype(_impl_._has_bits_){}
134 , /*decltype(_impl_._cached_size_)*/{}
135 , decltype(_impl_.nstid_){arena}
136 , decltype(_impl_.name_){}
137 , decltype(_impl_.tid_){0}
138 , decltype(_impl_.tgid_){0}
139 };
140 _impl_.name_.InitDefault();
141 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
142 _impl_.name_.Set("", GetArenaForAllocation());
143 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
144 }
145
~ProcessTree_Thread()146 ProcessTree_Thread::~ProcessTree_Thread() {
147 // @@protoc_insertion_point(destructor:perfetto.protos.ProcessTree.Thread)
148 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
149 (void)arena;
150 return;
151 }
152 SharedDtor();
153 }
154
SharedDtor()155 inline void ProcessTree_Thread::SharedDtor() {
156 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
157 _impl_.nstid_.~RepeatedField();
158 _impl_.name_.Destroy();
159 }
160
SetCachedSize(int size) const161 void ProcessTree_Thread::SetCachedSize(int size) const {
162 _impl_._cached_size_.Set(size);
163 }
164
Clear()165 void ProcessTree_Thread::Clear() {
166 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProcessTree.Thread)
167 ::uint32_t cached_has_bits = 0;
168 // Prevent compiler warnings about cached_has_bits being unused
169 (void) cached_has_bits;
170
171 _impl_.nstid_.Clear();
172 cached_has_bits = _impl_._has_bits_[0];
173 if (cached_has_bits & 0x00000001u) {
174 _impl_.name_.ClearNonDefaultToEmpty();
175 }
176 if (cached_has_bits & 0x00000006u) {
177 ::memset(&_impl_.tid_, 0, static_cast<size_t>(
178 reinterpret_cast<char*>(&_impl_.tgid_) -
179 reinterpret_cast<char*>(&_impl_.tid_)) + sizeof(_impl_.tgid_));
180 }
181 _impl_._has_bits_.Clear();
182 _internal_metadata_.Clear<std::string>();
183 }
184
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)185 const char* ProcessTree_Thread::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
186 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
187 _Internal::HasBits has_bits{};
188 while (!ctx->Done(&ptr)) {
189 ::uint32_t tag;
190 ptr = ::_pbi::ReadTag(ptr, &tag);
191 switch (tag >> 3) {
192 // optional int32 tid = 1;
193 case 1:
194 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
195 _Internal::set_has_tid(&has_bits);
196 _impl_.tid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
197 CHK_(ptr);
198 } else {
199 goto handle_unusual;
200 }
201 continue;
202 // optional string name = 2;
203 case 2:
204 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
205 auto str = _internal_mutable_name();
206 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
207 CHK_(ptr);
208 } else {
209 goto handle_unusual;
210 }
211 continue;
212 // optional int32 tgid = 3;
213 case 3:
214 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
215 _Internal::set_has_tgid(&has_bits);
216 _impl_.tgid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
217 CHK_(ptr);
218 } else {
219 goto handle_unusual;
220 }
221 continue;
222 // repeated int32 nstid = 4;
223 case 4:
224 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
225 ptr -= 1;
226 do {
227 ptr += 1;
228 _internal_add_nstid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
229 CHK_(ptr);
230 if (!ctx->DataAvailable(ptr)) break;
231 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
232 } else if (static_cast<::uint8_t>(tag) == 34) {
233 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_nstid(), ptr, ctx);
234 CHK_(ptr);
235 } else {
236 goto handle_unusual;
237 }
238 continue;
239 default:
240 goto handle_unusual;
241 } // switch
242 handle_unusual:
243 if ((tag == 0) || ((tag & 7) == 4)) {
244 CHK_(ptr);
245 ctx->SetLastTag(tag);
246 goto message_done;
247 }
248 ptr = UnknownFieldParse(
249 tag,
250 _internal_metadata_.mutable_unknown_fields<std::string>(),
251 ptr, ctx);
252 CHK_(ptr != nullptr);
253 } // while
254 message_done:
255 _impl_._has_bits_.Or(has_bits);
256 return ptr;
257 failure:
258 ptr = nullptr;
259 goto message_done;
260 #undef CHK_
261 }
262
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const263 ::uint8_t* ProcessTree_Thread::_InternalSerialize(
264 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
265 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProcessTree.Thread)
266 ::uint32_t cached_has_bits = 0;
267 (void) cached_has_bits;
268
269 cached_has_bits = _impl_._has_bits_[0];
270 // optional int32 tid = 1;
271 if (cached_has_bits & 0x00000002u) {
272 target = stream->EnsureSpace(target);
273 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_tid(), target);
274 }
275
276 // optional string name = 2;
277 if (cached_has_bits & 0x00000001u) {
278 target = stream->WriteStringMaybeAliased(
279 2, this->_internal_name(), target);
280 }
281
282 // optional int32 tgid = 3;
283 if (cached_has_bits & 0x00000004u) {
284 target = stream->EnsureSpace(target);
285 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_tgid(), target);
286 }
287
288 // repeated int32 nstid = 4;
289 for (int i = 0, n = this->_internal_nstid_size(); i < n; i++) {
290 target = stream->EnsureSpace(target);
291 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_nstid(i), target);
292 }
293
294 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
295 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
296 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
297 }
298 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProcessTree.Thread)
299 return target;
300 }
301
ByteSizeLong() const302 size_t ProcessTree_Thread::ByteSizeLong() const {
303 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProcessTree.Thread)
304 size_t total_size = 0;
305
306 ::uint32_t cached_has_bits = 0;
307 // Prevent compiler warnings about cached_has_bits being unused
308 (void) cached_has_bits;
309
310 // repeated int32 nstid = 4;
311 {
312 size_t data_size = ::_pbi::WireFormatLite::
313 Int32Size(this->_impl_.nstid_);
314 total_size += 1 *
315 ::_pbi::FromIntSize(this->_internal_nstid_size());
316 total_size += data_size;
317 }
318
319 cached_has_bits = _impl_._has_bits_[0];
320 if (cached_has_bits & 0x00000007u) {
321 // optional string name = 2;
322 if (cached_has_bits & 0x00000001u) {
323 total_size += 1 +
324 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
325 this->_internal_name());
326 }
327
328 // optional int32 tid = 1;
329 if (cached_has_bits & 0x00000002u) {
330 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_tid());
331 }
332
333 // optional int32 tgid = 3;
334 if (cached_has_bits & 0x00000004u) {
335 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_tgid());
336 }
337
338 }
339 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
340 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
341 }
342 int cached_size = ::_pbi::ToCachedSize(total_size);
343 SetCachedSize(cached_size);
344 return total_size;
345 }
346
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)347 void ProcessTree_Thread::CheckTypeAndMergeFrom(
348 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
349 MergeFrom(*::_pbi::DownCast<const ProcessTree_Thread*>(
350 &from));
351 }
352
MergeFrom(const ProcessTree_Thread & from)353 void ProcessTree_Thread::MergeFrom(const ProcessTree_Thread& from) {
354 ProcessTree_Thread* const _this = this;
355 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProcessTree.Thread)
356 GOOGLE_DCHECK_NE(&from, _this);
357 ::uint32_t cached_has_bits = 0;
358 (void) cached_has_bits;
359
360 _this->_impl_.nstid_.MergeFrom(from._impl_.nstid_);
361 cached_has_bits = from._impl_._has_bits_[0];
362 if (cached_has_bits & 0x00000007u) {
363 if (cached_has_bits & 0x00000001u) {
364 _this->_internal_set_name(from._internal_name());
365 }
366 if (cached_has_bits & 0x00000002u) {
367 _this->_impl_.tid_ = from._impl_.tid_;
368 }
369 if (cached_has_bits & 0x00000004u) {
370 _this->_impl_.tgid_ = from._impl_.tgid_;
371 }
372 _this->_impl_._has_bits_[0] |= cached_has_bits;
373 }
374 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
375 }
376
CopyFrom(const ProcessTree_Thread & from)377 void ProcessTree_Thread::CopyFrom(const ProcessTree_Thread& from) {
378 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProcessTree.Thread)
379 if (&from == this) return;
380 Clear();
381 MergeFrom(from);
382 }
383
IsInitialized() const384 bool ProcessTree_Thread::IsInitialized() const {
385 return true;
386 }
387
InternalSwap(ProcessTree_Thread * other)388 void ProcessTree_Thread::InternalSwap(ProcessTree_Thread* other) {
389 using std::swap;
390 auto* lhs_arena = GetArenaForAllocation();
391 auto* rhs_arena = other->GetArenaForAllocation();
392 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
393 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
394 _impl_.nstid_.InternalSwap(&other->_impl_.nstid_);
395 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
396 &_impl_.name_, lhs_arena,
397 &other->_impl_.name_, rhs_arena
398 );
399 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
400 PROTOBUF_FIELD_OFFSET(ProcessTree_Thread, _impl_.tgid_)
401 + sizeof(ProcessTree_Thread::_impl_.tgid_) // NOLINT
402 - PROTOBUF_FIELD_OFFSET(ProcessTree_Thread, _impl_.tid_)>(
403 reinterpret_cast<char*>(&_impl_.tid_),
404 reinterpret_cast<char*>(&other->_impl_.tid_));
405 }
406
GetTypeName() const407 std::string ProcessTree_Thread::GetTypeName() const {
408 return "perfetto.protos.ProcessTree.Thread";
409 }
410
411
412 // ===================================================================
413
414 class ProcessTree_Process::_Internal {
415 public:
416 using HasBits = decltype(std::declval<ProcessTree_Process>()._impl_._has_bits_);
set_has_pid(HasBits * has_bits)417 static void set_has_pid(HasBits* has_bits) {
418 (*has_bits)[0] |= 1u;
419 }
set_has_ppid(HasBits * has_bits)420 static void set_has_ppid(HasBits* has_bits) {
421 (*has_bits)[0] |= 2u;
422 }
set_has_uid(HasBits * has_bits)423 static void set_has_uid(HasBits* has_bits) {
424 (*has_bits)[0] |= 8u;
425 }
set_has_process_start_from_boot(HasBits * has_bits)426 static void set_has_process_start_from_boot(HasBits* has_bits) {
427 (*has_bits)[0] |= 4u;
428 }
429 };
430
ProcessTree_Process(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)431 ProcessTree_Process::ProcessTree_Process(::PROTOBUF_NAMESPACE_ID::Arena* arena,
432 bool is_message_owned)
433 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
434 SharedCtor(arena, is_message_owned);
435 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProcessTree.Process)
436 }
ProcessTree_Process(const ProcessTree_Process & from)437 ProcessTree_Process::ProcessTree_Process(const ProcessTree_Process& from)
438 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
439 ProcessTree_Process* const _this = this; (void)_this;
440 new (&_impl_) Impl_{
441 decltype(_impl_._has_bits_){from._impl_._has_bits_}
442 , /*decltype(_impl_._cached_size_)*/{}
443 , decltype(_impl_.cmdline_){from._impl_.cmdline_}
444 , decltype(_impl_.nspid_){from._impl_.nspid_}
445 , decltype(_impl_.pid_){}
446 , decltype(_impl_.ppid_){}
447 , decltype(_impl_.process_start_from_boot_){}
448 , decltype(_impl_.uid_){}};
449
450 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
451 ::memcpy(&_impl_.pid_, &from._impl_.pid_,
452 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.uid_) -
453 reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.uid_));
454 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProcessTree.Process)
455 }
456
SharedCtor(::_pb::Arena * arena,bool is_message_owned)457 inline void ProcessTree_Process::SharedCtor(
458 ::_pb::Arena* arena, bool is_message_owned) {
459 (void)arena;
460 (void)is_message_owned;
461 new (&_impl_) Impl_{
462 decltype(_impl_._has_bits_){}
463 , /*decltype(_impl_._cached_size_)*/{}
464 , decltype(_impl_.cmdline_){arena}
465 , decltype(_impl_.nspid_){arena}
466 , decltype(_impl_.pid_){0}
467 , decltype(_impl_.ppid_){0}
468 , decltype(_impl_.process_start_from_boot_){::uint64_t{0u}}
469 , decltype(_impl_.uid_){0}
470 };
471 }
472
~ProcessTree_Process()473 ProcessTree_Process::~ProcessTree_Process() {
474 // @@protoc_insertion_point(destructor:perfetto.protos.ProcessTree.Process)
475 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
476 (void)arena;
477 return;
478 }
479 SharedDtor();
480 }
481
SharedDtor()482 inline void ProcessTree_Process::SharedDtor() {
483 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
484 _impl_.cmdline_.~RepeatedPtrField();
485 _impl_.nspid_.~RepeatedField();
486 }
487
SetCachedSize(int size) const488 void ProcessTree_Process::SetCachedSize(int size) const {
489 _impl_._cached_size_.Set(size);
490 }
491
Clear()492 void ProcessTree_Process::Clear() {
493 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProcessTree.Process)
494 ::uint32_t cached_has_bits = 0;
495 // Prevent compiler warnings about cached_has_bits being unused
496 (void) cached_has_bits;
497
498 _impl_.cmdline_.Clear();
499 _impl_.nspid_.Clear();
500 cached_has_bits = _impl_._has_bits_[0];
501 if (cached_has_bits & 0x0000000fu) {
502 ::memset(&_impl_.pid_, 0, static_cast<size_t>(
503 reinterpret_cast<char*>(&_impl_.uid_) -
504 reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.uid_));
505 }
506 _impl_._has_bits_.Clear();
507 _internal_metadata_.Clear<std::string>();
508 }
509
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)510 const char* ProcessTree_Process::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
511 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
512 _Internal::HasBits has_bits{};
513 while (!ctx->Done(&ptr)) {
514 ::uint32_t tag;
515 ptr = ::_pbi::ReadTag(ptr, &tag);
516 switch (tag >> 3) {
517 // optional int32 pid = 1;
518 case 1:
519 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
520 _Internal::set_has_pid(&has_bits);
521 _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
522 CHK_(ptr);
523 } else {
524 goto handle_unusual;
525 }
526 continue;
527 // optional int32 ppid = 2;
528 case 2:
529 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
530 _Internal::set_has_ppid(&has_bits);
531 _impl_.ppid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
532 CHK_(ptr);
533 } else {
534 goto handle_unusual;
535 }
536 continue;
537 // repeated string cmdline = 3;
538 case 3:
539 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
540 ptr -= 1;
541 do {
542 ptr += 1;
543 auto str = _internal_add_cmdline();
544 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
545 CHK_(ptr);
546 if (!ctx->DataAvailable(ptr)) break;
547 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
548 } else {
549 goto handle_unusual;
550 }
551 continue;
552 // optional int32 uid = 5;
553 case 5:
554 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
555 _Internal::set_has_uid(&has_bits);
556 _impl_.uid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
557 CHK_(ptr);
558 } else {
559 goto handle_unusual;
560 }
561 continue;
562 // repeated int32 nspid = 6;
563 case 6:
564 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
565 ptr -= 1;
566 do {
567 ptr += 1;
568 _internal_add_nspid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
569 CHK_(ptr);
570 if (!ctx->DataAvailable(ptr)) break;
571 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<48>(ptr));
572 } else if (static_cast<::uint8_t>(tag) == 50) {
573 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_nspid(), ptr, ctx);
574 CHK_(ptr);
575 } else {
576 goto handle_unusual;
577 }
578 continue;
579 // optional uint64 process_start_from_boot = 7;
580 case 7:
581 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
582 _Internal::set_has_process_start_from_boot(&has_bits);
583 _impl_.process_start_from_boot_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
584 CHK_(ptr);
585 } else {
586 goto handle_unusual;
587 }
588 continue;
589 default:
590 goto handle_unusual;
591 } // switch
592 handle_unusual:
593 if ((tag == 0) || ((tag & 7) == 4)) {
594 CHK_(ptr);
595 ctx->SetLastTag(tag);
596 goto message_done;
597 }
598 ptr = UnknownFieldParse(
599 tag,
600 _internal_metadata_.mutable_unknown_fields<std::string>(),
601 ptr, ctx);
602 CHK_(ptr != nullptr);
603 } // while
604 message_done:
605 _impl_._has_bits_.Or(has_bits);
606 return ptr;
607 failure:
608 ptr = nullptr;
609 goto message_done;
610 #undef CHK_
611 }
612
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const613 ::uint8_t* ProcessTree_Process::_InternalSerialize(
614 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
615 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProcessTree.Process)
616 ::uint32_t cached_has_bits = 0;
617 (void) cached_has_bits;
618
619 cached_has_bits = _impl_._has_bits_[0];
620 // optional int32 pid = 1;
621 if (cached_has_bits & 0x00000001u) {
622 target = stream->EnsureSpace(target);
623 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_pid(), target);
624 }
625
626 // optional int32 ppid = 2;
627 if (cached_has_bits & 0x00000002u) {
628 target = stream->EnsureSpace(target);
629 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_ppid(), target);
630 }
631
632 // repeated string cmdline = 3;
633 for (int i = 0, n = this->_internal_cmdline_size(); i < n; i++) {
634 const auto& s = this->_internal_cmdline(i);
635 target = stream->WriteString(3, s, target);
636 }
637
638 // optional int32 uid = 5;
639 if (cached_has_bits & 0x00000008u) {
640 target = stream->EnsureSpace(target);
641 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_uid(), target);
642 }
643
644 // repeated int32 nspid = 6;
645 for (int i = 0, n = this->_internal_nspid_size(); i < n; i++) {
646 target = stream->EnsureSpace(target);
647 target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_nspid(i), target);
648 }
649
650 // optional uint64 process_start_from_boot = 7;
651 if (cached_has_bits & 0x00000004u) {
652 target = stream->EnsureSpace(target);
653 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_process_start_from_boot(), target);
654 }
655
656 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
657 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
658 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
659 }
660 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProcessTree.Process)
661 return target;
662 }
663
ByteSizeLong() const664 size_t ProcessTree_Process::ByteSizeLong() const {
665 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProcessTree.Process)
666 size_t total_size = 0;
667
668 ::uint32_t cached_has_bits = 0;
669 // Prevent compiler warnings about cached_has_bits being unused
670 (void) cached_has_bits;
671
672 // repeated string cmdline = 3;
673 total_size += 1 *
674 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.cmdline_.size());
675 for (int i = 0, n = _impl_.cmdline_.size(); i < n; i++) {
676 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
677 _impl_.cmdline_.Get(i));
678 }
679
680 // repeated int32 nspid = 6;
681 {
682 size_t data_size = ::_pbi::WireFormatLite::
683 Int32Size(this->_impl_.nspid_);
684 total_size += 1 *
685 ::_pbi::FromIntSize(this->_internal_nspid_size());
686 total_size += data_size;
687 }
688
689 cached_has_bits = _impl_._has_bits_[0];
690 if (cached_has_bits & 0x0000000fu) {
691 // optional int32 pid = 1;
692 if (cached_has_bits & 0x00000001u) {
693 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
694 }
695
696 // optional int32 ppid = 2;
697 if (cached_has_bits & 0x00000002u) {
698 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_ppid());
699 }
700
701 // optional uint64 process_start_from_boot = 7;
702 if (cached_has_bits & 0x00000004u) {
703 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_process_start_from_boot());
704 }
705
706 // optional int32 uid = 5;
707 if (cached_has_bits & 0x00000008u) {
708 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_uid());
709 }
710
711 }
712 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
713 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
714 }
715 int cached_size = ::_pbi::ToCachedSize(total_size);
716 SetCachedSize(cached_size);
717 return total_size;
718 }
719
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)720 void ProcessTree_Process::CheckTypeAndMergeFrom(
721 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
722 MergeFrom(*::_pbi::DownCast<const ProcessTree_Process*>(
723 &from));
724 }
725
MergeFrom(const ProcessTree_Process & from)726 void ProcessTree_Process::MergeFrom(const ProcessTree_Process& from) {
727 ProcessTree_Process* const _this = this;
728 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProcessTree.Process)
729 GOOGLE_DCHECK_NE(&from, _this);
730 ::uint32_t cached_has_bits = 0;
731 (void) cached_has_bits;
732
733 _this->_impl_.cmdline_.MergeFrom(from._impl_.cmdline_);
734 _this->_impl_.nspid_.MergeFrom(from._impl_.nspid_);
735 cached_has_bits = from._impl_._has_bits_[0];
736 if (cached_has_bits & 0x0000000fu) {
737 if (cached_has_bits & 0x00000001u) {
738 _this->_impl_.pid_ = from._impl_.pid_;
739 }
740 if (cached_has_bits & 0x00000002u) {
741 _this->_impl_.ppid_ = from._impl_.ppid_;
742 }
743 if (cached_has_bits & 0x00000004u) {
744 _this->_impl_.process_start_from_boot_ = from._impl_.process_start_from_boot_;
745 }
746 if (cached_has_bits & 0x00000008u) {
747 _this->_impl_.uid_ = from._impl_.uid_;
748 }
749 _this->_impl_._has_bits_[0] |= cached_has_bits;
750 }
751 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
752 }
753
CopyFrom(const ProcessTree_Process & from)754 void ProcessTree_Process::CopyFrom(const ProcessTree_Process& from) {
755 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProcessTree.Process)
756 if (&from == this) return;
757 Clear();
758 MergeFrom(from);
759 }
760
IsInitialized() const761 bool ProcessTree_Process::IsInitialized() const {
762 return true;
763 }
764
InternalSwap(ProcessTree_Process * other)765 void ProcessTree_Process::InternalSwap(ProcessTree_Process* other) {
766 using std::swap;
767 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
768 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
769 _impl_.cmdline_.InternalSwap(&other->_impl_.cmdline_);
770 _impl_.nspid_.InternalSwap(&other->_impl_.nspid_);
771 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
772 PROTOBUF_FIELD_OFFSET(ProcessTree_Process, _impl_.uid_)
773 + sizeof(ProcessTree_Process::_impl_.uid_) // NOLINT
774 - PROTOBUF_FIELD_OFFSET(ProcessTree_Process, _impl_.pid_)>(
775 reinterpret_cast<char*>(&_impl_.pid_),
776 reinterpret_cast<char*>(&other->_impl_.pid_));
777 }
778
GetTypeName() const779 std::string ProcessTree_Process::GetTypeName() const {
780 return "perfetto.protos.ProcessTree.Process";
781 }
782
783
784 // ===================================================================
785
786 class ProcessTree::_Internal {
787 public:
788 using HasBits = decltype(std::declval<ProcessTree>()._impl_._has_bits_);
set_has_collection_end_timestamp(HasBits * has_bits)789 static void set_has_collection_end_timestamp(HasBits* has_bits) {
790 (*has_bits)[0] |= 1u;
791 }
792 };
793
ProcessTree(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)794 ProcessTree::ProcessTree(::PROTOBUF_NAMESPACE_ID::Arena* arena,
795 bool is_message_owned)
796 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
797 SharedCtor(arena, is_message_owned);
798 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProcessTree)
799 }
ProcessTree(const ProcessTree & from)800 ProcessTree::ProcessTree(const ProcessTree& from)
801 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
802 ProcessTree* const _this = this; (void)_this;
803 new (&_impl_) Impl_{
804 decltype(_impl_._has_bits_){from._impl_._has_bits_}
805 , /*decltype(_impl_._cached_size_)*/{}
806 , decltype(_impl_.processes_){from._impl_.processes_}
807 , decltype(_impl_.threads_){from._impl_.threads_}
808 , decltype(_impl_.collection_end_timestamp_){}};
809
810 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
811 _this->_impl_.collection_end_timestamp_ = from._impl_.collection_end_timestamp_;
812 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProcessTree)
813 }
814
SharedCtor(::_pb::Arena * arena,bool is_message_owned)815 inline void ProcessTree::SharedCtor(
816 ::_pb::Arena* arena, bool is_message_owned) {
817 (void)arena;
818 (void)is_message_owned;
819 new (&_impl_) Impl_{
820 decltype(_impl_._has_bits_){}
821 , /*decltype(_impl_._cached_size_)*/{}
822 , decltype(_impl_.processes_){arena}
823 , decltype(_impl_.threads_){arena}
824 , decltype(_impl_.collection_end_timestamp_){::uint64_t{0u}}
825 };
826 }
827
~ProcessTree()828 ProcessTree::~ProcessTree() {
829 // @@protoc_insertion_point(destructor:perfetto.protos.ProcessTree)
830 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
831 (void)arena;
832 return;
833 }
834 SharedDtor();
835 }
836
SharedDtor()837 inline void ProcessTree::SharedDtor() {
838 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
839 _impl_.processes_.~RepeatedPtrField();
840 _impl_.threads_.~RepeatedPtrField();
841 }
842
SetCachedSize(int size) const843 void ProcessTree::SetCachedSize(int size) const {
844 _impl_._cached_size_.Set(size);
845 }
846
Clear()847 void ProcessTree::Clear() {
848 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProcessTree)
849 ::uint32_t cached_has_bits = 0;
850 // Prevent compiler warnings about cached_has_bits being unused
851 (void) cached_has_bits;
852
853 _impl_.processes_.Clear();
854 _impl_.threads_.Clear();
855 _impl_.collection_end_timestamp_ = ::uint64_t{0u};
856 _impl_._has_bits_.Clear();
857 _internal_metadata_.Clear<std::string>();
858 }
859
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)860 const char* ProcessTree::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
861 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
862 _Internal::HasBits has_bits{};
863 while (!ctx->Done(&ptr)) {
864 ::uint32_t tag;
865 ptr = ::_pbi::ReadTag(ptr, &tag);
866 switch (tag >> 3) {
867 // repeated .perfetto.protos.ProcessTree.Process processes = 1;
868 case 1:
869 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
870 ptr -= 1;
871 do {
872 ptr += 1;
873 ptr = ctx->ParseMessage(_internal_add_processes(), ptr);
874 CHK_(ptr);
875 if (!ctx->DataAvailable(ptr)) break;
876 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
877 } else {
878 goto handle_unusual;
879 }
880 continue;
881 // repeated .perfetto.protos.ProcessTree.Thread threads = 2;
882 case 2:
883 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
884 ptr -= 1;
885 do {
886 ptr += 1;
887 ptr = ctx->ParseMessage(_internal_add_threads(), ptr);
888 CHK_(ptr);
889 if (!ctx->DataAvailable(ptr)) break;
890 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
891 } else {
892 goto handle_unusual;
893 }
894 continue;
895 // optional uint64 collection_end_timestamp = 3;
896 case 3:
897 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
898 _Internal::set_has_collection_end_timestamp(&has_bits);
899 _impl_.collection_end_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
900 CHK_(ptr);
901 } else {
902 goto handle_unusual;
903 }
904 continue;
905 default:
906 goto handle_unusual;
907 } // switch
908 handle_unusual:
909 if ((tag == 0) || ((tag & 7) == 4)) {
910 CHK_(ptr);
911 ctx->SetLastTag(tag);
912 goto message_done;
913 }
914 ptr = UnknownFieldParse(
915 tag,
916 _internal_metadata_.mutable_unknown_fields<std::string>(),
917 ptr, ctx);
918 CHK_(ptr != nullptr);
919 } // while
920 message_done:
921 _impl_._has_bits_.Or(has_bits);
922 return ptr;
923 failure:
924 ptr = nullptr;
925 goto message_done;
926 #undef CHK_
927 }
928
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const929 ::uint8_t* ProcessTree::_InternalSerialize(
930 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
931 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProcessTree)
932 ::uint32_t cached_has_bits = 0;
933 (void) cached_has_bits;
934
935 // repeated .perfetto.protos.ProcessTree.Process processes = 1;
936 for (unsigned i = 0,
937 n = static_cast<unsigned>(this->_internal_processes_size()); i < n; i++) {
938 const auto& repfield = this->_internal_processes(i);
939 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
940 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
941 }
942
943 // repeated .perfetto.protos.ProcessTree.Thread threads = 2;
944 for (unsigned i = 0,
945 n = static_cast<unsigned>(this->_internal_threads_size()); i < n; i++) {
946 const auto& repfield = this->_internal_threads(i);
947 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
948 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
949 }
950
951 cached_has_bits = _impl_._has_bits_[0];
952 // optional uint64 collection_end_timestamp = 3;
953 if (cached_has_bits & 0x00000001u) {
954 target = stream->EnsureSpace(target);
955 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_collection_end_timestamp(), target);
956 }
957
958 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
959 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
960 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
961 }
962 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProcessTree)
963 return target;
964 }
965
ByteSizeLong() const966 size_t ProcessTree::ByteSizeLong() const {
967 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProcessTree)
968 size_t total_size = 0;
969
970 ::uint32_t cached_has_bits = 0;
971 // Prevent compiler warnings about cached_has_bits being unused
972 (void) cached_has_bits;
973
974 // repeated .perfetto.protos.ProcessTree.Process processes = 1;
975 total_size += 1UL * this->_internal_processes_size();
976 for (const auto& msg : this->_impl_.processes_) {
977 total_size +=
978 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
979 }
980
981 // repeated .perfetto.protos.ProcessTree.Thread threads = 2;
982 total_size += 1UL * this->_internal_threads_size();
983 for (const auto& msg : this->_impl_.threads_) {
984 total_size +=
985 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
986 }
987
988 // optional uint64 collection_end_timestamp = 3;
989 cached_has_bits = _impl_._has_bits_[0];
990 if (cached_has_bits & 0x00000001u) {
991 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_collection_end_timestamp());
992 }
993
994 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
995 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
996 }
997 int cached_size = ::_pbi::ToCachedSize(total_size);
998 SetCachedSize(cached_size);
999 return total_size;
1000 }
1001
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1002 void ProcessTree::CheckTypeAndMergeFrom(
1003 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1004 MergeFrom(*::_pbi::DownCast<const ProcessTree*>(
1005 &from));
1006 }
1007
MergeFrom(const ProcessTree & from)1008 void ProcessTree::MergeFrom(const ProcessTree& from) {
1009 ProcessTree* const _this = this;
1010 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProcessTree)
1011 GOOGLE_DCHECK_NE(&from, _this);
1012 ::uint32_t cached_has_bits = 0;
1013 (void) cached_has_bits;
1014
1015 _this->_impl_.processes_.MergeFrom(from._impl_.processes_);
1016 _this->_impl_.threads_.MergeFrom(from._impl_.threads_);
1017 if (from._internal_has_collection_end_timestamp()) {
1018 _this->_internal_set_collection_end_timestamp(from._internal_collection_end_timestamp());
1019 }
1020 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1021 }
1022
CopyFrom(const ProcessTree & from)1023 void ProcessTree::CopyFrom(const ProcessTree& from) {
1024 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProcessTree)
1025 if (&from == this) return;
1026 Clear();
1027 MergeFrom(from);
1028 }
1029
IsInitialized() const1030 bool ProcessTree::IsInitialized() const {
1031 return true;
1032 }
1033
InternalSwap(ProcessTree * other)1034 void ProcessTree::InternalSwap(ProcessTree* other) {
1035 using std::swap;
1036 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1037 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1038 _impl_.processes_.InternalSwap(&other->_impl_.processes_);
1039 _impl_.threads_.InternalSwap(&other->_impl_.threads_);
1040 swap(_impl_.collection_end_timestamp_, other->_impl_.collection_end_timestamp_);
1041 }
1042
GetTypeName() const1043 std::string ProcessTree::GetTypeName() const {
1044 return "perfetto.protos.ProcessTree";
1045 }
1046
1047
1048 // @@protoc_insertion_point(namespace_scope)
1049 } // namespace protos
1050 } // namespace perfetto
1051 PROTOBUF_NAMESPACE_OPEN
1052 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProcessTree_Thread*
CreateMaybeMessage(Arena * arena)1053 Arena::CreateMaybeMessage< ::perfetto::protos::ProcessTree_Thread >(Arena* arena) {
1054 return Arena::CreateMessageInternal< ::perfetto::protos::ProcessTree_Thread >(arena);
1055 }
1056 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProcessTree_Process*
CreateMaybeMessage(Arena * arena)1057 Arena::CreateMaybeMessage< ::perfetto::protos::ProcessTree_Process >(Arena* arena) {
1058 return Arena::CreateMessageInternal< ::perfetto::protos::ProcessTree_Process >(arena);
1059 }
1060 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProcessTree*
CreateMaybeMessage(Arena * arena)1061 Arena::CreateMaybeMessage< ::perfetto::protos::ProcessTree >(Arena* arena) {
1062 return Arena::CreateMessageInternal< ::perfetto::protos::ProcessTree >(arena);
1063 }
1064 PROTOBUF_NAMESPACE_CLOSE
1065
1066 // @@protoc_insertion_point(global_scope)
1067 #include <google/protobuf/port_undef.inc>
1068