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