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