1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/profiling/profile_packet.proto
3 
4 #include "protos/perfetto/trace/profiling/profile_packet.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace perfetto {
22 namespace protos {
ProfilePacket_HeapSample(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR ProfilePacket_HeapSample::ProfilePacket_HeapSample(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.callstack_id_)*/::uint64_t{0u}
28   , /*decltype(_impl_.self_allocated_)*/::uint64_t{0u}
29   , /*decltype(_impl_.self_freed_)*/::uint64_t{0u}
30   , /*decltype(_impl_.timestamp_)*/::uint64_t{0u}
31   , /*decltype(_impl_.alloc_count_)*/::uint64_t{0u}
32   , /*decltype(_impl_.free_count_)*/::uint64_t{0u}
33   , /*decltype(_impl_.self_max_)*/::uint64_t{0u}
34   , /*decltype(_impl_.self_max_count_)*/::uint64_t{0u}} {}
35 struct ProfilePacket_HeapSampleDefaultTypeInternal {
ProfilePacket_HeapSampleDefaultTypeInternalperfetto::protos::ProfilePacket_HeapSampleDefaultTypeInternal36   PROTOBUF_CONSTEXPR ProfilePacket_HeapSampleDefaultTypeInternal()
37       : _instance(::_pbi::ConstantInitialized{}) {}
~ProfilePacket_HeapSampleDefaultTypeInternalperfetto::protos::ProfilePacket_HeapSampleDefaultTypeInternal38   ~ProfilePacket_HeapSampleDefaultTypeInternal() {}
39   union {  // NOLINT(misc-non-private-member-variables-in-classes)
40     ProfilePacket_HeapSample _instance;
41   };
42 };
43 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProfilePacket_HeapSampleDefaultTypeInternal _ProfilePacket_HeapSample_default_instance_;
ProfilePacket_Histogram_Bucket(::_pbi::ConstantInitialized)44 PROTOBUF_CONSTEXPR ProfilePacket_Histogram_Bucket::ProfilePacket_Histogram_Bucket(
45     ::_pbi::ConstantInitialized): _impl_{
46     /*decltype(_impl_._has_bits_)*/{}
47   , /*decltype(_impl_._cached_size_)*/{}
48   , /*decltype(_impl_.upper_limit_)*/::uint64_t{0u}
49   , /*decltype(_impl_.count_)*/::uint64_t{0u}
50   , /*decltype(_impl_.max_bucket_)*/false} {}
51 struct ProfilePacket_Histogram_BucketDefaultTypeInternal {
ProfilePacket_Histogram_BucketDefaultTypeInternalperfetto::protos::ProfilePacket_Histogram_BucketDefaultTypeInternal52   PROTOBUF_CONSTEXPR ProfilePacket_Histogram_BucketDefaultTypeInternal()
53       : _instance(::_pbi::ConstantInitialized{}) {}
~ProfilePacket_Histogram_BucketDefaultTypeInternalperfetto::protos::ProfilePacket_Histogram_BucketDefaultTypeInternal54   ~ProfilePacket_Histogram_BucketDefaultTypeInternal() {}
55   union {  // NOLINT(misc-non-private-member-variables-in-classes)
56     ProfilePacket_Histogram_Bucket _instance;
57   };
58 };
59 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProfilePacket_Histogram_BucketDefaultTypeInternal _ProfilePacket_Histogram_Bucket_default_instance_;
ProfilePacket_Histogram(::_pbi::ConstantInitialized)60 PROTOBUF_CONSTEXPR ProfilePacket_Histogram::ProfilePacket_Histogram(
61     ::_pbi::ConstantInitialized): _impl_{
62     /*decltype(_impl_.buckets_)*/{}
63   , /*decltype(_impl_._cached_size_)*/{}} {}
64 struct ProfilePacket_HistogramDefaultTypeInternal {
ProfilePacket_HistogramDefaultTypeInternalperfetto::protos::ProfilePacket_HistogramDefaultTypeInternal65   PROTOBUF_CONSTEXPR ProfilePacket_HistogramDefaultTypeInternal()
66       : _instance(::_pbi::ConstantInitialized{}) {}
~ProfilePacket_HistogramDefaultTypeInternalperfetto::protos::ProfilePacket_HistogramDefaultTypeInternal67   ~ProfilePacket_HistogramDefaultTypeInternal() {}
68   union {  // NOLINT(misc-non-private-member-variables-in-classes)
69     ProfilePacket_Histogram _instance;
70   };
71 };
72 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProfilePacket_HistogramDefaultTypeInternal _ProfilePacket_Histogram_default_instance_;
ProfilePacket_ProcessStats(::_pbi::ConstantInitialized)73 PROTOBUF_CONSTEXPR ProfilePacket_ProcessStats::ProfilePacket_ProcessStats(
74     ::_pbi::ConstantInitialized): _impl_{
75     /*decltype(_impl_._has_bits_)*/{}
76   , /*decltype(_impl_._cached_size_)*/{}
77   , /*decltype(_impl_.unwinding_time_us_)*/nullptr
78   , /*decltype(_impl_.unwinding_errors_)*/::uint64_t{0u}
79   , /*decltype(_impl_.heap_samples_)*/::uint64_t{0u}
80   , /*decltype(_impl_.map_reparses_)*/::uint64_t{0u}
81   , /*decltype(_impl_.total_unwinding_time_us_)*/::uint64_t{0u}
82   , /*decltype(_impl_.client_spinlock_blocked_us_)*/::uint64_t{0u}} {}
83 struct ProfilePacket_ProcessStatsDefaultTypeInternal {
ProfilePacket_ProcessStatsDefaultTypeInternalperfetto::protos::ProfilePacket_ProcessStatsDefaultTypeInternal84   PROTOBUF_CONSTEXPR ProfilePacket_ProcessStatsDefaultTypeInternal()
85       : _instance(::_pbi::ConstantInitialized{}) {}
~ProfilePacket_ProcessStatsDefaultTypeInternalperfetto::protos::ProfilePacket_ProcessStatsDefaultTypeInternal86   ~ProfilePacket_ProcessStatsDefaultTypeInternal() {}
87   union {  // NOLINT(misc-non-private-member-variables-in-classes)
88     ProfilePacket_ProcessStats _instance;
89   };
90 };
91 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProfilePacket_ProcessStatsDefaultTypeInternal _ProfilePacket_ProcessStats_default_instance_;
ProfilePacket_ProcessHeapSamples(::_pbi::ConstantInitialized)92 PROTOBUF_CONSTEXPR ProfilePacket_ProcessHeapSamples::ProfilePacket_ProcessHeapSamples(
93     ::_pbi::ConstantInitialized): _impl_{
94     /*decltype(_impl_._has_bits_)*/{}
95   , /*decltype(_impl_._cached_size_)*/{}
96   , /*decltype(_impl_.samples_)*/{}
97   , /*decltype(_impl_.heap_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
98   , /*decltype(_impl_.stats_)*/nullptr
99   , /*decltype(_impl_.pid_)*/::uint64_t{0u}
100   , /*decltype(_impl_.from_startup_)*/false
101   , /*decltype(_impl_.rejected_concurrent_)*/false
102   , /*decltype(_impl_.disconnected_)*/false
103   , /*decltype(_impl_.buffer_overran_)*/false
104   , /*decltype(_impl_.buffer_corrupted_)*/false
105   , /*decltype(_impl_.hit_guardrail_)*/false
106   , /*decltype(_impl_.timestamp_)*/::uint64_t{0u}
107   , /*decltype(_impl_.sampling_interval_bytes_)*/::uint64_t{0u}
108   , /*decltype(_impl_.orig_sampling_interval_bytes_)*/::uint64_t{0u}
109   , /*decltype(_impl_.client_error_)*/0} {}
110 struct ProfilePacket_ProcessHeapSamplesDefaultTypeInternal {
ProfilePacket_ProcessHeapSamplesDefaultTypeInternalperfetto::protos::ProfilePacket_ProcessHeapSamplesDefaultTypeInternal111   PROTOBUF_CONSTEXPR ProfilePacket_ProcessHeapSamplesDefaultTypeInternal()
112       : _instance(::_pbi::ConstantInitialized{}) {}
~ProfilePacket_ProcessHeapSamplesDefaultTypeInternalperfetto::protos::ProfilePacket_ProcessHeapSamplesDefaultTypeInternal113   ~ProfilePacket_ProcessHeapSamplesDefaultTypeInternal() {}
114   union {  // NOLINT(misc-non-private-member-variables-in-classes)
115     ProfilePacket_ProcessHeapSamples _instance;
116   };
117 };
118 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProfilePacket_ProcessHeapSamplesDefaultTypeInternal _ProfilePacket_ProcessHeapSamples_default_instance_;
ProfilePacket(::_pbi::ConstantInitialized)119 PROTOBUF_CONSTEXPR ProfilePacket::ProfilePacket(
120     ::_pbi::ConstantInitialized): _impl_{
121     /*decltype(_impl_._has_bits_)*/{}
122   , /*decltype(_impl_._cached_size_)*/{}
123   , /*decltype(_impl_.strings_)*/{}
124   , /*decltype(_impl_.frames_)*/{}
125   , /*decltype(_impl_.callstacks_)*/{}
126   , /*decltype(_impl_.mappings_)*/{}
127   , /*decltype(_impl_.process_dumps_)*/{}
128   , /*decltype(_impl_.index_)*/::uint64_t{0u}
129   , /*decltype(_impl_.continued_)*/false} {}
130 struct ProfilePacketDefaultTypeInternal {
ProfilePacketDefaultTypeInternalperfetto::protos::ProfilePacketDefaultTypeInternal131   PROTOBUF_CONSTEXPR ProfilePacketDefaultTypeInternal()
132       : _instance(::_pbi::ConstantInitialized{}) {}
~ProfilePacketDefaultTypeInternalperfetto::protos::ProfilePacketDefaultTypeInternal133   ~ProfilePacketDefaultTypeInternal() {}
134   union {  // NOLINT(misc-non-private-member-variables-in-classes)
135     ProfilePacket _instance;
136   };
137 };
138 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProfilePacketDefaultTypeInternal _ProfilePacket_default_instance_;
StreamingAllocation(::_pbi::ConstantInitialized)139 PROTOBUF_CONSTEXPR StreamingAllocation::StreamingAllocation(
140     ::_pbi::ConstantInitialized): _impl_{
141     /*decltype(_impl_.address_)*/{}
142   , /*decltype(_impl_.size_)*/{}
143   , /*decltype(_impl_.sample_size_)*/{}
144   , /*decltype(_impl_.clock_monotonic_coarse_timestamp_)*/{}
145   , /*decltype(_impl_.heap_id_)*/{}
146   , /*decltype(_impl_.sequence_number_)*/{}
147   , /*decltype(_impl_._cached_size_)*/{}} {}
148 struct StreamingAllocationDefaultTypeInternal {
StreamingAllocationDefaultTypeInternalperfetto::protos::StreamingAllocationDefaultTypeInternal149   PROTOBUF_CONSTEXPR StreamingAllocationDefaultTypeInternal()
150       : _instance(::_pbi::ConstantInitialized{}) {}
~StreamingAllocationDefaultTypeInternalperfetto::protos::StreamingAllocationDefaultTypeInternal151   ~StreamingAllocationDefaultTypeInternal() {}
152   union {  // NOLINT(misc-non-private-member-variables-in-classes)
153     StreamingAllocation _instance;
154   };
155 };
156 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StreamingAllocationDefaultTypeInternal _StreamingAllocation_default_instance_;
StreamingFree(::_pbi::ConstantInitialized)157 PROTOBUF_CONSTEXPR StreamingFree::StreamingFree(
158     ::_pbi::ConstantInitialized): _impl_{
159     /*decltype(_impl_.address_)*/{}
160   , /*decltype(_impl_.heap_id_)*/{}
161   , /*decltype(_impl_.sequence_number_)*/{}
162   , /*decltype(_impl_._cached_size_)*/{}} {}
163 struct StreamingFreeDefaultTypeInternal {
StreamingFreeDefaultTypeInternalperfetto::protos::StreamingFreeDefaultTypeInternal164   PROTOBUF_CONSTEXPR StreamingFreeDefaultTypeInternal()
165       : _instance(::_pbi::ConstantInitialized{}) {}
~StreamingFreeDefaultTypeInternalperfetto::protos::StreamingFreeDefaultTypeInternal166   ~StreamingFreeDefaultTypeInternal() {}
167   union {  // NOLINT(misc-non-private-member-variables-in-classes)
168     StreamingFree _instance;
169   };
170 };
171 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StreamingFreeDefaultTypeInternal _StreamingFree_default_instance_;
StreamingProfilePacket(::_pbi::ConstantInitialized)172 PROTOBUF_CONSTEXPR StreamingProfilePacket::StreamingProfilePacket(
173     ::_pbi::ConstantInitialized): _impl_{
174     /*decltype(_impl_._has_bits_)*/{}
175   , /*decltype(_impl_._cached_size_)*/{}
176   , /*decltype(_impl_.callstack_iid_)*/{}
177   , /*decltype(_impl_.timestamp_delta_us_)*/{}
178   , /*decltype(_impl_.process_priority_)*/0} {}
179 struct StreamingProfilePacketDefaultTypeInternal {
StreamingProfilePacketDefaultTypeInternalperfetto::protos::StreamingProfilePacketDefaultTypeInternal180   PROTOBUF_CONSTEXPR StreamingProfilePacketDefaultTypeInternal()
181       : _instance(::_pbi::ConstantInitialized{}) {}
~StreamingProfilePacketDefaultTypeInternalperfetto::protos::StreamingProfilePacketDefaultTypeInternal182   ~StreamingProfilePacketDefaultTypeInternal() {}
183   union {  // NOLINT(misc-non-private-member-variables-in-classes)
184     StreamingProfilePacket _instance;
185   };
186 };
187 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StreamingProfilePacketDefaultTypeInternal _StreamingProfilePacket_default_instance_;
Profiling(::_pbi::ConstantInitialized)188 PROTOBUF_CONSTEXPR Profiling::Profiling(
189     ::_pbi::ConstantInitialized): _impl_{
190     /*decltype(_impl_._cached_size_)*/{}} {}
191 struct ProfilingDefaultTypeInternal {
ProfilingDefaultTypeInternalperfetto::protos::ProfilingDefaultTypeInternal192   PROTOBUF_CONSTEXPR ProfilingDefaultTypeInternal()
193       : _instance(::_pbi::ConstantInitialized{}) {}
~ProfilingDefaultTypeInternalperfetto::protos::ProfilingDefaultTypeInternal194   ~ProfilingDefaultTypeInternal() {}
195   union {  // NOLINT(misc-non-private-member-variables-in-classes)
196     Profiling _instance;
197   };
198 };
199 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProfilingDefaultTypeInternal _Profiling_default_instance_;
PerfSample_ProducerEvent(::_pbi::ConstantInitialized)200 PROTOBUF_CONSTEXPR PerfSample_ProducerEvent::PerfSample_ProducerEvent(
201     ::_pbi::ConstantInitialized): _impl_{
202     /*decltype(_impl_.optional_source_stop_reason_)*/{}
203   , /*decltype(_impl_._cached_size_)*/{}
204   , /*decltype(_impl_._oneof_case_)*/{}} {}
205 struct PerfSample_ProducerEventDefaultTypeInternal {
PerfSample_ProducerEventDefaultTypeInternalperfetto::protos::PerfSample_ProducerEventDefaultTypeInternal206   PROTOBUF_CONSTEXPR PerfSample_ProducerEventDefaultTypeInternal()
207       : _instance(::_pbi::ConstantInitialized{}) {}
~PerfSample_ProducerEventDefaultTypeInternalperfetto::protos::PerfSample_ProducerEventDefaultTypeInternal208   ~PerfSample_ProducerEventDefaultTypeInternal() {}
209   union {  // NOLINT(misc-non-private-member-variables-in-classes)
210     PerfSample_ProducerEvent _instance;
211   };
212 };
213 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PerfSample_ProducerEventDefaultTypeInternal _PerfSample_ProducerEvent_default_instance_;
PerfSample(::_pbi::ConstantInitialized)214 PROTOBUF_CONSTEXPR PerfSample::PerfSample(
215     ::_pbi::ConstantInitialized): _impl_{
216     /*decltype(_impl_._has_bits_)*/{}
217   , /*decltype(_impl_._cached_size_)*/{}
218   , /*decltype(_impl_.follower_counts_)*/{}
219   , /*decltype(_impl_.producer_event_)*/nullptr
220   , /*decltype(_impl_.cpu_)*/0u
221   , /*decltype(_impl_.pid_)*/0u
222   , /*decltype(_impl_.callstack_iid_)*/::uint64_t{0u}
223   , /*decltype(_impl_.tid_)*/0u
224   , /*decltype(_impl_.cpu_mode_)*/0
225   , /*decltype(_impl_.timebase_count_)*/::uint64_t{0u}
226   , /*decltype(_impl_.kernel_records_lost_)*/::uint64_t{0u}
227   , /*decltype(_impl_.optional_unwind_error_)*/{}
228   , /*decltype(_impl_.optional_sample_skipped_reason_)*/{}
229   , /*decltype(_impl_._oneof_case_)*/{}} {}
230 struct PerfSampleDefaultTypeInternal {
PerfSampleDefaultTypeInternalperfetto::protos::PerfSampleDefaultTypeInternal231   PROTOBUF_CONSTEXPR PerfSampleDefaultTypeInternal()
232       : _instance(::_pbi::ConstantInitialized{}) {}
~PerfSampleDefaultTypeInternalperfetto::protos::PerfSampleDefaultTypeInternal233   ~PerfSampleDefaultTypeInternal() {}
234   union {  // NOLINT(misc-non-private-member-variables-in-classes)
235     PerfSample _instance;
236   };
237 };
238 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PerfSampleDefaultTypeInternal _PerfSample_default_instance_;
PerfSampleDefaults(::_pbi::ConstantInitialized)239 PROTOBUF_CONSTEXPR PerfSampleDefaults::PerfSampleDefaults(
240     ::_pbi::ConstantInitialized): _impl_{
241     /*decltype(_impl_._has_bits_)*/{}
242   , /*decltype(_impl_._cached_size_)*/{}
243   , /*decltype(_impl_.followers_)*/{}
244   , /*decltype(_impl_.timebase_)*/nullptr
245   , /*decltype(_impl_.process_shard_count_)*/0u
246   , /*decltype(_impl_.chosen_process_shard_)*/0u} {}
247 struct PerfSampleDefaultsDefaultTypeInternal {
PerfSampleDefaultsDefaultTypeInternalperfetto::protos::PerfSampleDefaultsDefaultTypeInternal248   PROTOBUF_CONSTEXPR PerfSampleDefaultsDefaultTypeInternal()
249       : _instance(::_pbi::ConstantInitialized{}) {}
~PerfSampleDefaultsDefaultTypeInternalperfetto::protos::PerfSampleDefaultsDefaultTypeInternal250   ~PerfSampleDefaultsDefaultTypeInternal() {}
251   union {  // NOLINT(misc-non-private-member-variables-in-classes)
252     PerfSampleDefaults _instance;
253   };
254 };
255 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PerfSampleDefaultsDefaultTypeInternal _PerfSampleDefaults_default_instance_;
256 }  // namespace protos
257 }  // namespace perfetto
258 namespace perfetto {
259 namespace protos {
ProfilePacket_ProcessHeapSamples_ClientError_IsValid(int value)260 bool ProfilePacket_ProcessHeapSamples_ClientError_IsValid(int value) {
261   switch (value) {
262     case 0:
263     case 1:
264     case 2:
265       return true;
266     default:
267       return false;
268   }
269 }
270 
271 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ProfilePacket_ProcessHeapSamples_ClientError_strings[3] = {};
272 
273 static const char ProfilePacket_ProcessHeapSamples_ClientError_names[] =
274   "CLIENT_ERROR_HIT_TIMEOUT"
275   "CLIENT_ERROR_INVALID_STACK_BOUNDS"
276   "CLIENT_ERROR_NONE";
277 
278 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ProfilePacket_ProcessHeapSamples_ClientError_entries[] = {
279   { {ProfilePacket_ProcessHeapSamples_ClientError_names + 0, 24}, 1 },
280   { {ProfilePacket_ProcessHeapSamples_ClientError_names + 24, 33}, 2 },
281   { {ProfilePacket_ProcessHeapSamples_ClientError_names + 57, 17}, 0 },
282 };
283 
284 static const int ProfilePacket_ProcessHeapSamples_ClientError_entries_by_number[] = {
285   2, // 0 -> CLIENT_ERROR_NONE
286   0, // 1 -> CLIENT_ERROR_HIT_TIMEOUT
287   1, // 2 -> CLIENT_ERROR_INVALID_STACK_BOUNDS
288 };
289 
ProfilePacket_ProcessHeapSamples_ClientError_Name(ProfilePacket_ProcessHeapSamples_ClientError value)290 const std::string& ProfilePacket_ProcessHeapSamples_ClientError_Name(
291     ProfilePacket_ProcessHeapSamples_ClientError value) {
292   static const bool dummy =
293       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
294           ProfilePacket_ProcessHeapSamples_ClientError_entries,
295           ProfilePacket_ProcessHeapSamples_ClientError_entries_by_number,
296           3, ProfilePacket_ProcessHeapSamples_ClientError_strings);
297   (void) dummy;
298   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
299       ProfilePacket_ProcessHeapSamples_ClientError_entries,
300       ProfilePacket_ProcessHeapSamples_ClientError_entries_by_number,
301       3, value);
302   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
303                      ProfilePacket_ProcessHeapSamples_ClientError_strings[idx].get();
304 }
ProfilePacket_ProcessHeapSamples_ClientError_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,ProfilePacket_ProcessHeapSamples_ClientError * value)305 bool ProfilePacket_ProcessHeapSamples_ClientError_Parse(
306     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ProfilePacket_ProcessHeapSamples_ClientError* value) {
307   int int_value;
308   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
309       ProfilePacket_ProcessHeapSamples_ClientError_entries, 3, name, &int_value);
310   if (success) {
311     *value = static_cast<ProfilePacket_ProcessHeapSamples_ClientError>(int_value);
312   }
313   return success;
314 }
315 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
316 constexpr ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples::CLIENT_ERROR_NONE;
317 constexpr ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples::CLIENT_ERROR_HIT_TIMEOUT;
318 constexpr ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples::CLIENT_ERROR_INVALID_STACK_BOUNDS;
319 constexpr ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples::ClientError_MIN;
320 constexpr ProfilePacket_ProcessHeapSamples_ClientError ProfilePacket_ProcessHeapSamples::ClientError_MAX;
321 constexpr int ProfilePacket_ProcessHeapSamples::ClientError_ARRAYSIZE;
322 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
Profiling_CpuMode_IsValid(int value)323 bool Profiling_CpuMode_IsValid(int value) {
324   switch (value) {
325     case 0:
326     case 1:
327     case 2:
328     case 3:
329     case 4:
330     case 5:
331       return true;
332     default:
333       return false;
334   }
335 }
336 
337 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Profiling_CpuMode_strings[6] = {};
338 
339 static const char Profiling_CpuMode_names[] =
340   "MODE_GUEST_KERNEL"
341   "MODE_GUEST_USER"
342   "MODE_HYPERVISOR"
343   "MODE_KERNEL"
344   "MODE_UNKNOWN"
345   "MODE_USER";
346 
347 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Profiling_CpuMode_entries[] = {
348   { {Profiling_CpuMode_names + 0, 17}, 4 },
349   { {Profiling_CpuMode_names + 17, 15}, 5 },
350   { {Profiling_CpuMode_names + 32, 15}, 3 },
351   { {Profiling_CpuMode_names + 47, 11}, 1 },
352   { {Profiling_CpuMode_names + 58, 12}, 0 },
353   { {Profiling_CpuMode_names + 70, 9}, 2 },
354 };
355 
356 static const int Profiling_CpuMode_entries_by_number[] = {
357   4, // 0 -> MODE_UNKNOWN
358   3, // 1 -> MODE_KERNEL
359   5, // 2 -> MODE_USER
360   2, // 3 -> MODE_HYPERVISOR
361   0, // 4 -> MODE_GUEST_KERNEL
362   1, // 5 -> MODE_GUEST_USER
363 };
364 
Profiling_CpuMode_Name(Profiling_CpuMode value)365 const std::string& Profiling_CpuMode_Name(
366     Profiling_CpuMode value) {
367   static const bool dummy =
368       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
369           Profiling_CpuMode_entries,
370           Profiling_CpuMode_entries_by_number,
371           6, Profiling_CpuMode_strings);
372   (void) dummy;
373   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
374       Profiling_CpuMode_entries,
375       Profiling_CpuMode_entries_by_number,
376       6, value);
377   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
378                      Profiling_CpuMode_strings[idx].get();
379 }
Profiling_CpuMode_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,Profiling_CpuMode * value)380 bool Profiling_CpuMode_Parse(
381     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Profiling_CpuMode* value) {
382   int int_value;
383   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
384       Profiling_CpuMode_entries, 6, name, &int_value);
385   if (success) {
386     *value = static_cast<Profiling_CpuMode>(int_value);
387   }
388   return success;
389 }
390 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
391 constexpr Profiling_CpuMode Profiling::MODE_UNKNOWN;
392 constexpr Profiling_CpuMode Profiling::MODE_KERNEL;
393 constexpr Profiling_CpuMode Profiling::MODE_USER;
394 constexpr Profiling_CpuMode Profiling::MODE_HYPERVISOR;
395 constexpr Profiling_CpuMode Profiling::MODE_GUEST_KERNEL;
396 constexpr Profiling_CpuMode Profiling::MODE_GUEST_USER;
397 constexpr Profiling_CpuMode Profiling::CpuMode_MIN;
398 constexpr Profiling_CpuMode Profiling::CpuMode_MAX;
399 constexpr int Profiling::CpuMode_ARRAYSIZE;
400 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
Profiling_StackUnwindError_IsValid(int value)401 bool Profiling_StackUnwindError_IsValid(int value) {
402   switch (value) {
403     case 0:
404     case 1:
405     case 2:
406     case 3:
407     case 4:
408     case 5:
409     case 6:
410     case 7:
411     case 8:
412     case 9:
413     case 10:
414     case 11:
415     case 12:
416     case 13:
417     case 14:
418     case 15:
419       return true;
420     default:
421       return false;
422   }
423 }
424 
425 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Profiling_StackUnwindError_strings[16] = {};
426 
427 static const char Profiling_StackUnwindError_names[] =
428   "UNWIND_ERROR_BAD_ARCH"
429   "UNWIND_ERROR_INVALID_ELF"
430   "UNWIND_ERROR_INVALID_MAP"
431   "UNWIND_ERROR_INVALID_PARAMETER"
432   "UNWIND_ERROR_MAPS_PARSE"
433   "UNWIND_ERROR_MAX_FRAMES_EXCEEDED"
434   "UNWIND_ERROR_MEMORY_INVALID"
435   "UNWIND_ERROR_NONE"
436   "UNWIND_ERROR_PTRACE_CALL"
437   "UNWIND_ERROR_REPEATED_FRAME"
438   "UNWIND_ERROR_SYSTEM_CALL"
439   "UNWIND_ERROR_THREAD_DOES_NOT_EXIST"
440   "UNWIND_ERROR_THREAD_TIMEOUT"
441   "UNWIND_ERROR_UNKNOWN"
442   "UNWIND_ERROR_UNSUPPORTED"
443   "UNWIND_ERROR_UNWIND_INFO";
444 
445 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Profiling_StackUnwindError_entries[] = {
446   { {Profiling_StackUnwindError_names + 0, 21}, 12 },
447   { {Profiling_StackUnwindError_names + 21, 24}, 8 },
448   { {Profiling_StackUnwindError_names + 45, 24}, 5 },
449   { {Profiling_StackUnwindError_names + 69, 30}, 14 },
450   { {Profiling_StackUnwindError_names + 99, 23}, 13 },
451   { {Profiling_StackUnwindError_names + 122, 32}, 6 },
452   { {Profiling_StackUnwindError_names + 154, 27}, 2 },
453   { {Profiling_StackUnwindError_names + 181, 17}, 1 },
454   { {Profiling_StackUnwindError_names + 198, 24}, 15 },
455   { {Profiling_StackUnwindError_names + 222, 27}, 7 },
456   { {Profiling_StackUnwindError_names + 249, 24}, 9 },
457   { {Profiling_StackUnwindError_names + 273, 34}, 11 },
458   { {Profiling_StackUnwindError_names + 307, 27}, 10 },
459   { {Profiling_StackUnwindError_names + 334, 20}, 0 },
460   { {Profiling_StackUnwindError_names + 354, 24}, 4 },
461   { {Profiling_StackUnwindError_names + 378, 24}, 3 },
462 };
463 
464 static const int Profiling_StackUnwindError_entries_by_number[] = {
465   13, // 0 -> UNWIND_ERROR_UNKNOWN
466   7, // 1 -> UNWIND_ERROR_NONE
467   6, // 2 -> UNWIND_ERROR_MEMORY_INVALID
468   15, // 3 -> UNWIND_ERROR_UNWIND_INFO
469   14, // 4 -> UNWIND_ERROR_UNSUPPORTED
470   2, // 5 -> UNWIND_ERROR_INVALID_MAP
471   5, // 6 -> UNWIND_ERROR_MAX_FRAMES_EXCEEDED
472   9, // 7 -> UNWIND_ERROR_REPEATED_FRAME
473   1, // 8 -> UNWIND_ERROR_INVALID_ELF
474   10, // 9 -> UNWIND_ERROR_SYSTEM_CALL
475   12, // 10 -> UNWIND_ERROR_THREAD_TIMEOUT
476   11, // 11 -> UNWIND_ERROR_THREAD_DOES_NOT_EXIST
477   0, // 12 -> UNWIND_ERROR_BAD_ARCH
478   4, // 13 -> UNWIND_ERROR_MAPS_PARSE
479   3, // 14 -> UNWIND_ERROR_INVALID_PARAMETER
480   8, // 15 -> UNWIND_ERROR_PTRACE_CALL
481 };
482 
Profiling_StackUnwindError_Name(Profiling_StackUnwindError value)483 const std::string& Profiling_StackUnwindError_Name(
484     Profiling_StackUnwindError value) {
485   static const bool dummy =
486       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
487           Profiling_StackUnwindError_entries,
488           Profiling_StackUnwindError_entries_by_number,
489           16, Profiling_StackUnwindError_strings);
490   (void) dummy;
491   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
492       Profiling_StackUnwindError_entries,
493       Profiling_StackUnwindError_entries_by_number,
494       16, value);
495   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
496                      Profiling_StackUnwindError_strings[idx].get();
497 }
Profiling_StackUnwindError_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,Profiling_StackUnwindError * value)498 bool Profiling_StackUnwindError_Parse(
499     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Profiling_StackUnwindError* value) {
500   int int_value;
501   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
502       Profiling_StackUnwindError_entries, 16, name, &int_value);
503   if (success) {
504     *value = static_cast<Profiling_StackUnwindError>(int_value);
505   }
506   return success;
507 }
508 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
509 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_UNKNOWN;
510 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_NONE;
511 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_MEMORY_INVALID;
512 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_UNWIND_INFO;
513 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_UNSUPPORTED;
514 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_INVALID_MAP;
515 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_MAX_FRAMES_EXCEEDED;
516 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_REPEATED_FRAME;
517 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_INVALID_ELF;
518 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_SYSTEM_CALL;
519 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_THREAD_TIMEOUT;
520 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_THREAD_DOES_NOT_EXIST;
521 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_BAD_ARCH;
522 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_MAPS_PARSE;
523 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_INVALID_PARAMETER;
524 constexpr Profiling_StackUnwindError Profiling::UNWIND_ERROR_PTRACE_CALL;
525 constexpr Profiling_StackUnwindError Profiling::StackUnwindError_MIN;
526 constexpr Profiling_StackUnwindError Profiling::StackUnwindError_MAX;
527 constexpr int Profiling::StackUnwindError_ARRAYSIZE;
528 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
PerfSample_ProducerEvent_DataSourceStopReason_IsValid(int value)529 bool PerfSample_ProducerEvent_DataSourceStopReason_IsValid(int value) {
530   switch (value) {
531     case 0:
532     case 1:
533       return true;
534     default:
535       return false;
536   }
537 }
538 
539 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> PerfSample_ProducerEvent_DataSourceStopReason_strings[2] = {};
540 
541 static const char PerfSample_ProducerEvent_DataSourceStopReason_names[] =
542   "PROFILER_STOP_GUARDRAIL"
543   "PROFILER_STOP_UNKNOWN";
544 
545 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PerfSample_ProducerEvent_DataSourceStopReason_entries[] = {
546   { {PerfSample_ProducerEvent_DataSourceStopReason_names + 0, 23}, 1 },
547   { {PerfSample_ProducerEvent_DataSourceStopReason_names + 23, 21}, 0 },
548 };
549 
550 static const int PerfSample_ProducerEvent_DataSourceStopReason_entries_by_number[] = {
551   1, // 0 -> PROFILER_STOP_UNKNOWN
552   0, // 1 -> PROFILER_STOP_GUARDRAIL
553 };
554 
PerfSample_ProducerEvent_DataSourceStopReason_Name(PerfSample_ProducerEvent_DataSourceStopReason value)555 const std::string& PerfSample_ProducerEvent_DataSourceStopReason_Name(
556     PerfSample_ProducerEvent_DataSourceStopReason value) {
557   static const bool dummy =
558       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
559           PerfSample_ProducerEvent_DataSourceStopReason_entries,
560           PerfSample_ProducerEvent_DataSourceStopReason_entries_by_number,
561           2, PerfSample_ProducerEvent_DataSourceStopReason_strings);
562   (void) dummy;
563   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
564       PerfSample_ProducerEvent_DataSourceStopReason_entries,
565       PerfSample_ProducerEvent_DataSourceStopReason_entries_by_number,
566       2, value);
567   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
568                      PerfSample_ProducerEvent_DataSourceStopReason_strings[idx].get();
569 }
PerfSample_ProducerEvent_DataSourceStopReason_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,PerfSample_ProducerEvent_DataSourceStopReason * value)570 bool PerfSample_ProducerEvent_DataSourceStopReason_Parse(
571     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PerfSample_ProducerEvent_DataSourceStopReason* value) {
572   int int_value;
573   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
574       PerfSample_ProducerEvent_DataSourceStopReason_entries, 2, name, &int_value);
575   if (success) {
576     *value = static_cast<PerfSample_ProducerEvent_DataSourceStopReason>(int_value);
577   }
578   return success;
579 }
580 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
581 constexpr PerfSample_ProducerEvent_DataSourceStopReason PerfSample_ProducerEvent::PROFILER_STOP_UNKNOWN;
582 constexpr PerfSample_ProducerEvent_DataSourceStopReason PerfSample_ProducerEvent::PROFILER_STOP_GUARDRAIL;
583 constexpr PerfSample_ProducerEvent_DataSourceStopReason PerfSample_ProducerEvent::DataSourceStopReason_MIN;
584 constexpr PerfSample_ProducerEvent_DataSourceStopReason PerfSample_ProducerEvent::DataSourceStopReason_MAX;
585 constexpr int PerfSample_ProducerEvent::DataSourceStopReason_ARRAYSIZE;
586 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
PerfSample_SampleSkipReason_IsValid(int value)587 bool PerfSample_SampleSkipReason_IsValid(int value) {
588   switch (value) {
589     case 0:
590     case 1:
591     case 2:
592     case 3:
593       return true;
594     default:
595       return false;
596   }
597 }
598 
599 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> PerfSample_SampleSkipReason_strings[4] = {};
600 
601 static const char PerfSample_SampleSkipReason_names[] =
602   "PROFILER_SKIP_READ_STAGE"
603   "PROFILER_SKIP_UNKNOWN"
604   "PROFILER_SKIP_UNWIND_ENQUEUE"
605   "PROFILER_SKIP_UNWIND_STAGE";
606 
607 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PerfSample_SampleSkipReason_entries[] = {
608   { {PerfSample_SampleSkipReason_names + 0, 24}, 1 },
609   { {PerfSample_SampleSkipReason_names + 24, 21}, 0 },
610   { {PerfSample_SampleSkipReason_names + 45, 28}, 3 },
611   { {PerfSample_SampleSkipReason_names + 73, 26}, 2 },
612 };
613 
614 static const int PerfSample_SampleSkipReason_entries_by_number[] = {
615   1, // 0 -> PROFILER_SKIP_UNKNOWN
616   0, // 1 -> PROFILER_SKIP_READ_STAGE
617   3, // 2 -> PROFILER_SKIP_UNWIND_STAGE
618   2, // 3 -> PROFILER_SKIP_UNWIND_ENQUEUE
619 };
620 
PerfSample_SampleSkipReason_Name(PerfSample_SampleSkipReason value)621 const std::string& PerfSample_SampleSkipReason_Name(
622     PerfSample_SampleSkipReason value) {
623   static const bool dummy =
624       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
625           PerfSample_SampleSkipReason_entries,
626           PerfSample_SampleSkipReason_entries_by_number,
627           4, PerfSample_SampleSkipReason_strings);
628   (void) dummy;
629   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
630       PerfSample_SampleSkipReason_entries,
631       PerfSample_SampleSkipReason_entries_by_number,
632       4, value);
633   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
634                      PerfSample_SampleSkipReason_strings[idx].get();
635 }
PerfSample_SampleSkipReason_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,PerfSample_SampleSkipReason * value)636 bool PerfSample_SampleSkipReason_Parse(
637     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PerfSample_SampleSkipReason* value) {
638   int int_value;
639   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
640       PerfSample_SampleSkipReason_entries, 4, name, &int_value);
641   if (success) {
642     *value = static_cast<PerfSample_SampleSkipReason>(int_value);
643   }
644   return success;
645 }
646 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
647 constexpr PerfSample_SampleSkipReason PerfSample::PROFILER_SKIP_UNKNOWN;
648 constexpr PerfSample_SampleSkipReason PerfSample::PROFILER_SKIP_READ_STAGE;
649 constexpr PerfSample_SampleSkipReason PerfSample::PROFILER_SKIP_UNWIND_STAGE;
650 constexpr PerfSample_SampleSkipReason PerfSample::PROFILER_SKIP_UNWIND_ENQUEUE;
651 constexpr PerfSample_SampleSkipReason PerfSample::SampleSkipReason_MIN;
652 constexpr PerfSample_SampleSkipReason PerfSample::SampleSkipReason_MAX;
653 constexpr int PerfSample::SampleSkipReason_ARRAYSIZE;
654 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
655 
656 // ===================================================================
657 
658 class ProfilePacket_HeapSample::_Internal {
659  public:
660   using HasBits = decltype(std::declval<ProfilePacket_HeapSample>()._impl_._has_bits_);
set_has_callstack_id(HasBits * has_bits)661   static void set_has_callstack_id(HasBits* has_bits) {
662     (*has_bits)[0] |= 1u;
663   }
set_has_self_allocated(HasBits * has_bits)664   static void set_has_self_allocated(HasBits* has_bits) {
665     (*has_bits)[0] |= 2u;
666   }
set_has_self_freed(HasBits * has_bits)667   static void set_has_self_freed(HasBits* has_bits) {
668     (*has_bits)[0] |= 4u;
669   }
set_has_self_max(HasBits * has_bits)670   static void set_has_self_max(HasBits* has_bits) {
671     (*has_bits)[0] |= 64u;
672   }
set_has_self_max_count(HasBits * has_bits)673   static void set_has_self_max_count(HasBits* has_bits) {
674     (*has_bits)[0] |= 128u;
675   }
set_has_timestamp(HasBits * has_bits)676   static void set_has_timestamp(HasBits* has_bits) {
677     (*has_bits)[0] |= 8u;
678   }
set_has_alloc_count(HasBits * has_bits)679   static void set_has_alloc_count(HasBits* has_bits) {
680     (*has_bits)[0] |= 16u;
681   }
set_has_free_count(HasBits * has_bits)682   static void set_has_free_count(HasBits* has_bits) {
683     (*has_bits)[0] |= 32u;
684   }
685 };
686 
ProfilePacket_HeapSample(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)687 ProfilePacket_HeapSample::ProfilePacket_HeapSample(::PROTOBUF_NAMESPACE_ID::Arena* arena,
688                          bool is_message_owned)
689   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
690   SharedCtor(arena, is_message_owned);
691   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProfilePacket.HeapSample)
692 }
ProfilePacket_HeapSample(const ProfilePacket_HeapSample & from)693 ProfilePacket_HeapSample::ProfilePacket_HeapSample(const ProfilePacket_HeapSample& from)
694   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
695   ProfilePacket_HeapSample* const _this = this; (void)_this;
696   new (&_impl_) Impl_{
697       decltype(_impl_._has_bits_){from._impl_._has_bits_}
698     , /*decltype(_impl_._cached_size_)*/{}
699     , decltype(_impl_.callstack_id_){}
700     , decltype(_impl_.self_allocated_){}
701     , decltype(_impl_.self_freed_){}
702     , decltype(_impl_.timestamp_){}
703     , decltype(_impl_.alloc_count_){}
704     , decltype(_impl_.free_count_){}
705     , decltype(_impl_.self_max_){}
706     , decltype(_impl_.self_max_count_){}};
707 
708   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
709   ::memcpy(&_impl_.callstack_id_, &from._impl_.callstack_id_,
710     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.self_max_count_) -
711     reinterpret_cast<char*>(&_impl_.callstack_id_)) + sizeof(_impl_.self_max_count_));
712   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProfilePacket.HeapSample)
713 }
714 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)715 inline void ProfilePacket_HeapSample::SharedCtor(
716     ::_pb::Arena* arena, bool is_message_owned) {
717   (void)arena;
718   (void)is_message_owned;
719   new (&_impl_) Impl_{
720       decltype(_impl_._has_bits_){}
721     , /*decltype(_impl_._cached_size_)*/{}
722     , decltype(_impl_.callstack_id_){::uint64_t{0u}}
723     , decltype(_impl_.self_allocated_){::uint64_t{0u}}
724     , decltype(_impl_.self_freed_){::uint64_t{0u}}
725     , decltype(_impl_.timestamp_){::uint64_t{0u}}
726     , decltype(_impl_.alloc_count_){::uint64_t{0u}}
727     , decltype(_impl_.free_count_){::uint64_t{0u}}
728     , decltype(_impl_.self_max_){::uint64_t{0u}}
729     , decltype(_impl_.self_max_count_){::uint64_t{0u}}
730   };
731 }
732 
~ProfilePacket_HeapSample()733 ProfilePacket_HeapSample::~ProfilePacket_HeapSample() {
734   // @@protoc_insertion_point(destructor:perfetto.protos.ProfilePacket.HeapSample)
735   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
736   (void)arena;
737     return;
738   }
739   SharedDtor();
740 }
741 
SharedDtor()742 inline void ProfilePacket_HeapSample::SharedDtor() {
743   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
744 }
745 
SetCachedSize(int size) const746 void ProfilePacket_HeapSample::SetCachedSize(int size) const {
747   _impl_._cached_size_.Set(size);
748 }
749 
Clear()750 void ProfilePacket_HeapSample::Clear() {
751 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProfilePacket.HeapSample)
752   ::uint32_t cached_has_bits = 0;
753   // Prevent compiler warnings about cached_has_bits being unused
754   (void) cached_has_bits;
755 
756   cached_has_bits = _impl_._has_bits_[0];
757   if (cached_has_bits & 0x000000ffu) {
758     ::memset(&_impl_.callstack_id_, 0, static_cast<size_t>(
759         reinterpret_cast<char*>(&_impl_.self_max_count_) -
760         reinterpret_cast<char*>(&_impl_.callstack_id_)) + sizeof(_impl_.self_max_count_));
761   }
762   _impl_._has_bits_.Clear();
763   _internal_metadata_.Clear<std::string>();
764 }
765 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)766 const char* ProfilePacket_HeapSample::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
767 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
768   _Internal::HasBits has_bits{};
769   while (!ctx->Done(&ptr)) {
770     ::uint32_t tag;
771     ptr = ::_pbi::ReadTag(ptr, &tag);
772     switch (tag >> 3) {
773       // optional uint64 callstack_id = 1;
774       case 1:
775         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
776           _Internal::set_has_callstack_id(&has_bits);
777           _impl_.callstack_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
778           CHK_(ptr);
779         } else {
780           goto handle_unusual;
781         }
782         continue;
783       // optional uint64 self_allocated = 2;
784       case 2:
785         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
786           _Internal::set_has_self_allocated(&has_bits);
787           _impl_.self_allocated_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
788           CHK_(ptr);
789         } else {
790           goto handle_unusual;
791         }
792         continue;
793       // optional uint64 self_freed = 3;
794       case 3:
795         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
796           _Internal::set_has_self_freed(&has_bits);
797           _impl_.self_freed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
798           CHK_(ptr);
799         } else {
800           goto handle_unusual;
801         }
802         continue;
803       // optional uint64 timestamp = 4;
804       case 4:
805         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
806           _Internal::set_has_timestamp(&has_bits);
807           _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
808           CHK_(ptr);
809         } else {
810           goto handle_unusual;
811         }
812         continue;
813       // optional uint64 alloc_count = 5;
814       case 5:
815         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
816           _Internal::set_has_alloc_count(&has_bits);
817           _impl_.alloc_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
818           CHK_(ptr);
819         } else {
820           goto handle_unusual;
821         }
822         continue;
823       // optional uint64 free_count = 6;
824       case 6:
825         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
826           _Internal::set_has_free_count(&has_bits);
827           _impl_.free_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
828           CHK_(ptr);
829         } else {
830           goto handle_unusual;
831         }
832         continue;
833       // optional uint64 self_max = 8;
834       case 8:
835         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
836           _Internal::set_has_self_max(&has_bits);
837           _impl_.self_max_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
838           CHK_(ptr);
839         } else {
840           goto handle_unusual;
841         }
842         continue;
843       // optional uint64 self_max_count = 9;
844       case 9:
845         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
846           _Internal::set_has_self_max_count(&has_bits);
847           _impl_.self_max_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
848           CHK_(ptr);
849         } else {
850           goto handle_unusual;
851         }
852         continue;
853       default:
854         goto handle_unusual;
855     }  // switch
856   handle_unusual:
857     if ((tag == 0) || ((tag & 7) == 4)) {
858       CHK_(ptr);
859       ctx->SetLastTag(tag);
860       goto message_done;
861     }
862     ptr = UnknownFieldParse(
863         tag,
864         _internal_metadata_.mutable_unknown_fields<std::string>(),
865         ptr, ctx);
866     CHK_(ptr != nullptr);
867   }  // while
868 message_done:
869   _impl_._has_bits_.Or(has_bits);
870   return ptr;
871 failure:
872   ptr = nullptr;
873   goto message_done;
874 #undef CHK_
875 }
876 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const877 ::uint8_t* ProfilePacket_HeapSample::_InternalSerialize(
878     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
879   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProfilePacket.HeapSample)
880   ::uint32_t cached_has_bits = 0;
881   (void) cached_has_bits;
882 
883   cached_has_bits = _impl_._has_bits_[0];
884   // optional uint64 callstack_id = 1;
885   if (cached_has_bits & 0x00000001u) {
886     target = stream->EnsureSpace(target);
887     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_callstack_id(), target);
888   }
889 
890   // optional uint64 self_allocated = 2;
891   if (cached_has_bits & 0x00000002u) {
892     target = stream->EnsureSpace(target);
893     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_self_allocated(), target);
894   }
895 
896   // optional uint64 self_freed = 3;
897   if (cached_has_bits & 0x00000004u) {
898     target = stream->EnsureSpace(target);
899     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_self_freed(), target);
900   }
901 
902   // optional uint64 timestamp = 4;
903   if (cached_has_bits & 0x00000008u) {
904     target = stream->EnsureSpace(target);
905     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_timestamp(), target);
906   }
907 
908   // optional uint64 alloc_count = 5;
909   if (cached_has_bits & 0x00000010u) {
910     target = stream->EnsureSpace(target);
911     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_alloc_count(), target);
912   }
913 
914   // optional uint64 free_count = 6;
915   if (cached_has_bits & 0x00000020u) {
916     target = stream->EnsureSpace(target);
917     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_free_count(), target);
918   }
919 
920   // optional uint64 self_max = 8;
921   if (cached_has_bits & 0x00000040u) {
922     target = stream->EnsureSpace(target);
923     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_self_max(), target);
924   }
925 
926   // optional uint64 self_max_count = 9;
927   if (cached_has_bits & 0x00000080u) {
928     target = stream->EnsureSpace(target);
929     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(9, this->_internal_self_max_count(), target);
930   }
931 
932   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
933     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
934         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
935   }
936   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProfilePacket.HeapSample)
937   return target;
938 }
939 
ByteSizeLong() const940 size_t ProfilePacket_HeapSample::ByteSizeLong() const {
941 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProfilePacket.HeapSample)
942   size_t total_size = 0;
943 
944   ::uint32_t cached_has_bits = 0;
945   // Prevent compiler warnings about cached_has_bits being unused
946   (void) cached_has_bits;
947 
948   cached_has_bits = _impl_._has_bits_[0];
949   if (cached_has_bits & 0x000000ffu) {
950     // optional uint64 callstack_id = 1;
951     if (cached_has_bits & 0x00000001u) {
952       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_callstack_id());
953     }
954 
955     // optional uint64 self_allocated = 2;
956     if (cached_has_bits & 0x00000002u) {
957       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_self_allocated());
958     }
959 
960     // optional uint64 self_freed = 3;
961     if (cached_has_bits & 0x00000004u) {
962       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_self_freed());
963     }
964 
965     // optional uint64 timestamp = 4;
966     if (cached_has_bits & 0x00000008u) {
967       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_timestamp());
968     }
969 
970     // optional uint64 alloc_count = 5;
971     if (cached_has_bits & 0x00000010u) {
972       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_alloc_count());
973     }
974 
975     // optional uint64 free_count = 6;
976     if (cached_has_bits & 0x00000020u) {
977       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_free_count());
978     }
979 
980     // optional uint64 self_max = 8;
981     if (cached_has_bits & 0x00000040u) {
982       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_self_max());
983     }
984 
985     // optional uint64 self_max_count = 9;
986     if (cached_has_bits & 0x00000080u) {
987       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_self_max_count());
988     }
989 
990   }
991   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
992     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
993   }
994   int cached_size = ::_pbi::ToCachedSize(total_size);
995   SetCachedSize(cached_size);
996   return total_size;
997 }
998 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)999 void ProfilePacket_HeapSample::CheckTypeAndMergeFrom(
1000     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1001   MergeFrom(*::_pbi::DownCast<const ProfilePacket_HeapSample*>(
1002       &from));
1003 }
1004 
MergeFrom(const ProfilePacket_HeapSample & from)1005 void ProfilePacket_HeapSample::MergeFrom(const ProfilePacket_HeapSample& from) {
1006   ProfilePacket_HeapSample* const _this = this;
1007   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProfilePacket.HeapSample)
1008   GOOGLE_DCHECK_NE(&from, _this);
1009   ::uint32_t cached_has_bits = 0;
1010   (void) cached_has_bits;
1011 
1012   cached_has_bits = from._impl_._has_bits_[0];
1013   if (cached_has_bits & 0x000000ffu) {
1014     if (cached_has_bits & 0x00000001u) {
1015       _this->_impl_.callstack_id_ = from._impl_.callstack_id_;
1016     }
1017     if (cached_has_bits & 0x00000002u) {
1018       _this->_impl_.self_allocated_ = from._impl_.self_allocated_;
1019     }
1020     if (cached_has_bits & 0x00000004u) {
1021       _this->_impl_.self_freed_ = from._impl_.self_freed_;
1022     }
1023     if (cached_has_bits & 0x00000008u) {
1024       _this->_impl_.timestamp_ = from._impl_.timestamp_;
1025     }
1026     if (cached_has_bits & 0x00000010u) {
1027       _this->_impl_.alloc_count_ = from._impl_.alloc_count_;
1028     }
1029     if (cached_has_bits & 0x00000020u) {
1030       _this->_impl_.free_count_ = from._impl_.free_count_;
1031     }
1032     if (cached_has_bits & 0x00000040u) {
1033       _this->_impl_.self_max_ = from._impl_.self_max_;
1034     }
1035     if (cached_has_bits & 0x00000080u) {
1036       _this->_impl_.self_max_count_ = from._impl_.self_max_count_;
1037     }
1038     _this->_impl_._has_bits_[0] |= cached_has_bits;
1039   }
1040   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1041 }
1042 
CopyFrom(const ProfilePacket_HeapSample & from)1043 void ProfilePacket_HeapSample::CopyFrom(const ProfilePacket_HeapSample& from) {
1044 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProfilePacket.HeapSample)
1045   if (&from == this) return;
1046   Clear();
1047   MergeFrom(from);
1048 }
1049 
IsInitialized() const1050 bool ProfilePacket_HeapSample::IsInitialized() const {
1051   return true;
1052 }
1053 
InternalSwap(ProfilePacket_HeapSample * other)1054 void ProfilePacket_HeapSample::InternalSwap(ProfilePacket_HeapSample* other) {
1055   using std::swap;
1056   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1057   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1058   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1059       PROTOBUF_FIELD_OFFSET(ProfilePacket_HeapSample, _impl_.self_max_count_)
1060       + sizeof(ProfilePacket_HeapSample::_impl_.self_max_count_)  // NOLINT
1061       - PROTOBUF_FIELD_OFFSET(ProfilePacket_HeapSample, _impl_.callstack_id_)>(
1062           reinterpret_cast<char*>(&_impl_.callstack_id_),
1063           reinterpret_cast<char*>(&other->_impl_.callstack_id_));
1064 }
1065 
GetTypeName() const1066 std::string ProfilePacket_HeapSample::GetTypeName() const {
1067   return "perfetto.protos.ProfilePacket.HeapSample";
1068 }
1069 
1070 
1071 // ===================================================================
1072 
1073 class ProfilePacket_Histogram_Bucket::_Internal {
1074  public:
1075   using HasBits = decltype(std::declval<ProfilePacket_Histogram_Bucket>()._impl_._has_bits_);
set_has_upper_limit(HasBits * has_bits)1076   static void set_has_upper_limit(HasBits* has_bits) {
1077     (*has_bits)[0] |= 1u;
1078   }
set_has_max_bucket(HasBits * has_bits)1079   static void set_has_max_bucket(HasBits* has_bits) {
1080     (*has_bits)[0] |= 4u;
1081   }
set_has_count(HasBits * has_bits)1082   static void set_has_count(HasBits* has_bits) {
1083     (*has_bits)[0] |= 2u;
1084   }
1085 };
1086 
ProfilePacket_Histogram_Bucket(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1087 ProfilePacket_Histogram_Bucket::ProfilePacket_Histogram_Bucket(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1088                          bool is_message_owned)
1089   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1090   SharedCtor(arena, is_message_owned);
1091   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProfilePacket.Histogram.Bucket)
1092 }
ProfilePacket_Histogram_Bucket(const ProfilePacket_Histogram_Bucket & from)1093 ProfilePacket_Histogram_Bucket::ProfilePacket_Histogram_Bucket(const ProfilePacket_Histogram_Bucket& from)
1094   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1095   ProfilePacket_Histogram_Bucket* const _this = this; (void)_this;
1096   new (&_impl_) Impl_{
1097       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1098     , /*decltype(_impl_._cached_size_)*/{}
1099     , decltype(_impl_.upper_limit_){}
1100     , decltype(_impl_.count_){}
1101     , decltype(_impl_.max_bucket_){}};
1102 
1103   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1104   ::memcpy(&_impl_.upper_limit_, &from._impl_.upper_limit_,
1105     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.max_bucket_) -
1106     reinterpret_cast<char*>(&_impl_.upper_limit_)) + sizeof(_impl_.max_bucket_));
1107   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProfilePacket.Histogram.Bucket)
1108 }
1109 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1110 inline void ProfilePacket_Histogram_Bucket::SharedCtor(
1111     ::_pb::Arena* arena, bool is_message_owned) {
1112   (void)arena;
1113   (void)is_message_owned;
1114   new (&_impl_) Impl_{
1115       decltype(_impl_._has_bits_){}
1116     , /*decltype(_impl_._cached_size_)*/{}
1117     , decltype(_impl_.upper_limit_){::uint64_t{0u}}
1118     , decltype(_impl_.count_){::uint64_t{0u}}
1119     , decltype(_impl_.max_bucket_){false}
1120   };
1121 }
1122 
~ProfilePacket_Histogram_Bucket()1123 ProfilePacket_Histogram_Bucket::~ProfilePacket_Histogram_Bucket() {
1124   // @@protoc_insertion_point(destructor:perfetto.protos.ProfilePacket.Histogram.Bucket)
1125   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1126   (void)arena;
1127     return;
1128   }
1129   SharedDtor();
1130 }
1131 
SharedDtor()1132 inline void ProfilePacket_Histogram_Bucket::SharedDtor() {
1133   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1134 }
1135 
SetCachedSize(int size) const1136 void ProfilePacket_Histogram_Bucket::SetCachedSize(int size) const {
1137   _impl_._cached_size_.Set(size);
1138 }
1139 
Clear()1140 void ProfilePacket_Histogram_Bucket::Clear() {
1141 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProfilePacket.Histogram.Bucket)
1142   ::uint32_t cached_has_bits = 0;
1143   // Prevent compiler warnings about cached_has_bits being unused
1144   (void) cached_has_bits;
1145 
1146   cached_has_bits = _impl_._has_bits_[0];
1147   if (cached_has_bits & 0x00000007u) {
1148     ::memset(&_impl_.upper_limit_, 0, static_cast<size_t>(
1149         reinterpret_cast<char*>(&_impl_.max_bucket_) -
1150         reinterpret_cast<char*>(&_impl_.upper_limit_)) + sizeof(_impl_.max_bucket_));
1151   }
1152   _impl_._has_bits_.Clear();
1153   _internal_metadata_.Clear<std::string>();
1154 }
1155 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1156 const char* ProfilePacket_Histogram_Bucket::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1157 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1158   _Internal::HasBits has_bits{};
1159   while (!ctx->Done(&ptr)) {
1160     ::uint32_t tag;
1161     ptr = ::_pbi::ReadTag(ptr, &tag);
1162     switch (tag >> 3) {
1163       // optional uint64 upper_limit = 1;
1164       case 1:
1165         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1166           _Internal::set_has_upper_limit(&has_bits);
1167           _impl_.upper_limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1168           CHK_(ptr);
1169         } else {
1170           goto handle_unusual;
1171         }
1172         continue;
1173       // optional bool max_bucket = 2;
1174       case 2:
1175         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1176           _Internal::set_has_max_bucket(&has_bits);
1177           _impl_.max_bucket_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1178           CHK_(ptr);
1179         } else {
1180           goto handle_unusual;
1181         }
1182         continue;
1183       // optional uint64 count = 3;
1184       case 3:
1185         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1186           _Internal::set_has_count(&has_bits);
1187           _impl_.count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1188           CHK_(ptr);
1189         } else {
1190           goto handle_unusual;
1191         }
1192         continue;
1193       default:
1194         goto handle_unusual;
1195     }  // switch
1196   handle_unusual:
1197     if ((tag == 0) || ((tag & 7) == 4)) {
1198       CHK_(ptr);
1199       ctx->SetLastTag(tag);
1200       goto message_done;
1201     }
1202     ptr = UnknownFieldParse(
1203         tag,
1204         _internal_metadata_.mutable_unknown_fields<std::string>(),
1205         ptr, ctx);
1206     CHK_(ptr != nullptr);
1207   }  // while
1208 message_done:
1209   _impl_._has_bits_.Or(has_bits);
1210   return ptr;
1211 failure:
1212   ptr = nullptr;
1213   goto message_done;
1214 #undef CHK_
1215 }
1216 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1217 ::uint8_t* ProfilePacket_Histogram_Bucket::_InternalSerialize(
1218     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1219   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProfilePacket.Histogram.Bucket)
1220   ::uint32_t cached_has_bits = 0;
1221   (void) cached_has_bits;
1222 
1223   cached_has_bits = _impl_._has_bits_[0];
1224   // optional uint64 upper_limit = 1;
1225   if (cached_has_bits & 0x00000001u) {
1226     target = stream->EnsureSpace(target);
1227     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_upper_limit(), target);
1228   }
1229 
1230   // optional bool max_bucket = 2;
1231   if (cached_has_bits & 0x00000004u) {
1232     target = stream->EnsureSpace(target);
1233     target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_max_bucket(), target);
1234   }
1235 
1236   // optional uint64 count = 3;
1237   if (cached_has_bits & 0x00000002u) {
1238     target = stream->EnsureSpace(target);
1239     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_count(), target);
1240   }
1241 
1242   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1243     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1244         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1245   }
1246   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProfilePacket.Histogram.Bucket)
1247   return target;
1248 }
1249 
ByteSizeLong() const1250 size_t ProfilePacket_Histogram_Bucket::ByteSizeLong() const {
1251 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProfilePacket.Histogram.Bucket)
1252   size_t total_size = 0;
1253 
1254   ::uint32_t cached_has_bits = 0;
1255   // Prevent compiler warnings about cached_has_bits being unused
1256   (void) cached_has_bits;
1257 
1258   cached_has_bits = _impl_._has_bits_[0];
1259   if (cached_has_bits & 0x00000007u) {
1260     // optional uint64 upper_limit = 1;
1261     if (cached_has_bits & 0x00000001u) {
1262       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_upper_limit());
1263     }
1264 
1265     // optional uint64 count = 3;
1266     if (cached_has_bits & 0x00000002u) {
1267       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_count());
1268     }
1269 
1270     // optional bool max_bucket = 2;
1271     if (cached_has_bits & 0x00000004u) {
1272       total_size += 1 + 1;
1273     }
1274 
1275   }
1276   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1277     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1278   }
1279   int cached_size = ::_pbi::ToCachedSize(total_size);
1280   SetCachedSize(cached_size);
1281   return total_size;
1282 }
1283 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1284 void ProfilePacket_Histogram_Bucket::CheckTypeAndMergeFrom(
1285     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1286   MergeFrom(*::_pbi::DownCast<const ProfilePacket_Histogram_Bucket*>(
1287       &from));
1288 }
1289 
MergeFrom(const ProfilePacket_Histogram_Bucket & from)1290 void ProfilePacket_Histogram_Bucket::MergeFrom(const ProfilePacket_Histogram_Bucket& from) {
1291   ProfilePacket_Histogram_Bucket* const _this = this;
1292   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProfilePacket.Histogram.Bucket)
1293   GOOGLE_DCHECK_NE(&from, _this);
1294   ::uint32_t cached_has_bits = 0;
1295   (void) cached_has_bits;
1296 
1297   cached_has_bits = from._impl_._has_bits_[0];
1298   if (cached_has_bits & 0x00000007u) {
1299     if (cached_has_bits & 0x00000001u) {
1300       _this->_impl_.upper_limit_ = from._impl_.upper_limit_;
1301     }
1302     if (cached_has_bits & 0x00000002u) {
1303       _this->_impl_.count_ = from._impl_.count_;
1304     }
1305     if (cached_has_bits & 0x00000004u) {
1306       _this->_impl_.max_bucket_ = from._impl_.max_bucket_;
1307     }
1308     _this->_impl_._has_bits_[0] |= cached_has_bits;
1309   }
1310   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1311 }
1312 
CopyFrom(const ProfilePacket_Histogram_Bucket & from)1313 void ProfilePacket_Histogram_Bucket::CopyFrom(const ProfilePacket_Histogram_Bucket& from) {
1314 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProfilePacket.Histogram.Bucket)
1315   if (&from == this) return;
1316   Clear();
1317   MergeFrom(from);
1318 }
1319 
IsInitialized() const1320 bool ProfilePacket_Histogram_Bucket::IsInitialized() const {
1321   return true;
1322 }
1323 
InternalSwap(ProfilePacket_Histogram_Bucket * other)1324 void ProfilePacket_Histogram_Bucket::InternalSwap(ProfilePacket_Histogram_Bucket* other) {
1325   using std::swap;
1326   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1327   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1328   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1329       PROTOBUF_FIELD_OFFSET(ProfilePacket_Histogram_Bucket, _impl_.max_bucket_)
1330       + sizeof(ProfilePacket_Histogram_Bucket::_impl_.max_bucket_)  // NOLINT
1331       - PROTOBUF_FIELD_OFFSET(ProfilePacket_Histogram_Bucket, _impl_.upper_limit_)>(
1332           reinterpret_cast<char*>(&_impl_.upper_limit_),
1333           reinterpret_cast<char*>(&other->_impl_.upper_limit_));
1334 }
1335 
GetTypeName() const1336 std::string ProfilePacket_Histogram_Bucket::GetTypeName() const {
1337   return "perfetto.protos.ProfilePacket.Histogram.Bucket";
1338 }
1339 
1340 
1341 // ===================================================================
1342 
1343 class ProfilePacket_Histogram::_Internal {
1344  public:
1345 };
1346 
ProfilePacket_Histogram(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1347 ProfilePacket_Histogram::ProfilePacket_Histogram(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1348                          bool is_message_owned)
1349   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1350   SharedCtor(arena, is_message_owned);
1351   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProfilePacket.Histogram)
1352 }
ProfilePacket_Histogram(const ProfilePacket_Histogram & from)1353 ProfilePacket_Histogram::ProfilePacket_Histogram(const ProfilePacket_Histogram& from)
1354   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1355   ProfilePacket_Histogram* const _this = this; (void)_this;
1356   new (&_impl_) Impl_{
1357       decltype(_impl_.buckets_){from._impl_.buckets_}
1358     , /*decltype(_impl_._cached_size_)*/{}};
1359 
1360   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1361   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProfilePacket.Histogram)
1362 }
1363 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1364 inline void ProfilePacket_Histogram::SharedCtor(
1365     ::_pb::Arena* arena, bool is_message_owned) {
1366   (void)arena;
1367   (void)is_message_owned;
1368   new (&_impl_) Impl_{
1369       decltype(_impl_.buckets_){arena}
1370     , /*decltype(_impl_._cached_size_)*/{}
1371   };
1372 }
1373 
~ProfilePacket_Histogram()1374 ProfilePacket_Histogram::~ProfilePacket_Histogram() {
1375   // @@protoc_insertion_point(destructor:perfetto.protos.ProfilePacket.Histogram)
1376   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1377   (void)arena;
1378     return;
1379   }
1380   SharedDtor();
1381 }
1382 
SharedDtor()1383 inline void ProfilePacket_Histogram::SharedDtor() {
1384   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1385   _impl_.buckets_.~RepeatedPtrField();
1386 }
1387 
SetCachedSize(int size) const1388 void ProfilePacket_Histogram::SetCachedSize(int size) const {
1389   _impl_._cached_size_.Set(size);
1390 }
1391 
Clear()1392 void ProfilePacket_Histogram::Clear() {
1393 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProfilePacket.Histogram)
1394   ::uint32_t cached_has_bits = 0;
1395   // Prevent compiler warnings about cached_has_bits being unused
1396   (void) cached_has_bits;
1397 
1398   _impl_.buckets_.Clear();
1399   _internal_metadata_.Clear<std::string>();
1400 }
1401 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1402 const char* ProfilePacket_Histogram::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1403 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1404   while (!ctx->Done(&ptr)) {
1405     ::uint32_t tag;
1406     ptr = ::_pbi::ReadTag(ptr, &tag);
1407     switch (tag >> 3) {
1408       // repeated .perfetto.protos.ProfilePacket.Histogram.Bucket buckets = 1;
1409       case 1:
1410         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1411           ptr -= 1;
1412           do {
1413             ptr += 1;
1414             ptr = ctx->ParseMessage(_internal_add_buckets(), ptr);
1415             CHK_(ptr);
1416             if (!ctx->DataAvailable(ptr)) break;
1417           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1418         } else {
1419           goto handle_unusual;
1420         }
1421         continue;
1422       default:
1423         goto handle_unusual;
1424     }  // switch
1425   handle_unusual:
1426     if ((tag == 0) || ((tag & 7) == 4)) {
1427       CHK_(ptr);
1428       ctx->SetLastTag(tag);
1429       goto message_done;
1430     }
1431     ptr = UnknownFieldParse(
1432         tag,
1433         _internal_metadata_.mutable_unknown_fields<std::string>(),
1434         ptr, ctx);
1435     CHK_(ptr != nullptr);
1436   }  // while
1437 message_done:
1438   return ptr;
1439 failure:
1440   ptr = nullptr;
1441   goto message_done;
1442 #undef CHK_
1443 }
1444 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1445 ::uint8_t* ProfilePacket_Histogram::_InternalSerialize(
1446     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1447   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProfilePacket.Histogram)
1448   ::uint32_t cached_has_bits = 0;
1449   (void) cached_has_bits;
1450 
1451   // repeated .perfetto.protos.ProfilePacket.Histogram.Bucket buckets = 1;
1452   for (unsigned i = 0,
1453       n = static_cast<unsigned>(this->_internal_buckets_size()); i < n; i++) {
1454     const auto& repfield = this->_internal_buckets(i);
1455     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1456         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
1457   }
1458 
1459   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1460     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1461         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1462   }
1463   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProfilePacket.Histogram)
1464   return target;
1465 }
1466 
ByteSizeLong() const1467 size_t ProfilePacket_Histogram::ByteSizeLong() const {
1468 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProfilePacket.Histogram)
1469   size_t total_size = 0;
1470 
1471   ::uint32_t cached_has_bits = 0;
1472   // Prevent compiler warnings about cached_has_bits being unused
1473   (void) cached_has_bits;
1474 
1475   // repeated .perfetto.protos.ProfilePacket.Histogram.Bucket buckets = 1;
1476   total_size += 1UL * this->_internal_buckets_size();
1477   for (const auto& msg : this->_impl_.buckets_) {
1478     total_size +=
1479       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1480   }
1481 
1482   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1483     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1484   }
1485   int cached_size = ::_pbi::ToCachedSize(total_size);
1486   SetCachedSize(cached_size);
1487   return total_size;
1488 }
1489 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1490 void ProfilePacket_Histogram::CheckTypeAndMergeFrom(
1491     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1492   MergeFrom(*::_pbi::DownCast<const ProfilePacket_Histogram*>(
1493       &from));
1494 }
1495 
MergeFrom(const ProfilePacket_Histogram & from)1496 void ProfilePacket_Histogram::MergeFrom(const ProfilePacket_Histogram& from) {
1497   ProfilePacket_Histogram* const _this = this;
1498   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProfilePacket.Histogram)
1499   GOOGLE_DCHECK_NE(&from, _this);
1500   ::uint32_t cached_has_bits = 0;
1501   (void) cached_has_bits;
1502 
1503   _this->_impl_.buckets_.MergeFrom(from._impl_.buckets_);
1504   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1505 }
1506 
CopyFrom(const ProfilePacket_Histogram & from)1507 void ProfilePacket_Histogram::CopyFrom(const ProfilePacket_Histogram& from) {
1508 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProfilePacket.Histogram)
1509   if (&from == this) return;
1510   Clear();
1511   MergeFrom(from);
1512 }
1513 
IsInitialized() const1514 bool ProfilePacket_Histogram::IsInitialized() const {
1515   return true;
1516 }
1517 
InternalSwap(ProfilePacket_Histogram * other)1518 void ProfilePacket_Histogram::InternalSwap(ProfilePacket_Histogram* other) {
1519   using std::swap;
1520   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1521   _impl_.buckets_.InternalSwap(&other->_impl_.buckets_);
1522 }
1523 
GetTypeName() const1524 std::string ProfilePacket_Histogram::GetTypeName() const {
1525   return "perfetto.protos.ProfilePacket.Histogram";
1526 }
1527 
1528 
1529 // ===================================================================
1530 
1531 class ProfilePacket_ProcessStats::_Internal {
1532  public:
1533   using HasBits = decltype(std::declval<ProfilePacket_ProcessStats>()._impl_._has_bits_);
set_has_unwinding_errors(HasBits * has_bits)1534   static void set_has_unwinding_errors(HasBits* has_bits) {
1535     (*has_bits)[0] |= 2u;
1536   }
set_has_heap_samples(HasBits * has_bits)1537   static void set_has_heap_samples(HasBits* has_bits) {
1538     (*has_bits)[0] |= 4u;
1539   }
set_has_map_reparses(HasBits * has_bits)1540   static void set_has_map_reparses(HasBits* has_bits) {
1541     (*has_bits)[0] |= 8u;
1542   }
1543   static const ::perfetto::protos::ProfilePacket_Histogram& unwinding_time_us(const ProfilePacket_ProcessStats* msg);
set_has_unwinding_time_us(HasBits * has_bits)1544   static void set_has_unwinding_time_us(HasBits* has_bits) {
1545     (*has_bits)[0] |= 1u;
1546   }
set_has_total_unwinding_time_us(HasBits * has_bits)1547   static void set_has_total_unwinding_time_us(HasBits* has_bits) {
1548     (*has_bits)[0] |= 16u;
1549   }
set_has_client_spinlock_blocked_us(HasBits * has_bits)1550   static void set_has_client_spinlock_blocked_us(HasBits* has_bits) {
1551     (*has_bits)[0] |= 32u;
1552   }
1553 };
1554 
1555 const ::perfetto::protos::ProfilePacket_Histogram&
unwinding_time_us(const ProfilePacket_ProcessStats * msg)1556 ProfilePacket_ProcessStats::_Internal::unwinding_time_us(const ProfilePacket_ProcessStats* msg) {
1557   return *msg->_impl_.unwinding_time_us_;
1558 }
ProfilePacket_ProcessStats(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1559 ProfilePacket_ProcessStats::ProfilePacket_ProcessStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1560                          bool is_message_owned)
1561   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1562   SharedCtor(arena, is_message_owned);
1563   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProfilePacket.ProcessStats)
1564 }
ProfilePacket_ProcessStats(const ProfilePacket_ProcessStats & from)1565 ProfilePacket_ProcessStats::ProfilePacket_ProcessStats(const ProfilePacket_ProcessStats& from)
1566   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1567   ProfilePacket_ProcessStats* const _this = this; (void)_this;
1568   new (&_impl_) Impl_{
1569       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1570     , /*decltype(_impl_._cached_size_)*/{}
1571     , decltype(_impl_.unwinding_time_us_){nullptr}
1572     , decltype(_impl_.unwinding_errors_){}
1573     , decltype(_impl_.heap_samples_){}
1574     , decltype(_impl_.map_reparses_){}
1575     , decltype(_impl_.total_unwinding_time_us_){}
1576     , decltype(_impl_.client_spinlock_blocked_us_){}};
1577 
1578   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1579   if (from._internal_has_unwinding_time_us()) {
1580     _this->_impl_.unwinding_time_us_ = new ::perfetto::protos::ProfilePacket_Histogram(*from._impl_.unwinding_time_us_);
1581   }
1582   ::memcpy(&_impl_.unwinding_errors_, &from._impl_.unwinding_errors_,
1583     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.client_spinlock_blocked_us_) -
1584     reinterpret_cast<char*>(&_impl_.unwinding_errors_)) + sizeof(_impl_.client_spinlock_blocked_us_));
1585   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProfilePacket.ProcessStats)
1586 }
1587 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1588 inline void ProfilePacket_ProcessStats::SharedCtor(
1589     ::_pb::Arena* arena, bool is_message_owned) {
1590   (void)arena;
1591   (void)is_message_owned;
1592   new (&_impl_) Impl_{
1593       decltype(_impl_._has_bits_){}
1594     , /*decltype(_impl_._cached_size_)*/{}
1595     , decltype(_impl_.unwinding_time_us_){nullptr}
1596     , decltype(_impl_.unwinding_errors_){::uint64_t{0u}}
1597     , decltype(_impl_.heap_samples_){::uint64_t{0u}}
1598     , decltype(_impl_.map_reparses_){::uint64_t{0u}}
1599     , decltype(_impl_.total_unwinding_time_us_){::uint64_t{0u}}
1600     , decltype(_impl_.client_spinlock_blocked_us_){::uint64_t{0u}}
1601   };
1602 }
1603 
~ProfilePacket_ProcessStats()1604 ProfilePacket_ProcessStats::~ProfilePacket_ProcessStats() {
1605   // @@protoc_insertion_point(destructor:perfetto.protos.ProfilePacket.ProcessStats)
1606   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1607   (void)arena;
1608     return;
1609   }
1610   SharedDtor();
1611 }
1612 
SharedDtor()1613 inline void ProfilePacket_ProcessStats::SharedDtor() {
1614   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1615   if (this != internal_default_instance()) delete _impl_.unwinding_time_us_;
1616 }
1617 
SetCachedSize(int size) const1618 void ProfilePacket_ProcessStats::SetCachedSize(int size) const {
1619   _impl_._cached_size_.Set(size);
1620 }
1621 
Clear()1622 void ProfilePacket_ProcessStats::Clear() {
1623 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProfilePacket.ProcessStats)
1624   ::uint32_t cached_has_bits = 0;
1625   // Prevent compiler warnings about cached_has_bits being unused
1626   (void) cached_has_bits;
1627 
1628   cached_has_bits = _impl_._has_bits_[0];
1629   if (cached_has_bits & 0x00000001u) {
1630     GOOGLE_DCHECK(_impl_.unwinding_time_us_ != nullptr);
1631     _impl_.unwinding_time_us_->Clear();
1632   }
1633   if (cached_has_bits & 0x0000003eu) {
1634     ::memset(&_impl_.unwinding_errors_, 0, static_cast<size_t>(
1635         reinterpret_cast<char*>(&_impl_.client_spinlock_blocked_us_) -
1636         reinterpret_cast<char*>(&_impl_.unwinding_errors_)) + sizeof(_impl_.client_spinlock_blocked_us_));
1637   }
1638   _impl_._has_bits_.Clear();
1639   _internal_metadata_.Clear<std::string>();
1640 }
1641 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1642 const char* ProfilePacket_ProcessStats::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1643 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1644   _Internal::HasBits has_bits{};
1645   while (!ctx->Done(&ptr)) {
1646     ::uint32_t tag;
1647     ptr = ::_pbi::ReadTag(ptr, &tag);
1648     switch (tag >> 3) {
1649       // optional uint64 unwinding_errors = 1;
1650       case 1:
1651         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1652           _Internal::set_has_unwinding_errors(&has_bits);
1653           _impl_.unwinding_errors_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1654           CHK_(ptr);
1655         } else {
1656           goto handle_unusual;
1657         }
1658         continue;
1659       // optional uint64 heap_samples = 2;
1660       case 2:
1661         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1662           _Internal::set_has_heap_samples(&has_bits);
1663           _impl_.heap_samples_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1664           CHK_(ptr);
1665         } else {
1666           goto handle_unusual;
1667         }
1668         continue;
1669       // optional uint64 map_reparses = 3;
1670       case 3:
1671         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1672           _Internal::set_has_map_reparses(&has_bits);
1673           _impl_.map_reparses_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1674           CHK_(ptr);
1675         } else {
1676           goto handle_unusual;
1677         }
1678         continue;
1679       // optional .perfetto.protos.ProfilePacket.Histogram unwinding_time_us = 4;
1680       case 4:
1681         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1682           ptr = ctx->ParseMessage(_internal_mutable_unwinding_time_us(), ptr);
1683           CHK_(ptr);
1684         } else {
1685           goto handle_unusual;
1686         }
1687         continue;
1688       // optional uint64 total_unwinding_time_us = 5;
1689       case 5:
1690         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1691           _Internal::set_has_total_unwinding_time_us(&has_bits);
1692           _impl_.total_unwinding_time_us_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1693           CHK_(ptr);
1694         } else {
1695           goto handle_unusual;
1696         }
1697         continue;
1698       // optional uint64 client_spinlock_blocked_us = 6;
1699       case 6:
1700         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1701           _Internal::set_has_client_spinlock_blocked_us(&has_bits);
1702           _impl_.client_spinlock_blocked_us_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1703           CHK_(ptr);
1704         } else {
1705           goto handle_unusual;
1706         }
1707         continue;
1708       default:
1709         goto handle_unusual;
1710     }  // switch
1711   handle_unusual:
1712     if ((tag == 0) || ((tag & 7) == 4)) {
1713       CHK_(ptr);
1714       ctx->SetLastTag(tag);
1715       goto message_done;
1716     }
1717     ptr = UnknownFieldParse(
1718         tag,
1719         _internal_metadata_.mutable_unknown_fields<std::string>(),
1720         ptr, ctx);
1721     CHK_(ptr != nullptr);
1722   }  // while
1723 message_done:
1724   _impl_._has_bits_.Or(has_bits);
1725   return ptr;
1726 failure:
1727   ptr = nullptr;
1728   goto message_done;
1729 #undef CHK_
1730 }
1731 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1732 ::uint8_t* ProfilePacket_ProcessStats::_InternalSerialize(
1733     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1734   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProfilePacket.ProcessStats)
1735   ::uint32_t cached_has_bits = 0;
1736   (void) cached_has_bits;
1737 
1738   cached_has_bits = _impl_._has_bits_[0];
1739   // optional uint64 unwinding_errors = 1;
1740   if (cached_has_bits & 0x00000002u) {
1741     target = stream->EnsureSpace(target);
1742     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_unwinding_errors(), target);
1743   }
1744 
1745   // optional uint64 heap_samples = 2;
1746   if (cached_has_bits & 0x00000004u) {
1747     target = stream->EnsureSpace(target);
1748     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_heap_samples(), target);
1749   }
1750 
1751   // optional uint64 map_reparses = 3;
1752   if (cached_has_bits & 0x00000008u) {
1753     target = stream->EnsureSpace(target);
1754     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_map_reparses(), target);
1755   }
1756 
1757   // optional .perfetto.protos.ProfilePacket.Histogram unwinding_time_us = 4;
1758   if (cached_has_bits & 0x00000001u) {
1759     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1760       InternalWriteMessage(4, _Internal::unwinding_time_us(this),
1761         _Internal::unwinding_time_us(this).GetCachedSize(), target, stream);
1762   }
1763 
1764   // optional uint64 total_unwinding_time_us = 5;
1765   if (cached_has_bits & 0x00000010u) {
1766     target = stream->EnsureSpace(target);
1767     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_total_unwinding_time_us(), target);
1768   }
1769 
1770   // optional uint64 client_spinlock_blocked_us = 6;
1771   if (cached_has_bits & 0x00000020u) {
1772     target = stream->EnsureSpace(target);
1773     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_client_spinlock_blocked_us(), target);
1774   }
1775 
1776   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1777     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1778         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1779   }
1780   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProfilePacket.ProcessStats)
1781   return target;
1782 }
1783 
ByteSizeLong() const1784 size_t ProfilePacket_ProcessStats::ByteSizeLong() const {
1785 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProfilePacket.ProcessStats)
1786   size_t total_size = 0;
1787 
1788   ::uint32_t cached_has_bits = 0;
1789   // Prevent compiler warnings about cached_has_bits being unused
1790   (void) cached_has_bits;
1791 
1792   cached_has_bits = _impl_._has_bits_[0];
1793   if (cached_has_bits & 0x0000003fu) {
1794     // optional .perfetto.protos.ProfilePacket.Histogram unwinding_time_us = 4;
1795     if (cached_has_bits & 0x00000001u) {
1796       total_size += 1 +
1797         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1798           *_impl_.unwinding_time_us_);
1799     }
1800 
1801     // optional uint64 unwinding_errors = 1;
1802     if (cached_has_bits & 0x00000002u) {
1803       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_unwinding_errors());
1804     }
1805 
1806     // optional uint64 heap_samples = 2;
1807     if (cached_has_bits & 0x00000004u) {
1808       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_heap_samples());
1809     }
1810 
1811     // optional uint64 map_reparses = 3;
1812     if (cached_has_bits & 0x00000008u) {
1813       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_map_reparses());
1814     }
1815 
1816     // optional uint64 total_unwinding_time_us = 5;
1817     if (cached_has_bits & 0x00000010u) {
1818       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_total_unwinding_time_us());
1819     }
1820 
1821     // optional uint64 client_spinlock_blocked_us = 6;
1822     if (cached_has_bits & 0x00000020u) {
1823       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_client_spinlock_blocked_us());
1824     }
1825 
1826   }
1827   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1828     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1829   }
1830   int cached_size = ::_pbi::ToCachedSize(total_size);
1831   SetCachedSize(cached_size);
1832   return total_size;
1833 }
1834 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1835 void ProfilePacket_ProcessStats::CheckTypeAndMergeFrom(
1836     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1837   MergeFrom(*::_pbi::DownCast<const ProfilePacket_ProcessStats*>(
1838       &from));
1839 }
1840 
MergeFrom(const ProfilePacket_ProcessStats & from)1841 void ProfilePacket_ProcessStats::MergeFrom(const ProfilePacket_ProcessStats& from) {
1842   ProfilePacket_ProcessStats* const _this = this;
1843   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProfilePacket.ProcessStats)
1844   GOOGLE_DCHECK_NE(&from, _this);
1845   ::uint32_t cached_has_bits = 0;
1846   (void) cached_has_bits;
1847 
1848   cached_has_bits = from._impl_._has_bits_[0];
1849   if (cached_has_bits & 0x0000003fu) {
1850     if (cached_has_bits & 0x00000001u) {
1851       _this->_internal_mutable_unwinding_time_us()->::perfetto::protos::ProfilePacket_Histogram::MergeFrom(
1852           from._internal_unwinding_time_us());
1853     }
1854     if (cached_has_bits & 0x00000002u) {
1855       _this->_impl_.unwinding_errors_ = from._impl_.unwinding_errors_;
1856     }
1857     if (cached_has_bits & 0x00000004u) {
1858       _this->_impl_.heap_samples_ = from._impl_.heap_samples_;
1859     }
1860     if (cached_has_bits & 0x00000008u) {
1861       _this->_impl_.map_reparses_ = from._impl_.map_reparses_;
1862     }
1863     if (cached_has_bits & 0x00000010u) {
1864       _this->_impl_.total_unwinding_time_us_ = from._impl_.total_unwinding_time_us_;
1865     }
1866     if (cached_has_bits & 0x00000020u) {
1867       _this->_impl_.client_spinlock_blocked_us_ = from._impl_.client_spinlock_blocked_us_;
1868     }
1869     _this->_impl_._has_bits_[0] |= cached_has_bits;
1870   }
1871   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1872 }
1873 
CopyFrom(const ProfilePacket_ProcessStats & from)1874 void ProfilePacket_ProcessStats::CopyFrom(const ProfilePacket_ProcessStats& from) {
1875 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProfilePacket.ProcessStats)
1876   if (&from == this) return;
1877   Clear();
1878   MergeFrom(from);
1879 }
1880 
IsInitialized() const1881 bool ProfilePacket_ProcessStats::IsInitialized() const {
1882   return true;
1883 }
1884 
InternalSwap(ProfilePacket_ProcessStats * other)1885 void ProfilePacket_ProcessStats::InternalSwap(ProfilePacket_ProcessStats* other) {
1886   using std::swap;
1887   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1888   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1889   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1890       PROTOBUF_FIELD_OFFSET(ProfilePacket_ProcessStats, _impl_.client_spinlock_blocked_us_)
1891       + sizeof(ProfilePacket_ProcessStats::_impl_.client_spinlock_blocked_us_)  // NOLINT
1892       - PROTOBUF_FIELD_OFFSET(ProfilePacket_ProcessStats, _impl_.unwinding_time_us_)>(
1893           reinterpret_cast<char*>(&_impl_.unwinding_time_us_),
1894           reinterpret_cast<char*>(&other->_impl_.unwinding_time_us_));
1895 }
1896 
GetTypeName() const1897 std::string ProfilePacket_ProcessStats::GetTypeName() const {
1898   return "perfetto.protos.ProfilePacket.ProcessStats";
1899 }
1900 
1901 
1902 // ===================================================================
1903 
1904 class ProfilePacket_ProcessHeapSamples::_Internal {
1905  public:
1906   using HasBits = decltype(std::declval<ProfilePacket_ProcessHeapSamples>()._impl_._has_bits_);
set_has_pid(HasBits * has_bits)1907   static void set_has_pid(HasBits* has_bits) {
1908     (*has_bits)[0] |= 4u;
1909   }
set_has_from_startup(HasBits * has_bits)1910   static void set_has_from_startup(HasBits* has_bits) {
1911     (*has_bits)[0] |= 8u;
1912   }
set_has_rejected_concurrent(HasBits * has_bits)1913   static void set_has_rejected_concurrent(HasBits* has_bits) {
1914     (*has_bits)[0] |= 16u;
1915   }
set_has_disconnected(HasBits * has_bits)1916   static void set_has_disconnected(HasBits* has_bits) {
1917     (*has_bits)[0] |= 32u;
1918   }
set_has_buffer_overran(HasBits * has_bits)1919   static void set_has_buffer_overran(HasBits* has_bits) {
1920     (*has_bits)[0] |= 64u;
1921   }
set_has_client_error(HasBits * has_bits)1922   static void set_has_client_error(HasBits* has_bits) {
1923     (*has_bits)[0] |= 4096u;
1924   }
set_has_buffer_corrupted(HasBits * has_bits)1925   static void set_has_buffer_corrupted(HasBits* has_bits) {
1926     (*has_bits)[0] |= 128u;
1927   }
set_has_hit_guardrail(HasBits * has_bits)1928   static void set_has_hit_guardrail(HasBits* has_bits) {
1929     (*has_bits)[0] |= 256u;
1930   }
set_has_heap_name(HasBits * has_bits)1931   static void set_has_heap_name(HasBits* has_bits) {
1932     (*has_bits)[0] |= 1u;
1933   }
set_has_sampling_interval_bytes(HasBits * has_bits)1934   static void set_has_sampling_interval_bytes(HasBits* has_bits) {
1935     (*has_bits)[0] |= 1024u;
1936   }
set_has_orig_sampling_interval_bytes(HasBits * has_bits)1937   static void set_has_orig_sampling_interval_bytes(HasBits* has_bits) {
1938     (*has_bits)[0] |= 2048u;
1939   }
set_has_timestamp(HasBits * has_bits)1940   static void set_has_timestamp(HasBits* has_bits) {
1941     (*has_bits)[0] |= 512u;
1942   }
1943   static const ::perfetto::protos::ProfilePacket_ProcessStats& stats(const ProfilePacket_ProcessHeapSamples* msg);
set_has_stats(HasBits * has_bits)1944   static void set_has_stats(HasBits* has_bits) {
1945     (*has_bits)[0] |= 2u;
1946   }
1947 };
1948 
1949 const ::perfetto::protos::ProfilePacket_ProcessStats&
stats(const ProfilePacket_ProcessHeapSamples * msg)1950 ProfilePacket_ProcessHeapSamples::_Internal::stats(const ProfilePacket_ProcessHeapSamples* msg) {
1951   return *msg->_impl_.stats_;
1952 }
ProfilePacket_ProcessHeapSamples(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1953 ProfilePacket_ProcessHeapSamples::ProfilePacket_ProcessHeapSamples(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1954                          bool is_message_owned)
1955   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1956   SharedCtor(arena, is_message_owned);
1957   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProfilePacket.ProcessHeapSamples)
1958 }
ProfilePacket_ProcessHeapSamples(const ProfilePacket_ProcessHeapSamples & from)1959 ProfilePacket_ProcessHeapSamples::ProfilePacket_ProcessHeapSamples(const ProfilePacket_ProcessHeapSamples& from)
1960   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1961   ProfilePacket_ProcessHeapSamples* const _this = this; (void)_this;
1962   new (&_impl_) Impl_{
1963       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1964     , /*decltype(_impl_._cached_size_)*/{}
1965     , decltype(_impl_.samples_){from._impl_.samples_}
1966     , decltype(_impl_.heap_name_){}
1967     , decltype(_impl_.stats_){nullptr}
1968     , decltype(_impl_.pid_){}
1969     , decltype(_impl_.from_startup_){}
1970     , decltype(_impl_.rejected_concurrent_){}
1971     , decltype(_impl_.disconnected_){}
1972     , decltype(_impl_.buffer_overran_){}
1973     , decltype(_impl_.buffer_corrupted_){}
1974     , decltype(_impl_.hit_guardrail_){}
1975     , decltype(_impl_.timestamp_){}
1976     , decltype(_impl_.sampling_interval_bytes_){}
1977     , decltype(_impl_.orig_sampling_interval_bytes_){}
1978     , decltype(_impl_.client_error_){}};
1979 
1980   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1981   _impl_.heap_name_.InitDefault();
1982   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1983     _impl_.heap_name_.Set("", GetArenaForAllocation());
1984   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1985   if (from._internal_has_heap_name()) {
1986     _this->_impl_.heap_name_.Set(from._internal_heap_name(),
1987       _this->GetArenaForAllocation());
1988   }
1989   if (from._internal_has_stats()) {
1990     _this->_impl_.stats_ = new ::perfetto::protos::ProfilePacket_ProcessStats(*from._impl_.stats_);
1991   }
1992   ::memcpy(&_impl_.pid_, &from._impl_.pid_,
1993     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.client_error_) -
1994     reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.client_error_));
1995   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProfilePacket.ProcessHeapSamples)
1996 }
1997 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1998 inline void ProfilePacket_ProcessHeapSamples::SharedCtor(
1999     ::_pb::Arena* arena, bool is_message_owned) {
2000   (void)arena;
2001   (void)is_message_owned;
2002   new (&_impl_) Impl_{
2003       decltype(_impl_._has_bits_){}
2004     , /*decltype(_impl_._cached_size_)*/{}
2005     , decltype(_impl_.samples_){arena}
2006     , decltype(_impl_.heap_name_){}
2007     , decltype(_impl_.stats_){nullptr}
2008     , decltype(_impl_.pid_){::uint64_t{0u}}
2009     , decltype(_impl_.from_startup_){false}
2010     , decltype(_impl_.rejected_concurrent_){false}
2011     , decltype(_impl_.disconnected_){false}
2012     , decltype(_impl_.buffer_overran_){false}
2013     , decltype(_impl_.buffer_corrupted_){false}
2014     , decltype(_impl_.hit_guardrail_){false}
2015     , decltype(_impl_.timestamp_){::uint64_t{0u}}
2016     , decltype(_impl_.sampling_interval_bytes_){::uint64_t{0u}}
2017     , decltype(_impl_.orig_sampling_interval_bytes_){::uint64_t{0u}}
2018     , decltype(_impl_.client_error_){0}
2019   };
2020   _impl_.heap_name_.InitDefault();
2021   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2022     _impl_.heap_name_.Set("", GetArenaForAllocation());
2023   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2024 }
2025 
~ProfilePacket_ProcessHeapSamples()2026 ProfilePacket_ProcessHeapSamples::~ProfilePacket_ProcessHeapSamples() {
2027   // @@protoc_insertion_point(destructor:perfetto.protos.ProfilePacket.ProcessHeapSamples)
2028   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2029   (void)arena;
2030     return;
2031   }
2032   SharedDtor();
2033 }
2034 
SharedDtor()2035 inline void ProfilePacket_ProcessHeapSamples::SharedDtor() {
2036   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2037   _impl_.samples_.~RepeatedPtrField();
2038   _impl_.heap_name_.Destroy();
2039   if (this != internal_default_instance()) delete _impl_.stats_;
2040 }
2041 
SetCachedSize(int size) const2042 void ProfilePacket_ProcessHeapSamples::SetCachedSize(int size) const {
2043   _impl_._cached_size_.Set(size);
2044 }
2045 
Clear()2046 void ProfilePacket_ProcessHeapSamples::Clear() {
2047 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProfilePacket.ProcessHeapSamples)
2048   ::uint32_t cached_has_bits = 0;
2049   // Prevent compiler warnings about cached_has_bits being unused
2050   (void) cached_has_bits;
2051 
2052   _impl_.samples_.Clear();
2053   cached_has_bits = _impl_._has_bits_[0];
2054   if (cached_has_bits & 0x00000003u) {
2055     if (cached_has_bits & 0x00000001u) {
2056       _impl_.heap_name_.ClearNonDefaultToEmpty();
2057     }
2058     if (cached_has_bits & 0x00000002u) {
2059       GOOGLE_DCHECK(_impl_.stats_ != nullptr);
2060       _impl_.stats_->Clear();
2061     }
2062   }
2063   if (cached_has_bits & 0x000000fcu) {
2064     ::memset(&_impl_.pid_, 0, static_cast<size_t>(
2065         reinterpret_cast<char*>(&_impl_.buffer_corrupted_) -
2066         reinterpret_cast<char*>(&_impl_.pid_)) + sizeof(_impl_.buffer_corrupted_));
2067   }
2068   if (cached_has_bits & 0x00001f00u) {
2069     ::memset(&_impl_.hit_guardrail_, 0, static_cast<size_t>(
2070         reinterpret_cast<char*>(&_impl_.client_error_) -
2071         reinterpret_cast<char*>(&_impl_.hit_guardrail_)) + sizeof(_impl_.client_error_));
2072   }
2073   _impl_._has_bits_.Clear();
2074   _internal_metadata_.Clear<std::string>();
2075 }
2076 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2077 const char* ProfilePacket_ProcessHeapSamples::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2078 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2079   _Internal::HasBits has_bits{};
2080   while (!ctx->Done(&ptr)) {
2081     ::uint32_t tag;
2082     ptr = ::_pbi::ReadTag(ptr, &tag);
2083     switch (tag >> 3) {
2084       // optional uint64 pid = 1;
2085       case 1:
2086         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2087           _Internal::set_has_pid(&has_bits);
2088           _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2089           CHK_(ptr);
2090         } else {
2091           goto handle_unusual;
2092         }
2093         continue;
2094       // repeated .perfetto.protos.ProfilePacket.HeapSample samples = 2;
2095       case 2:
2096         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2097           ptr -= 1;
2098           do {
2099             ptr += 1;
2100             ptr = ctx->ParseMessage(_internal_add_samples(), ptr);
2101             CHK_(ptr);
2102             if (!ctx->DataAvailable(ptr)) break;
2103           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
2104         } else {
2105           goto handle_unusual;
2106         }
2107         continue;
2108       // optional bool from_startup = 3;
2109       case 3:
2110         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2111           _Internal::set_has_from_startup(&has_bits);
2112           _impl_.from_startup_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2113           CHK_(ptr);
2114         } else {
2115           goto handle_unusual;
2116         }
2117         continue;
2118       // optional bool rejected_concurrent = 4;
2119       case 4:
2120         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2121           _Internal::set_has_rejected_concurrent(&has_bits);
2122           _impl_.rejected_concurrent_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2123           CHK_(ptr);
2124         } else {
2125           goto handle_unusual;
2126         }
2127         continue;
2128       // optional .perfetto.protos.ProfilePacket.ProcessStats stats = 5;
2129       case 5:
2130         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2131           ptr = ctx->ParseMessage(_internal_mutable_stats(), ptr);
2132           CHK_(ptr);
2133         } else {
2134           goto handle_unusual;
2135         }
2136         continue;
2137       // optional bool disconnected = 6;
2138       case 6:
2139         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2140           _Internal::set_has_disconnected(&has_bits);
2141           _impl_.disconnected_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2142           CHK_(ptr);
2143         } else {
2144           goto handle_unusual;
2145         }
2146         continue;
2147       // optional bool buffer_overran = 7;
2148       case 7:
2149         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2150           _Internal::set_has_buffer_overran(&has_bits);
2151           _impl_.buffer_overran_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2152           CHK_(ptr);
2153         } else {
2154           goto handle_unusual;
2155         }
2156         continue;
2157       // optional bool buffer_corrupted = 8;
2158       case 8:
2159         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
2160           _Internal::set_has_buffer_corrupted(&has_bits);
2161           _impl_.buffer_corrupted_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2162           CHK_(ptr);
2163         } else {
2164           goto handle_unusual;
2165         }
2166         continue;
2167       // optional uint64 timestamp = 9;
2168       case 9:
2169         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2170           _Internal::set_has_timestamp(&has_bits);
2171           _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2172           CHK_(ptr);
2173         } else {
2174           goto handle_unusual;
2175         }
2176         continue;
2177       // optional bool hit_guardrail = 10;
2178       case 10:
2179         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
2180           _Internal::set_has_hit_guardrail(&has_bits);
2181           _impl_.hit_guardrail_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2182           CHK_(ptr);
2183         } else {
2184           goto handle_unusual;
2185         }
2186         continue;
2187       // optional string heap_name = 11;
2188       case 11:
2189         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
2190           auto str = _internal_mutable_heap_name();
2191           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2192           CHK_(ptr);
2193         } else {
2194           goto handle_unusual;
2195         }
2196         continue;
2197       // optional uint64 sampling_interval_bytes = 12;
2198       case 12:
2199         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
2200           _Internal::set_has_sampling_interval_bytes(&has_bits);
2201           _impl_.sampling_interval_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2202           CHK_(ptr);
2203         } else {
2204           goto handle_unusual;
2205         }
2206         continue;
2207       // optional uint64 orig_sampling_interval_bytes = 13;
2208       case 13:
2209         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
2210           _Internal::set_has_orig_sampling_interval_bytes(&has_bits);
2211           _impl_.orig_sampling_interval_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2212           CHK_(ptr);
2213         } else {
2214           goto handle_unusual;
2215         }
2216         continue;
2217       // optional .perfetto.protos.ProfilePacket.ProcessHeapSamples.ClientError client_error = 14;
2218       case 14:
2219         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
2220           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2221           CHK_(ptr);
2222           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::ProfilePacket_ProcessHeapSamples_ClientError_IsValid(val))) {
2223             _internal_set_client_error(static_cast<::perfetto::protos::ProfilePacket_ProcessHeapSamples_ClientError>(val));
2224           } else {
2225             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(14, val, mutable_unknown_fields());
2226           }
2227         } else {
2228           goto handle_unusual;
2229         }
2230         continue;
2231       default:
2232         goto handle_unusual;
2233     }  // switch
2234   handle_unusual:
2235     if ((tag == 0) || ((tag & 7) == 4)) {
2236       CHK_(ptr);
2237       ctx->SetLastTag(tag);
2238       goto message_done;
2239     }
2240     ptr = UnknownFieldParse(
2241         tag,
2242         _internal_metadata_.mutable_unknown_fields<std::string>(),
2243         ptr, ctx);
2244     CHK_(ptr != nullptr);
2245   }  // while
2246 message_done:
2247   _impl_._has_bits_.Or(has_bits);
2248   return ptr;
2249 failure:
2250   ptr = nullptr;
2251   goto message_done;
2252 #undef CHK_
2253 }
2254 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2255 ::uint8_t* ProfilePacket_ProcessHeapSamples::_InternalSerialize(
2256     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2257   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProfilePacket.ProcessHeapSamples)
2258   ::uint32_t cached_has_bits = 0;
2259   (void) cached_has_bits;
2260 
2261   cached_has_bits = _impl_._has_bits_[0];
2262   // optional uint64 pid = 1;
2263   if (cached_has_bits & 0x00000004u) {
2264     target = stream->EnsureSpace(target);
2265     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_pid(), target);
2266   }
2267 
2268   // repeated .perfetto.protos.ProfilePacket.HeapSample samples = 2;
2269   for (unsigned i = 0,
2270       n = static_cast<unsigned>(this->_internal_samples_size()); i < n; i++) {
2271     const auto& repfield = this->_internal_samples(i);
2272     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2273         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
2274   }
2275 
2276   // optional bool from_startup = 3;
2277   if (cached_has_bits & 0x00000008u) {
2278     target = stream->EnsureSpace(target);
2279     target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_from_startup(), target);
2280   }
2281 
2282   // optional bool rejected_concurrent = 4;
2283   if (cached_has_bits & 0x00000010u) {
2284     target = stream->EnsureSpace(target);
2285     target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_rejected_concurrent(), target);
2286   }
2287 
2288   // optional .perfetto.protos.ProfilePacket.ProcessStats stats = 5;
2289   if (cached_has_bits & 0x00000002u) {
2290     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2291       InternalWriteMessage(5, _Internal::stats(this),
2292         _Internal::stats(this).GetCachedSize(), target, stream);
2293   }
2294 
2295   // optional bool disconnected = 6;
2296   if (cached_has_bits & 0x00000020u) {
2297     target = stream->EnsureSpace(target);
2298     target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_disconnected(), target);
2299   }
2300 
2301   // optional bool buffer_overran = 7;
2302   if (cached_has_bits & 0x00000040u) {
2303     target = stream->EnsureSpace(target);
2304     target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_buffer_overran(), target);
2305   }
2306 
2307   // optional bool buffer_corrupted = 8;
2308   if (cached_has_bits & 0x00000080u) {
2309     target = stream->EnsureSpace(target);
2310     target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_buffer_corrupted(), target);
2311   }
2312 
2313   // optional uint64 timestamp = 9;
2314   if (cached_has_bits & 0x00000200u) {
2315     target = stream->EnsureSpace(target);
2316     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(9, this->_internal_timestamp(), target);
2317   }
2318 
2319   // optional bool hit_guardrail = 10;
2320   if (cached_has_bits & 0x00000100u) {
2321     target = stream->EnsureSpace(target);
2322     target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_hit_guardrail(), target);
2323   }
2324 
2325   // optional string heap_name = 11;
2326   if (cached_has_bits & 0x00000001u) {
2327     target = stream->WriteStringMaybeAliased(
2328         11, this->_internal_heap_name(), target);
2329   }
2330 
2331   // optional uint64 sampling_interval_bytes = 12;
2332   if (cached_has_bits & 0x00000400u) {
2333     target = stream->EnsureSpace(target);
2334     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(12, this->_internal_sampling_interval_bytes(), target);
2335   }
2336 
2337   // optional uint64 orig_sampling_interval_bytes = 13;
2338   if (cached_has_bits & 0x00000800u) {
2339     target = stream->EnsureSpace(target);
2340     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(13, this->_internal_orig_sampling_interval_bytes(), target);
2341   }
2342 
2343   // optional .perfetto.protos.ProfilePacket.ProcessHeapSamples.ClientError client_error = 14;
2344   if (cached_has_bits & 0x00001000u) {
2345     target = stream->EnsureSpace(target);
2346     target = ::_pbi::WireFormatLite::WriteEnumToArray(
2347       14, this->_internal_client_error(), target);
2348   }
2349 
2350   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2351     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2352         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2353   }
2354   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProfilePacket.ProcessHeapSamples)
2355   return target;
2356 }
2357 
ByteSizeLong() const2358 size_t ProfilePacket_ProcessHeapSamples::ByteSizeLong() const {
2359 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProfilePacket.ProcessHeapSamples)
2360   size_t total_size = 0;
2361 
2362   ::uint32_t cached_has_bits = 0;
2363   // Prevent compiler warnings about cached_has_bits being unused
2364   (void) cached_has_bits;
2365 
2366   // repeated .perfetto.protos.ProfilePacket.HeapSample samples = 2;
2367   total_size += 1UL * this->_internal_samples_size();
2368   for (const auto& msg : this->_impl_.samples_) {
2369     total_size +=
2370       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2371   }
2372 
2373   cached_has_bits = _impl_._has_bits_[0];
2374   if (cached_has_bits & 0x000000ffu) {
2375     // optional string heap_name = 11;
2376     if (cached_has_bits & 0x00000001u) {
2377       total_size += 1 +
2378         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2379           this->_internal_heap_name());
2380     }
2381 
2382     // optional .perfetto.protos.ProfilePacket.ProcessStats stats = 5;
2383     if (cached_has_bits & 0x00000002u) {
2384       total_size += 1 +
2385         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2386           *_impl_.stats_);
2387     }
2388 
2389     // optional uint64 pid = 1;
2390     if (cached_has_bits & 0x00000004u) {
2391       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_pid());
2392     }
2393 
2394     // optional bool from_startup = 3;
2395     if (cached_has_bits & 0x00000008u) {
2396       total_size += 1 + 1;
2397     }
2398 
2399     // optional bool rejected_concurrent = 4;
2400     if (cached_has_bits & 0x00000010u) {
2401       total_size += 1 + 1;
2402     }
2403 
2404     // optional bool disconnected = 6;
2405     if (cached_has_bits & 0x00000020u) {
2406       total_size += 1 + 1;
2407     }
2408 
2409     // optional bool buffer_overran = 7;
2410     if (cached_has_bits & 0x00000040u) {
2411       total_size += 1 + 1;
2412     }
2413 
2414     // optional bool buffer_corrupted = 8;
2415     if (cached_has_bits & 0x00000080u) {
2416       total_size += 1 + 1;
2417     }
2418 
2419   }
2420   if (cached_has_bits & 0x00001f00u) {
2421     // optional bool hit_guardrail = 10;
2422     if (cached_has_bits & 0x00000100u) {
2423       total_size += 1 + 1;
2424     }
2425 
2426     // optional uint64 timestamp = 9;
2427     if (cached_has_bits & 0x00000200u) {
2428       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_timestamp());
2429     }
2430 
2431     // optional uint64 sampling_interval_bytes = 12;
2432     if (cached_has_bits & 0x00000400u) {
2433       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_sampling_interval_bytes());
2434     }
2435 
2436     // optional uint64 orig_sampling_interval_bytes = 13;
2437     if (cached_has_bits & 0x00000800u) {
2438       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_orig_sampling_interval_bytes());
2439     }
2440 
2441     // optional .perfetto.protos.ProfilePacket.ProcessHeapSamples.ClientError client_error = 14;
2442     if (cached_has_bits & 0x00001000u) {
2443       total_size += 1 +
2444         ::_pbi::WireFormatLite::EnumSize(this->_internal_client_error());
2445     }
2446 
2447   }
2448   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2449     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2450   }
2451   int cached_size = ::_pbi::ToCachedSize(total_size);
2452   SetCachedSize(cached_size);
2453   return total_size;
2454 }
2455 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2456 void ProfilePacket_ProcessHeapSamples::CheckTypeAndMergeFrom(
2457     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2458   MergeFrom(*::_pbi::DownCast<const ProfilePacket_ProcessHeapSamples*>(
2459       &from));
2460 }
2461 
MergeFrom(const ProfilePacket_ProcessHeapSamples & from)2462 void ProfilePacket_ProcessHeapSamples::MergeFrom(const ProfilePacket_ProcessHeapSamples& from) {
2463   ProfilePacket_ProcessHeapSamples* const _this = this;
2464   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProfilePacket.ProcessHeapSamples)
2465   GOOGLE_DCHECK_NE(&from, _this);
2466   ::uint32_t cached_has_bits = 0;
2467   (void) cached_has_bits;
2468 
2469   _this->_impl_.samples_.MergeFrom(from._impl_.samples_);
2470   cached_has_bits = from._impl_._has_bits_[0];
2471   if (cached_has_bits & 0x000000ffu) {
2472     if (cached_has_bits & 0x00000001u) {
2473       _this->_internal_set_heap_name(from._internal_heap_name());
2474     }
2475     if (cached_has_bits & 0x00000002u) {
2476       _this->_internal_mutable_stats()->::perfetto::protos::ProfilePacket_ProcessStats::MergeFrom(
2477           from._internal_stats());
2478     }
2479     if (cached_has_bits & 0x00000004u) {
2480       _this->_impl_.pid_ = from._impl_.pid_;
2481     }
2482     if (cached_has_bits & 0x00000008u) {
2483       _this->_impl_.from_startup_ = from._impl_.from_startup_;
2484     }
2485     if (cached_has_bits & 0x00000010u) {
2486       _this->_impl_.rejected_concurrent_ = from._impl_.rejected_concurrent_;
2487     }
2488     if (cached_has_bits & 0x00000020u) {
2489       _this->_impl_.disconnected_ = from._impl_.disconnected_;
2490     }
2491     if (cached_has_bits & 0x00000040u) {
2492       _this->_impl_.buffer_overran_ = from._impl_.buffer_overran_;
2493     }
2494     if (cached_has_bits & 0x00000080u) {
2495       _this->_impl_.buffer_corrupted_ = from._impl_.buffer_corrupted_;
2496     }
2497     _this->_impl_._has_bits_[0] |= cached_has_bits;
2498   }
2499   if (cached_has_bits & 0x00001f00u) {
2500     if (cached_has_bits & 0x00000100u) {
2501       _this->_impl_.hit_guardrail_ = from._impl_.hit_guardrail_;
2502     }
2503     if (cached_has_bits & 0x00000200u) {
2504       _this->_impl_.timestamp_ = from._impl_.timestamp_;
2505     }
2506     if (cached_has_bits & 0x00000400u) {
2507       _this->_impl_.sampling_interval_bytes_ = from._impl_.sampling_interval_bytes_;
2508     }
2509     if (cached_has_bits & 0x00000800u) {
2510       _this->_impl_.orig_sampling_interval_bytes_ = from._impl_.orig_sampling_interval_bytes_;
2511     }
2512     if (cached_has_bits & 0x00001000u) {
2513       _this->_impl_.client_error_ = from._impl_.client_error_;
2514     }
2515     _this->_impl_._has_bits_[0] |= cached_has_bits;
2516   }
2517   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2518 }
2519 
CopyFrom(const ProfilePacket_ProcessHeapSamples & from)2520 void ProfilePacket_ProcessHeapSamples::CopyFrom(const ProfilePacket_ProcessHeapSamples& from) {
2521 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProfilePacket.ProcessHeapSamples)
2522   if (&from == this) return;
2523   Clear();
2524   MergeFrom(from);
2525 }
2526 
IsInitialized() const2527 bool ProfilePacket_ProcessHeapSamples::IsInitialized() const {
2528   return true;
2529 }
2530 
InternalSwap(ProfilePacket_ProcessHeapSamples * other)2531 void ProfilePacket_ProcessHeapSamples::InternalSwap(ProfilePacket_ProcessHeapSamples* other) {
2532   using std::swap;
2533   auto* lhs_arena = GetArenaForAllocation();
2534   auto* rhs_arena = other->GetArenaForAllocation();
2535   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2536   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2537   _impl_.samples_.InternalSwap(&other->_impl_.samples_);
2538   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2539       &_impl_.heap_name_, lhs_arena,
2540       &other->_impl_.heap_name_, rhs_arena
2541   );
2542   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2543       PROTOBUF_FIELD_OFFSET(ProfilePacket_ProcessHeapSamples, _impl_.client_error_)
2544       + sizeof(ProfilePacket_ProcessHeapSamples::_impl_.client_error_)  // NOLINT
2545       - PROTOBUF_FIELD_OFFSET(ProfilePacket_ProcessHeapSamples, _impl_.stats_)>(
2546           reinterpret_cast<char*>(&_impl_.stats_),
2547           reinterpret_cast<char*>(&other->_impl_.stats_));
2548 }
2549 
GetTypeName() const2550 std::string ProfilePacket_ProcessHeapSamples::GetTypeName() const {
2551   return "perfetto.protos.ProfilePacket.ProcessHeapSamples";
2552 }
2553 
2554 
2555 // ===================================================================
2556 
2557 class ProfilePacket::_Internal {
2558  public:
2559   using HasBits = decltype(std::declval<ProfilePacket>()._impl_._has_bits_);
set_has_continued(HasBits * has_bits)2560   static void set_has_continued(HasBits* has_bits) {
2561     (*has_bits)[0] |= 2u;
2562   }
set_has_index(HasBits * has_bits)2563   static void set_has_index(HasBits* has_bits) {
2564     (*has_bits)[0] |= 1u;
2565   }
2566 };
2567 
clear_strings()2568 void ProfilePacket::clear_strings() {
2569   _impl_.strings_.Clear();
2570 }
clear_mappings()2571 void ProfilePacket::clear_mappings() {
2572   _impl_.mappings_.Clear();
2573 }
clear_frames()2574 void ProfilePacket::clear_frames() {
2575   _impl_.frames_.Clear();
2576 }
clear_callstacks()2577 void ProfilePacket::clear_callstacks() {
2578   _impl_.callstacks_.Clear();
2579 }
ProfilePacket(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2580 ProfilePacket::ProfilePacket(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2581                          bool is_message_owned)
2582   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2583   SharedCtor(arena, is_message_owned);
2584   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ProfilePacket)
2585 }
ProfilePacket(const ProfilePacket & from)2586 ProfilePacket::ProfilePacket(const ProfilePacket& from)
2587   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2588   ProfilePacket* const _this = this; (void)_this;
2589   new (&_impl_) Impl_{
2590       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2591     , /*decltype(_impl_._cached_size_)*/{}
2592     , decltype(_impl_.strings_){from._impl_.strings_}
2593     , decltype(_impl_.frames_){from._impl_.frames_}
2594     , decltype(_impl_.callstacks_){from._impl_.callstacks_}
2595     , decltype(_impl_.mappings_){from._impl_.mappings_}
2596     , decltype(_impl_.process_dumps_){from._impl_.process_dumps_}
2597     , decltype(_impl_.index_){}
2598     , decltype(_impl_.continued_){}};
2599 
2600   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2601   ::memcpy(&_impl_.index_, &from._impl_.index_,
2602     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.continued_) -
2603     reinterpret_cast<char*>(&_impl_.index_)) + sizeof(_impl_.continued_));
2604   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ProfilePacket)
2605 }
2606 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2607 inline void ProfilePacket::SharedCtor(
2608     ::_pb::Arena* arena, bool is_message_owned) {
2609   (void)arena;
2610   (void)is_message_owned;
2611   new (&_impl_) Impl_{
2612       decltype(_impl_._has_bits_){}
2613     , /*decltype(_impl_._cached_size_)*/{}
2614     , decltype(_impl_.strings_){arena}
2615     , decltype(_impl_.frames_){arena}
2616     , decltype(_impl_.callstacks_){arena}
2617     , decltype(_impl_.mappings_){arena}
2618     , decltype(_impl_.process_dumps_){arena}
2619     , decltype(_impl_.index_){::uint64_t{0u}}
2620     , decltype(_impl_.continued_){false}
2621   };
2622 }
2623 
~ProfilePacket()2624 ProfilePacket::~ProfilePacket() {
2625   // @@protoc_insertion_point(destructor:perfetto.protos.ProfilePacket)
2626   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2627   (void)arena;
2628     return;
2629   }
2630   SharedDtor();
2631 }
2632 
SharedDtor()2633 inline void ProfilePacket::SharedDtor() {
2634   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2635   _impl_.strings_.~RepeatedPtrField();
2636   _impl_.frames_.~RepeatedPtrField();
2637   _impl_.callstacks_.~RepeatedPtrField();
2638   _impl_.mappings_.~RepeatedPtrField();
2639   _impl_.process_dumps_.~RepeatedPtrField();
2640 }
2641 
SetCachedSize(int size) const2642 void ProfilePacket::SetCachedSize(int size) const {
2643   _impl_._cached_size_.Set(size);
2644 }
2645 
Clear()2646 void ProfilePacket::Clear() {
2647 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ProfilePacket)
2648   ::uint32_t cached_has_bits = 0;
2649   // Prevent compiler warnings about cached_has_bits being unused
2650   (void) cached_has_bits;
2651 
2652   _impl_.strings_.Clear();
2653   _impl_.frames_.Clear();
2654   _impl_.callstacks_.Clear();
2655   _impl_.mappings_.Clear();
2656   _impl_.process_dumps_.Clear();
2657   cached_has_bits = _impl_._has_bits_[0];
2658   if (cached_has_bits & 0x00000003u) {
2659     ::memset(&_impl_.index_, 0, static_cast<size_t>(
2660         reinterpret_cast<char*>(&_impl_.continued_) -
2661         reinterpret_cast<char*>(&_impl_.index_)) + sizeof(_impl_.continued_));
2662   }
2663   _impl_._has_bits_.Clear();
2664   _internal_metadata_.Clear<std::string>();
2665 }
2666 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2667 const char* ProfilePacket::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2668 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2669   _Internal::HasBits has_bits{};
2670   while (!ctx->Done(&ptr)) {
2671     ::uint32_t tag;
2672     ptr = ::_pbi::ReadTag(ptr, &tag);
2673     switch (tag >> 3) {
2674       // repeated .perfetto.protos.InternedString strings = 1;
2675       case 1:
2676         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2677           ptr -= 1;
2678           do {
2679             ptr += 1;
2680             ptr = ctx->ParseMessage(_internal_add_strings(), ptr);
2681             CHK_(ptr);
2682             if (!ctx->DataAvailable(ptr)) break;
2683           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
2684         } else {
2685           goto handle_unusual;
2686         }
2687         continue;
2688       // repeated .perfetto.protos.Frame frames = 2;
2689       case 2:
2690         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2691           ptr -= 1;
2692           do {
2693             ptr += 1;
2694             ptr = ctx->ParseMessage(_internal_add_frames(), ptr);
2695             CHK_(ptr);
2696             if (!ctx->DataAvailable(ptr)) break;
2697           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
2698         } else {
2699           goto handle_unusual;
2700         }
2701         continue;
2702       // repeated .perfetto.protos.Callstack callstacks = 3;
2703       case 3:
2704         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2705           ptr -= 1;
2706           do {
2707             ptr += 1;
2708             ptr = ctx->ParseMessage(_internal_add_callstacks(), ptr);
2709             CHK_(ptr);
2710             if (!ctx->DataAvailable(ptr)) break;
2711           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
2712         } else {
2713           goto handle_unusual;
2714         }
2715         continue;
2716       // repeated .perfetto.protos.Mapping mappings = 4;
2717       case 4:
2718         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2719           ptr -= 1;
2720           do {
2721             ptr += 1;
2722             ptr = ctx->ParseMessage(_internal_add_mappings(), ptr);
2723             CHK_(ptr);
2724             if (!ctx->DataAvailable(ptr)) break;
2725           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
2726         } else {
2727           goto handle_unusual;
2728         }
2729         continue;
2730       // repeated .perfetto.protos.ProfilePacket.ProcessHeapSamples process_dumps = 5;
2731       case 5:
2732         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2733           ptr -= 1;
2734           do {
2735             ptr += 1;
2736             ptr = ctx->ParseMessage(_internal_add_process_dumps(), ptr);
2737             CHK_(ptr);
2738             if (!ctx->DataAvailable(ptr)) break;
2739           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
2740         } else {
2741           goto handle_unusual;
2742         }
2743         continue;
2744       // optional bool continued = 6;
2745       case 6:
2746         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2747           _Internal::set_has_continued(&has_bits);
2748           _impl_.continued_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2749           CHK_(ptr);
2750         } else {
2751           goto handle_unusual;
2752         }
2753         continue;
2754       // optional uint64 index = 7;
2755       case 7:
2756         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2757           _Internal::set_has_index(&has_bits);
2758           _impl_.index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2759           CHK_(ptr);
2760         } else {
2761           goto handle_unusual;
2762         }
2763         continue;
2764       default:
2765         goto handle_unusual;
2766     }  // switch
2767   handle_unusual:
2768     if ((tag == 0) || ((tag & 7) == 4)) {
2769       CHK_(ptr);
2770       ctx->SetLastTag(tag);
2771       goto message_done;
2772     }
2773     ptr = UnknownFieldParse(
2774         tag,
2775         _internal_metadata_.mutable_unknown_fields<std::string>(),
2776         ptr, ctx);
2777     CHK_(ptr != nullptr);
2778   }  // while
2779 message_done:
2780   _impl_._has_bits_.Or(has_bits);
2781   return ptr;
2782 failure:
2783   ptr = nullptr;
2784   goto message_done;
2785 #undef CHK_
2786 }
2787 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2788 ::uint8_t* ProfilePacket::_InternalSerialize(
2789     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2790   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ProfilePacket)
2791   ::uint32_t cached_has_bits = 0;
2792   (void) cached_has_bits;
2793 
2794   // repeated .perfetto.protos.InternedString strings = 1;
2795   for (unsigned i = 0,
2796       n = static_cast<unsigned>(this->_internal_strings_size()); i < n; i++) {
2797     const auto& repfield = this->_internal_strings(i);
2798     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2799         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
2800   }
2801 
2802   // repeated .perfetto.protos.Frame frames = 2;
2803   for (unsigned i = 0,
2804       n = static_cast<unsigned>(this->_internal_frames_size()); i < n; i++) {
2805     const auto& repfield = this->_internal_frames(i);
2806     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2807         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
2808   }
2809 
2810   // repeated .perfetto.protos.Callstack callstacks = 3;
2811   for (unsigned i = 0,
2812       n = static_cast<unsigned>(this->_internal_callstacks_size()); i < n; i++) {
2813     const auto& repfield = this->_internal_callstacks(i);
2814     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2815         InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
2816   }
2817 
2818   // repeated .perfetto.protos.Mapping mappings = 4;
2819   for (unsigned i = 0,
2820       n = static_cast<unsigned>(this->_internal_mappings_size()); i < n; i++) {
2821     const auto& repfield = this->_internal_mappings(i);
2822     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2823         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
2824   }
2825 
2826   // repeated .perfetto.protos.ProfilePacket.ProcessHeapSamples process_dumps = 5;
2827   for (unsigned i = 0,
2828       n = static_cast<unsigned>(this->_internal_process_dumps_size()); i < n; i++) {
2829     const auto& repfield = this->_internal_process_dumps(i);
2830     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2831         InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
2832   }
2833 
2834   cached_has_bits = _impl_._has_bits_[0];
2835   // optional bool continued = 6;
2836   if (cached_has_bits & 0x00000002u) {
2837     target = stream->EnsureSpace(target);
2838     target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_continued(), target);
2839   }
2840 
2841   // optional uint64 index = 7;
2842   if (cached_has_bits & 0x00000001u) {
2843     target = stream->EnsureSpace(target);
2844     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_index(), target);
2845   }
2846 
2847   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2848     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2849         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2850   }
2851   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ProfilePacket)
2852   return target;
2853 }
2854 
ByteSizeLong() const2855 size_t ProfilePacket::ByteSizeLong() const {
2856 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ProfilePacket)
2857   size_t total_size = 0;
2858 
2859   ::uint32_t cached_has_bits = 0;
2860   // Prevent compiler warnings about cached_has_bits being unused
2861   (void) cached_has_bits;
2862 
2863   // repeated .perfetto.protos.InternedString strings = 1;
2864   total_size += 1UL * this->_internal_strings_size();
2865   for (const auto& msg : this->_impl_.strings_) {
2866     total_size +=
2867       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2868   }
2869 
2870   // repeated .perfetto.protos.Frame frames = 2;
2871   total_size += 1UL * this->_internal_frames_size();
2872   for (const auto& msg : this->_impl_.frames_) {
2873     total_size +=
2874       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2875   }
2876 
2877   // repeated .perfetto.protos.Callstack callstacks = 3;
2878   total_size += 1UL * this->_internal_callstacks_size();
2879   for (const auto& msg : this->_impl_.callstacks_) {
2880     total_size +=
2881       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2882   }
2883 
2884   // repeated .perfetto.protos.Mapping mappings = 4;
2885   total_size += 1UL * this->_internal_mappings_size();
2886   for (const auto& msg : this->_impl_.mappings_) {
2887     total_size +=
2888       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2889   }
2890 
2891   // repeated .perfetto.protos.ProfilePacket.ProcessHeapSamples process_dumps = 5;
2892   total_size += 1UL * this->_internal_process_dumps_size();
2893   for (const auto& msg : this->_impl_.process_dumps_) {
2894     total_size +=
2895       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2896   }
2897 
2898   cached_has_bits = _impl_._has_bits_[0];
2899   if (cached_has_bits & 0x00000003u) {
2900     // optional uint64 index = 7;
2901     if (cached_has_bits & 0x00000001u) {
2902       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_index());
2903     }
2904 
2905     // optional bool continued = 6;
2906     if (cached_has_bits & 0x00000002u) {
2907       total_size += 1 + 1;
2908     }
2909 
2910   }
2911   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2912     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2913   }
2914   int cached_size = ::_pbi::ToCachedSize(total_size);
2915   SetCachedSize(cached_size);
2916   return total_size;
2917 }
2918 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2919 void ProfilePacket::CheckTypeAndMergeFrom(
2920     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2921   MergeFrom(*::_pbi::DownCast<const ProfilePacket*>(
2922       &from));
2923 }
2924 
MergeFrom(const ProfilePacket & from)2925 void ProfilePacket::MergeFrom(const ProfilePacket& from) {
2926   ProfilePacket* const _this = this;
2927   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ProfilePacket)
2928   GOOGLE_DCHECK_NE(&from, _this);
2929   ::uint32_t cached_has_bits = 0;
2930   (void) cached_has_bits;
2931 
2932   _this->_impl_.strings_.MergeFrom(from._impl_.strings_);
2933   _this->_impl_.frames_.MergeFrom(from._impl_.frames_);
2934   _this->_impl_.callstacks_.MergeFrom(from._impl_.callstacks_);
2935   _this->_impl_.mappings_.MergeFrom(from._impl_.mappings_);
2936   _this->_impl_.process_dumps_.MergeFrom(from._impl_.process_dumps_);
2937   cached_has_bits = from._impl_._has_bits_[0];
2938   if (cached_has_bits & 0x00000003u) {
2939     if (cached_has_bits & 0x00000001u) {
2940       _this->_impl_.index_ = from._impl_.index_;
2941     }
2942     if (cached_has_bits & 0x00000002u) {
2943       _this->_impl_.continued_ = from._impl_.continued_;
2944     }
2945     _this->_impl_._has_bits_[0] |= cached_has_bits;
2946   }
2947   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2948 }
2949 
CopyFrom(const ProfilePacket & from)2950 void ProfilePacket::CopyFrom(const ProfilePacket& from) {
2951 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ProfilePacket)
2952   if (&from == this) return;
2953   Clear();
2954   MergeFrom(from);
2955 }
2956 
IsInitialized() const2957 bool ProfilePacket::IsInitialized() const {
2958   return true;
2959 }
2960 
InternalSwap(ProfilePacket * other)2961 void ProfilePacket::InternalSwap(ProfilePacket* other) {
2962   using std::swap;
2963   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2964   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2965   _impl_.strings_.InternalSwap(&other->_impl_.strings_);
2966   _impl_.frames_.InternalSwap(&other->_impl_.frames_);
2967   _impl_.callstacks_.InternalSwap(&other->_impl_.callstacks_);
2968   _impl_.mappings_.InternalSwap(&other->_impl_.mappings_);
2969   _impl_.process_dumps_.InternalSwap(&other->_impl_.process_dumps_);
2970   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2971       PROTOBUF_FIELD_OFFSET(ProfilePacket, _impl_.continued_)
2972       + sizeof(ProfilePacket::_impl_.continued_)  // NOLINT
2973       - PROTOBUF_FIELD_OFFSET(ProfilePacket, _impl_.index_)>(
2974           reinterpret_cast<char*>(&_impl_.index_),
2975           reinterpret_cast<char*>(&other->_impl_.index_));
2976 }
2977 
GetTypeName() const2978 std::string ProfilePacket::GetTypeName() const {
2979   return "perfetto.protos.ProfilePacket";
2980 }
2981 
2982 
2983 // ===================================================================
2984 
2985 class StreamingAllocation::_Internal {
2986  public:
2987 };
2988 
StreamingAllocation(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2989 StreamingAllocation::StreamingAllocation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2990                          bool is_message_owned)
2991   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2992   SharedCtor(arena, is_message_owned);
2993   // @@protoc_insertion_point(arena_constructor:perfetto.protos.StreamingAllocation)
2994 }
StreamingAllocation(const StreamingAllocation & from)2995 StreamingAllocation::StreamingAllocation(const StreamingAllocation& from)
2996   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2997   StreamingAllocation* const _this = this; (void)_this;
2998   new (&_impl_) Impl_{
2999       decltype(_impl_.address_){from._impl_.address_}
3000     , decltype(_impl_.size_){from._impl_.size_}
3001     , decltype(_impl_.sample_size_){from._impl_.sample_size_}
3002     , decltype(_impl_.clock_monotonic_coarse_timestamp_){from._impl_.clock_monotonic_coarse_timestamp_}
3003     , decltype(_impl_.heap_id_){from._impl_.heap_id_}
3004     , decltype(_impl_.sequence_number_){from._impl_.sequence_number_}
3005     , /*decltype(_impl_._cached_size_)*/{}};
3006 
3007   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3008   // @@protoc_insertion_point(copy_constructor:perfetto.protos.StreamingAllocation)
3009 }
3010 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3011 inline void StreamingAllocation::SharedCtor(
3012     ::_pb::Arena* arena, bool is_message_owned) {
3013   (void)arena;
3014   (void)is_message_owned;
3015   new (&_impl_) Impl_{
3016       decltype(_impl_.address_){arena}
3017     , decltype(_impl_.size_){arena}
3018     , decltype(_impl_.sample_size_){arena}
3019     , decltype(_impl_.clock_monotonic_coarse_timestamp_){arena}
3020     , decltype(_impl_.heap_id_){arena}
3021     , decltype(_impl_.sequence_number_){arena}
3022     , /*decltype(_impl_._cached_size_)*/{}
3023   };
3024 }
3025 
~StreamingAllocation()3026 StreamingAllocation::~StreamingAllocation() {
3027   // @@protoc_insertion_point(destructor:perfetto.protos.StreamingAllocation)
3028   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3029   (void)arena;
3030     return;
3031   }
3032   SharedDtor();
3033 }
3034 
SharedDtor()3035 inline void StreamingAllocation::SharedDtor() {
3036   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3037   _impl_.address_.~RepeatedField();
3038   _impl_.size_.~RepeatedField();
3039   _impl_.sample_size_.~RepeatedField();
3040   _impl_.clock_monotonic_coarse_timestamp_.~RepeatedField();
3041   _impl_.heap_id_.~RepeatedField();
3042   _impl_.sequence_number_.~RepeatedField();
3043 }
3044 
SetCachedSize(int size) const3045 void StreamingAllocation::SetCachedSize(int size) const {
3046   _impl_._cached_size_.Set(size);
3047 }
3048 
Clear()3049 void StreamingAllocation::Clear() {
3050 // @@protoc_insertion_point(message_clear_start:perfetto.protos.StreamingAllocation)
3051   ::uint32_t cached_has_bits = 0;
3052   // Prevent compiler warnings about cached_has_bits being unused
3053   (void) cached_has_bits;
3054 
3055   _impl_.address_.Clear();
3056   _impl_.size_.Clear();
3057   _impl_.sample_size_.Clear();
3058   _impl_.clock_monotonic_coarse_timestamp_.Clear();
3059   _impl_.heap_id_.Clear();
3060   _impl_.sequence_number_.Clear();
3061   _internal_metadata_.Clear<std::string>();
3062 }
3063 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3064 const char* StreamingAllocation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3065 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3066   while (!ctx->Done(&ptr)) {
3067     ::uint32_t tag;
3068     ptr = ::_pbi::ReadTag(ptr, &tag);
3069     switch (tag >> 3) {
3070       // repeated uint64 address = 1;
3071       case 1:
3072         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3073           ptr -= 1;
3074           do {
3075             ptr += 1;
3076             _internal_add_address(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3077             CHK_(ptr);
3078             if (!ctx->DataAvailable(ptr)) break;
3079           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
3080         } else if (static_cast<::uint8_t>(tag) == 10) {
3081           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_address(), ptr, ctx);
3082           CHK_(ptr);
3083         } else {
3084           goto handle_unusual;
3085         }
3086         continue;
3087       // repeated uint64 size = 2;
3088       case 2:
3089         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3090           ptr -= 1;
3091           do {
3092             ptr += 1;
3093             _internal_add_size(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3094             CHK_(ptr);
3095             if (!ctx->DataAvailable(ptr)) break;
3096           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
3097         } else if (static_cast<::uint8_t>(tag) == 18) {
3098           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_size(), ptr, ctx);
3099           CHK_(ptr);
3100         } else {
3101           goto handle_unusual;
3102         }
3103         continue;
3104       // repeated uint64 sample_size = 3;
3105       case 3:
3106         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
3107           ptr -= 1;
3108           do {
3109             ptr += 1;
3110             _internal_add_sample_size(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3111             CHK_(ptr);
3112             if (!ctx->DataAvailable(ptr)) break;
3113           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
3114         } else if (static_cast<::uint8_t>(tag) == 26) {
3115           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_sample_size(), ptr, ctx);
3116           CHK_(ptr);
3117         } else {
3118           goto handle_unusual;
3119         }
3120         continue;
3121       // repeated uint64 clock_monotonic_coarse_timestamp = 4;
3122       case 4:
3123         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
3124           ptr -= 1;
3125           do {
3126             ptr += 1;
3127             _internal_add_clock_monotonic_coarse_timestamp(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3128             CHK_(ptr);
3129             if (!ctx->DataAvailable(ptr)) break;
3130           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
3131         } else if (static_cast<::uint8_t>(tag) == 34) {
3132           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_clock_monotonic_coarse_timestamp(), ptr, ctx);
3133           CHK_(ptr);
3134         } else {
3135           goto handle_unusual;
3136         }
3137         continue;
3138       // repeated uint32 heap_id = 5;
3139       case 5:
3140         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
3141           ptr -= 1;
3142           do {
3143             ptr += 1;
3144             _internal_add_heap_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
3145             CHK_(ptr);
3146             if (!ctx->DataAvailable(ptr)) break;
3147           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr));
3148         } else if (static_cast<::uint8_t>(tag) == 42) {
3149           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_heap_id(), ptr, ctx);
3150           CHK_(ptr);
3151         } else {
3152           goto handle_unusual;
3153         }
3154         continue;
3155       // repeated uint64 sequence_number = 6;
3156       case 6:
3157         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
3158           ptr -= 1;
3159           do {
3160             ptr += 1;
3161             _internal_add_sequence_number(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3162             CHK_(ptr);
3163             if (!ctx->DataAvailable(ptr)) break;
3164           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<48>(ptr));
3165         } else if (static_cast<::uint8_t>(tag) == 50) {
3166           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_sequence_number(), ptr, ctx);
3167           CHK_(ptr);
3168         } else {
3169           goto handle_unusual;
3170         }
3171         continue;
3172       default:
3173         goto handle_unusual;
3174     }  // switch
3175   handle_unusual:
3176     if ((tag == 0) || ((tag & 7) == 4)) {
3177       CHK_(ptr);
3178       ctx->SetLastTag(tag);
3179       goto message_done;
3180     }
3181     ptr = UnknownFieldParse(
3182         tag,
3183         _internal_metadata_.mutable_unknown_fields<std::string>(),
3184         ptr, ctx);
3185     CHK_(ptr != nullptr);
3186   }  // while
3187 message_done:
3188   return ptr;
3189 failure:
3190   ptr = nullptr;
3191   goto message_done;
3192 #undef CHK_
3193 }
3194 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3195 ::uint8_t* StreamingAllocation::_InternalSerialize(
3196     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3197   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.StreamingAllocation)
3198   ::uint32_t cached_has_bits = 0;
3199   (void) cached_has_bits;
3200 
3201   // repeated uint64 address = 1;
3202   for (int i = 0, n = this->_internal_address_size(); i < n; i++) {
3203     target = stream->EnsureSpace(target);
3204     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_address(i), target);
3205   }
3206 
3207   // repeated uint64 size = 2;
3208   for (int i = 0, n = this->_internal_size_size(); i < n; i++) {
3209     target = stream->EnsureSpace(target);
3210     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_size(i), target);
3211   }
3212 
3213   // repeated uint64 sample_size = 3;
3214   for (int i = 0, n = this->_internal_sample_size_size(); i < n; i++) {
3215     target = stream->EnsureSpace(target);
3216     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_sample_size(i), target);
3217   }
3218 
3219   // repeated uint64 clock_monotonic_coarse_timestamp = 4;
3220   for (int i = 0, n = this->_internal_clock_monotonic_coarse_timestamp_size(); i < n; i++) {
3221     target = stream->EnsureSpace(target);
3222     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_clock_monotonic_coarse_timestamp(i), target);
3223   }
3224 
3225   // repeated uint32 heap_id = 5;
3226   for (int i = 0, n = this->_internal_heap_id_size(); i < n; i++) {
3227     target = stream->EnsureSpace(target);
3228     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_heap_id(i), target);
3229   }
3230 
3231   // repeated uint64 sequence_number = 6;
3232   for (int i = 0, n = this->_internal_sequence_number_size(); i < n; i++) {
3233     target = stream->EnsureSpace(target);
3234     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_sequence_number(i), target);
3235   }
3236 
3237   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3238     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3239         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3240   }
3241   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.StreamingAllocation)
3242   return target;
3243 }
3244 
ByteSizeLong() const3245 size_t StreamingAllocation::ByteSizeLong() const {
3246 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.StreamingAllocation)
3247   size_t total_size = 0;
3248 
3249   ::uint32_t cached_has_bits = 0;
3250   // Prevent compiler warnings about cached_has_bits being unused
3251   (void) cached_has_bits;
3252 
3253   // repeated uint64 address = 1;
3254   {
3255     size_t data_size = ::_pbi::WireFormatLite::
3256       UInt64Size(this->_impl_.address_);
3257     total_size += 1 *
3258                   ::_pbi::FromIntSize(this->_internal_address_size());
3259     total_size += data_size;
3260   }
3261 
3262   // repeated uint64 size = 2;
3263   {
3264     size_t data_size = ::_pbi::WireFormatLite::
3265       UInt64Size(this->_impl_.size_);
3266     total_size += 1 *
3267                   ::_pbi::FromIntSize(this->_internal_size_size());
3268     total_size += data_size;
3269   }
3270 
3271   // repeated uint64 sample_size = 3;
3272   {
3273     size_t data_size = ::_pbi::WireFormatLite::
3274       UInt64Size(this->_impl_.sample_size_);
3275     total_size += 1 *
3276                   ::_pbi::FromIntSize(this->_internal_sample_size_size());
3277     total_size += data_size;
3278   }
3279 
3280   // repeated uint64 clock_monotonic_coarse_timestamp = 4;
3281   {
3282     size_t data_size = ::_pbi::WireFormatLite::
3283       UInt64Size(this->_impl_.clock_monotonic_coarse_timestamp_);
3284     total_size += 1 *
3285                   ::_pbi::FromIntSize(this->_internal_clock_monotonic_coarse_timestamp_size());
3286     total_size += data_size;
3287   }
3288 
3289   // repeated uint32 heap_id = 5;
3290   {
3291     size_t data_size = ::_pbi::WireFormatLite::
3292       UInt32Size(this->_impl_.heap_id_);
3293     total_size += 1 *
3294                   ::_pbi::FromIntSize(this->_internal_heap_id_size());
3295     total_size += data_size;
3296   }
3297 
3298   // repeated uint64 sequence_number = 6;
3299   {
3300     size_t data_size = ::_pbi::WireFormatLite::
3301       UInt64Size(this->_impl_.sequence_number_);
3302     total_size += 1 *
3303                   ::_pbi::FromIntSize(this->_internal_sequence_number_size());
3304     total_size += data_size;
3305   }
3306 
3307   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3308     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3309   }
3310   int cached_size = ::_pbi::ToCachedSize(total_size);
3311   SetCachedSize(cached_size);
3312   return total_size;
3313 }
3314 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3315 void StreamingAllocation::CheckTypeAndMergeFrom(
3316     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3317   MergeFrom(*::_pbi::DownCast<const StreamingAllocation*>(
3318       &from));
3319 }
3320 
MergeFrom(const StreamingAllocation & from)3321 void StreamingAllocation::MergeFrom(const StreamingAllocation& from) {
3322   StreamingAllocation* const _this = this;
3323   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.StreamingAllocation)
3324   GOOGLE_DCHECK_NE(&from, _this);
3325   ::uint32_t cached_has_bits = 0;
3326   (void) cached_has_bits;
3327 
3328   _this->_impl_.address_.MergeFrom(from._impl_.address_);
3329   _this->_impl_.size_.MergeFrom(from._impl_.size_);
3330   _this->_impl_.sample_size_.MergeFrom(from._impl_.sample_size_);
3331   _this->_impl_.clock_monotonic_coarse_timestamp_.MergeFrom(from._impl_.clock_monotonic_coarse_timestamp_);
3332   _this->_impl_.heap_id_.MergeFrom(from._impl_.heap_id_);
3333   _this->_impl_.sequence_number_.MergeFrom(from._impl_.sequence_number_);
3334   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3335 }
3336 
CopyFrom(const StreamingAllocation & from)3337 void StreamingAllocation::CopyFrom(const StreamingAllocation& from) {
3338 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.StreamingAllocation)
3339   if (&from == this) return;
3340   Clear();
3341   MergeFrom(from);
3342 }
3343 
IsInitialized() const3344 bool StreamingAllocation::IsInitialized() const {
3345   return true;
3346 }
3347 
InternalSwap(StreamingAllocation * other)3348 void StreamingAllocation::InternalSwap(StreamingAllocation* other) {
3349   using std::swap;
3350   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3351   _impl_.address_.InternalSwap(&other->_impl_.address_);
3352   _impl_.size_.InternalSwap(&other->_impl_.size_);
3353   _impl_.sample_size_.InternalSwap(&other->_impl_.sample_size_);
3354   _impl_.clock_monotonic_coarse_timestamp_.InternalSwap(&other->_impl_.clock_monotonic_coarse_timestamp_);
3355   _impl_.heap_id_.InternalSwap(&other->_impl_.heap_id_);
3356   _impl_.sequence_number_.InternalSwap(&other->_impl_.sequence_number_);
3357 }
3358 
GetTypeName() const3359 std::string StreamingAllocation::GetTypeName() const {
3360   return "perfetto.protos.StreamingAllocation";
3361 }
3362 
3363 
3364 // ===================================================================
3365 
3366 class StreamingFree::_Internal {
3367  public:
3368 };
3369 
StreamingFree(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3370 StreamingFree::StreamingFree(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3371                          bool is_message_owned)
3372   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3373   SharedCtor(arena, is_message_owned);
3374   // @@protoc_insertion_point(arena_constructor:perfetto.protos.StreamingFree)
3375 }
StreamingFree(const StreamingFree & from)3376 StreamingFree::StreamingFree(const StreamingFree& from)
3377   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3378   StreamingFree* const _this = this; (void)_this;
3379   new (&_impl_) Impl_{
3380       decltype(_impl_.address_){from._impl_.address_}
3381     , decltype(_impl_.heap_id_){from._impl_.heap_id_}
3382     , decltype(_impl_.sequence_number_){from._impl_.sequence_number_}
3383     , /*decltype(_impl_._cached_size_)*/{}};
3384 
3385   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3386   // @@protoc_insertion_point(copy_constructor:perfetto.protos.StreamingFree)
3387 }
3388 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3389 inline void StreamingFree::SharedCtor(
3390     ::_pb::Arena* arena, bool is_message_owned) {
3391   (void)arena;
3392   (void)is_message_owned;
3393   new (&_impl_) Impl_{
3394       decltype(_impl_.address_){arena}
3395     , decltype(_impl_.heap_id_){arena}
3396     , decltype(_impl_.sequence_number_){arena}
3397     , /*decltype(_impl_._cached_size_)*/{}
3398   };
3399 }
3400 
~StreamingFree()3401 StreamingFree::~StreamingFree() {
3402   // @@protoc_insertion_point(destructor:perfetto.protos.StreamingFree)
3403   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3404   (void)arena;
3405     return;
3406   }
3407   SharedDtor();
3408 }
3409 
SharedDtor()3410 inline void StreamingFree::SharedDtor() {
3411   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3412   _impl_.address_.~RepeatedField();
3413   _impl_.heap_id_.~RepeatedField();
3414   _impl_.sequence_number_.~RepeatedField();
3415 }
3416 
SetCachedSize(int size) const3417 void StreamingFree::SetCachedSize(int size) const {
3418   _impl_._cached_size_.Set(size);
3419 }
3420 
Clear()3421 void StreamingFree::Clear() {
3422 // @@protoc_insertion_point(message_clear_start:perfetto.protos.StreamingFree)
3423   ::uint32_t cached_has_bits = 0;
3424   // Prevent compiler warnings about cached_has_bits being unused
3425   (void) cached_has_bits;
3426 
3427   _impl_.address_.Clear();
3428   _impl_.heap_id_.Clear();
3429   _impl_.sequence_number_.Clear();
3430   _internal_metadata_.Clear<std::string>();
3431 }
3432 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3433 const char* StreamingFree::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3434 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3435   while (!ctx->Done(&ptr)) {
3436     ::uint32_t tag;
3437     ptr = ::_pbi::ReadTag(ptr, &tag);
3438     switch (tag >> 3) {
3439       // repeated uint64 address = 1;
3440       case 1:
3441         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3442           ptr -= 1;
3443           do {
3444             ptr += 1;
3445             _internal_add_address(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3446             CHK_(ptr);
3447             if (!ctx->DataAvailable(ptr)) break;
3448           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
3449         } else if (static_cast<::uint8_t>(tag) == 10) {
3450           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_address(), ptr, ctx);
3451           CHK_(ptr);
3452         } else {
3453           goto handle_unusual;
3454         }
3455         continue;
3456       // repeated uint32 heap_id = 2;
3457       case 2:
3458         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3459           ptr -= 1;
3460           do {
3461             ptr += 1;
3462             _internal_add_heap_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
3463             CHK_(ptr);
3464             if (!ctx->DataAvailable(ptr)) break;
3465           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
3466         } else if (static_cast<::uint8_t>(tag) == 18) {
3467           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_heap_id(), ptr, ctx);
3468           CHK_(ptr);
3469         } else {
3470           goto handle_unusual;
3471         }
3472         continue;
3473       // repeated uint64 sequence_number = 3;
3474       case 3:
3475         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
3476           ptr -= 1;
3477           do {
3478             ptr += 1;
3479             _internal_add_sequence_number(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3480             CHK_(ptr);
3481             if (!ctx->DataAvailable(ptr)) break;
3482           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
3483         } else if (static_cast<::uint8_t>(tag) == 26) {
3484           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_sequence_number(), ptr, ctx);
3485           CHK_(ptr);
3486         } else {
3487           goto handle_unusual;
3488         }
3489         continue;
3490       default:
3491         goto handle_unusual;
3492     }  // switch
3493   handle_unusual:
3494     if ((tag == 0) || ((tag & 7) == 4)) {
3495       CHK_(ptr);
3496       ctx->SetLastTag(tag);
3497       goto message_done;
3498     }
3499     ptr = UnknownFieldParse(
3500         tag,
3501         _internal_metadata_.mutable_unknown_fields<std::string>(),
3502         ptr, ctx);
3503     CHK_(ptr != nullptr);
3504   }  // while
3505 message_done:
3506   return ptr;
3507 failure:
3508   ptr = nullptr;
3509   goto message_done;
3510 #undef CHK_
3511 }
3512 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3513 ::uint8_t* StreamingFree::_InternalSerialize(
3514     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3515   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.StreamingFree)
3516   ::uint32_t cached_has_bits = 0;
3517   (void) cached_has_bits;
3518 
3519   // repeated uint64 address = 1;
3520   for (int i = 0, n = this->_internal_address_size(); i < n; i++) {
3521     target = stream->EnsureSpace(target);
3522     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_address(i), target);
3523   }
3524 
3525   // repeated uint32 heap_id = 2;
3526   for (int i = 0, n = this->_internal_heap_id_size(); i < n; i++) {
3527     target = stream->EnsureSpace(target);
3528     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_heap_id(i), target);
3529   }
3530 
3531   // repeated uint64 sequence_number = 3;
3532   for (int i = 0, n = this->_internal_sequence_number_size(); i < n; i++) {
3533     target = stream->EnsureSpace(target);
3534     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_sequence_number(i), target);
3535   }
3536 
3537   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3538     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3539         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3540   }
3541   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.StreamingFree)
3542   return target;
3543 }
3544 
ByteSizeLong() const3545 size_t StreamingFree::ByteSizeLong() const {
3546 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.StreamingFree)
3547   size_t total_size = 0;
3548 
3549   ::uint32_t cached_has_bits = 0;
3550   // Prevent compiler warnings about cached_has_bits being unused
3551   (void) cached_has_bits;
3552 
3553   // repeated uint64 address = 1;
3554   {
3555     size_t data_size = ::_pbi::WireFormatLite::
3556       UInt64Size(this->_impl_.address_);
3557     total_size += 1 *
3558                   ::_pbi::FromIntSize(this->_internal_address_size());
3559     total_size += data_size;
3560   }
3561 
3562   // repeated uint32 heap_id = 2;
3563   {
3564     size_t data_size = ::_pbi::WireFormatLite::
3565       UInt32Size(this->_impl_.heap_id_);
3566     total_size += 1 *
3567                   ::_pbi::FromIntSize(this->_internal_heap_id_size());
3568     total_size += data_size;
3569   }
3570 
3571   // repeated uint64 sequence_number = 3;
3572   {
3573     size_t data_size = ::_pbi::WireFormatLite::
3574       UInt64Size(this->_impl_.sequence_number_);
3575     total_size += 1 *
3576                   ::_pbi::FromIntSize(this->_internal_sequence_number_size());
3577     total_size += data_size;
3578   }
3579 
3580   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3581     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3582   }
3583   int cached_size = ::_pbi::ToCachedSize(total_size);
3584   SetCachedSize(cached_size);
3585   return total_size;
3586 }
3587 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3588 void StreamingFree::CheckTypeAndMergeFrom(
3589     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3590   MergeFrom(*::_pbi::DownCast<const StreamingFree*>(
3591       &from));
3592 }
3593 
MergeFrom(const StreamingFree & from)3594 void StreamingFree::MergeFrom(const StreamingFree& from) {
3595   StreamingFree* const _this = this;
3596   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.StreamingFree)
3597   GOOGLE_DCHECK_NE(&from, _this);
3598   ::uint32_t cached_has_bits = 0;
3599   (void) cached_has_bits;
3600 
3601   _this->_impl_.address_.MergeFrom(from._impl_.address_);
3602   _this->_impl_.heap_id_.MergeFrom(from._impl_.heap_id_);
3603   _this->_impl_.sequence_number_.MergeFrom(from._impl_.sequence_number_);
3604   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3605 }
3606 
CopyFrom(const StreamingFree & from)3607 void StreamingFree::CopyFrom(const StreamingFree& from) {
3608 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.StreamingFree)
3609   if (&from == this) return;
3610   Clear();
3611   MergeFrom(from);
3612 }
3613 
IsInitialized() const3614 bool StreamingFree::IsInitialized() const {
3615   return true;
3616 }
3617 
InternalSwap(StreamingFree * other)3618 void StreamingFree::InternalSwap(StreamingFree* other) {
3619   using std::swap;
3620   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3621   _impl_.address_.InternalSwap(&other->_impl_.address_);
3622   _impl_.heap_id_.InternalSwap(&other->_impl_.heap_id_);
3623   _impl_.sequence_number_.InternalSwap(&other->_impl_.sequence_number_);
3624 }
3625 
GetTypeName() const3626 std::string StreamingFree::GetTypeName() const {
3627   return "perfetto.protos.StreamingFree";
3628 }
3629 
3630 
3631 // ===================================================================
3632 
3633 class StreamingProfilePacket::_Internal {
3634  public:
3635   using HasBits = decltype(std::declval<StreamingProfilePacket>()._impl_._has_bits_);
set_has_process_priority(HasBits * has_bits)3636   static void set_has_process_priority(HasBits* has_bits) {
3637     (*has_bits)[0] |= 1u;
3638   }
3639 };
3640 
StreamingProfilePacket(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3641 StreamingProfilePacket::StreamingProfilePacket(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3642                          bool is_message_owned)
3643   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3644   SharedCtor(arena, is_message_owned);
3645   // @@protoc_insertion_point(arena_constructor:perfetto.protos.StreamingProfilePacket)
3646 }
StreamingProfilePacket(const StreamingProfilePacket & from)3647 StreamingProfilePacket::StreamingProfilePacket(const StreamingProfilePacket& from)
3648   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3649   StreamingProfilePacket* const _this = this; (void)_this;
3650   new (&_impl_) Impl_{
3651       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3652     , /*decltype(_impl_._cached_size_)*/{}
3653     , decltype(_impl_.callstack_iid_){from._impl_.callstack_iid_}
3654     , decltype(_impl_.timestamp_delta_us_){from._impl_.timestamp_delta_us_}
3655     , decltype(_impl_.process_priority_){}};
3656 
3657   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3658   _this->_impl_.process_priority_ = from._impl_.process_priority_;
3659   // @@protoc_insertion_point(copy_constructor:perfetto.protos.StreamingProfilePacket)
3660 }
3661 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3662 inline void StreamingProfilePacket::SharedCtor(
3663     ::_pb::Arena* arena, bool is_message_owned) {
3664   (void)arena;
3665   (void)is_message_owned;
3666   new (&_impl_) Impl_{
3667       decltype(_impl_._has_bits_){}
3668     , /*decltype(_impl_._cached_size_)*/{}
3669     , decltype(_impl_.callstack_iid_){arena}
3670     , decltype(_impl_.timestamp_delta_us_){arena}
3671     , decltype(_impl_.process_priority_){0}
3672   };
3673 }
3674 
~StreamingProfilePacket()3675 StreamingProfilePacket::~StreamingProfilePacket() {
3676   // @@protoc_insertion_point(destructor:perfetto.protos.StreamingProfilePacket)
3677   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3678   (void)arena;
3679     return;
3680   }
3681   SharedDtor();
3682 }
3683 
SharedDtor()3684 inline void StreamingProfilePacket::SharedDtor() {
3685   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3686   _impl_.callstack_iid_.~RepeatedField();
3687   _impl_.timestamp_delta_us_.~RepeatedField();
3688 }
3689 
SetCachedSize(int size) const3690 void StreamingProfilePacket::SetCachedSize(int size) const {
3691   _impl_._cached_size_.Set(size);
3692 }
3693 
Clear()3694 void StreamingProfilePacket::Clear() {
3695 // @@protoc_insertion_point(message_clear_start:perfetto.protos.StreamingProfilePacket)
3696   ::uint32_t cached_has_bits = 0;
3697   // Prevent compiler warnings about cached_has_bits being unused
3698   (void) cached_has_bits;
3699 
3700   _impl_.callstack_iid_.Clear();
3701   _impl_.timestamp_delta_us_.Clear();
3702   _impl_.process_priority_ = 0;
3703   _impl_._has_bits_.Clear();
3704   _internal_metadata_.Clear<std::string>();
3705 }
3706 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3707 const char* StreamingProfilePacket::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3708 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3709   _Internal::HasBits has_bits{};
3710   while (!ctx->Done(&ptr)) {
3711     ::uint32_t tag;
3712     ptr = ::_pbi::ReadTag(ptr, &tag);
3713     switch (tag >> 3) {
3714       // repeated uint64 callstack_iid = 1;
3715       case 1:
3716         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3717           ptr -= 1;
3718           do {
3719             ptr += 1;
3720             _internal_add_callstack_iid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3721             CHK_(ptr);
3722             if (!ctx->DataAvailable(ptr)) break;
3723           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
3724         } else if (static_cast<::uint8_t>(tag) == 10) {
3725           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_callstack_iid(), ptr, ctx);
3726           CHK_(ptr);
3727         } else {
3728           goto handle_unusual;
3729         }
3730         continue;
3731       // repeated int64 timestamp_delta_us = 2;
3732       case 2:
3733         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3734           ptr -= 1;
3735           do {
3736             ptr += 1;
3737             _internal_add_timestamp_delta_us(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3738             CHK_(ptr);
3739             if (!ctx->DataAvailable(ptr)) break;
3740           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
3741         } else if (static_cast<::uint8_t>(tag) == 18) {
3742           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_timestamp_delta_us(), ptr, ctx);
3743           CHK_(ptr);
3744         } else {
3745           goto handle_unusual;
3746         }
3747         continue;
3748       // optional int32 process_priority = 3;
3749       case 3:
3750         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
3751           _Internal::set_has_process_priority(&has_bits);
3752           _impl_.process_priority_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3753           CHK_(ptr);
3754         } else {
3755           goto handle_unusual;
3756         }
3757         continue;
3758       default:
3759         goto handle_unusual;
3760     }  // switch
3761   handle_unusual:
3762     if ((tag == 0) || ((tag & 7) == 4)) {
3763       CHK_(ptr);
3764       ctx->SetLastTag(tag);
3765       goto message_done;
3766     }
3767     ptr = UnknownFieldParse(
3768         tag,
3769         _internal_metadata_.mutable_unknown_fields<std::string>(),
3770         ptr, ctx);
3771     CHK_(ptr != nullptr);
3772   }  // while
3773 message_done:
3774   _impl_._has_bits_.Or(has_bits);
3775   return ptr;
3776 failure:
3777   ptr = nullptr;
3778   goto message_done;
3779 #undef CHK_
3780 }
3781 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3782 ::uint8_t* StreamingProfilePacket::_InternalSerialize(
3783     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3784   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.StreamingProfilePacket)
3785   ::uint32_t cached_has_bits = 0;
3786   (void) cached_has_bits;
3787 
3788   // repeated uint64 callstack_iid = 1;
3789   for (int i = 0, n = this->_internal_callstack_iid_size(); i < n; i++) {
3790     target = stream->EnsureSpace(target);
3791     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_callstack_iid(i), target);
3792   }
3793 
3794   // repeated int64 timestamp_delta_us = 2;
3795   for (int i = 0, n = this->_internal_timestamp_delta_us_size(); i < n; i++) {
3796     target = stream->EnsureSpace(target);
3797     target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_timestamp_delta_us(i), target);
3798   }
3799 
3800   cached_has_bits = _impl_._has_bits_[0];
3801   // optional int32 process_priority = 3;
3802   if (cached_has_bits & 0x00000001u) {
3803     target = stream->EnsureSpace(target);
3804     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_process_priority(), target);
3805   }
3806 
3807   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3808     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3809         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3810   }
3811   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.StreamingProfilePacket)
3812   return target;
3813 }
3814 
ByteSizeLong() const3815 size_t StreamingProfilePacket::ByteSizeLong() const {
3816 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.StreamingProfilePacket)
3817   size_t total_size = 0;
3818 
3819   ::uint32_t cached_has_bits = 0;
3820   // Prevent compiler warnings about cached_has_bits being unused
3821   (void) cached_has_bits;
3822 
3823   // repeated uint64 callstack_iid = 1;
3824   {
3825     size_t data_size = ::_pbi::WireFormatLite::
3826       UInt64Size(this->_impl_.callstack_iid_);
3827     total_size += 1 *
3828                   ::_pbi::FromIntSize(this->_internal_callstack_iid_size());
3829     total_size += data_size;
3830   }
3831 
3832   // repeated int64 timestamp_delta_us = 2;
3833   {
3834     size_t data_size = ::_pbi::WireFormatLite::
3835       Int64Size(this->_impl_.timestamp_delta_us_);
3836     total_size += 1 *
3837                   ::_pbi::FromIntSize(this->_internal_timestamp_delta_us_size());
3838     total_size += data_size;
3839   }
3840 
3841   // optional int32 process_priority = 3;
3842   cached_has_bits = _impl_._has_bits_[0];
3843   if (cached_has_bits & 0x00000001u) {
3844     total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_process_priority());
3845   }
3846 
3847   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3848     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3849   }
3850   int cached_size = ::_pbi::ToCachedSize(total_size);
3851   SetCachedSize(cached_size);
3852   return total_size;
3853 }
3854 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3855 void StreamingProfilePacket::CheckTypeAndMergeFrom(
3856     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3857   MergeFrom(*::_pbi::DownCast<const StreamingProfilePacket*>(
3858       &from));
3859 }
3860 
MergeFrom(const StreamingProfilePacket & from)3861 void StreamingProfilePacket::MergeFrom(const StreamingProfilePacket& from) {
3862   StreamingProfilePacket* const _this = this;
3863   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.StreamingProfilePacket)
3864   GOOGLE_DCHECK_NE(&from, _this);
3865   ::uint32_t cached_has_bits = 0;
3866   (void) cached_has_bits;
3867 
3868   _this->_impl_.callstack_iid_.MergeFrom(from._impl_.callstack_iid_);
3869   _this->_impl_.timestamp_delta_us_.MergeFrom(from._impl_.timestamp_delta_us_);
3870   if (from._internal_has_process_priority()) {
3871     _this->_internal_set_process_priority(from._internal_process_priority());
3872   }
3873   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3874 }
3875 
CopyFrom(const StreamingProfilePacket & from)3876 void StreamingProfilePacket::CopyFrom(const StreamingProfilePacket& from) {
3877 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.StreamingProfilePacket)
3878   if (&from == this) return;
3879   Clear();
3880   MergeFrom(from);
3881 }
3882 
IsInitialized() const3883 bool StreamingProfilePacket::IsInitialized() const {
3884   return true;
3885 }
3886 
InternalSwap(StreamingProfilePacket * other)3887 void StreamingProfilePacket::InternalSwap(StreamingProfilePacket* other) {
3888   using std::swap;
3889   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3890   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3891   _impl_.callstack_iid_.InternalSwap(&other->_impl_.callstack_iid_);
3892   _impl_.timestamp_delta_us_.InternalSwap(&other->_impl_.timestamp_delta_us_);
3893   swap(_impl_.process_priority_, other->_impl_.process_priority_);
3894 }
3895 
GetTypeName() const3896 std::string StreamingProfilePacket::GetTypeName() const {
3897   return "perfetto.protos.StreamingProfilePacket";
3898 }
3899 
3900 
3901 // ===================================================================
3902 
3903 class Profiling::_Internal {
3904  public:
3905 };
3906 
Profiling(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3907 Profiling::Profiling(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3908                          bool is_message_owned)
3909   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3910   SharedCtor(arena, is_message_owned);
3911   // @@protoc_insertion_point(arena_constructor:perfetto.protos.Profiling)
3912 }
Profiling(const Profiling & from)3913 Profiling::Profiling(const Profiling& from)
3914   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3915   Profiling* const _this = this; (void)_this;
3916   new (&_impl_) Impl_{
3917       /*decltype(_impl_._cached_size_)*/{}};
3918 
3919   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3920   // @@protoc_insertion_point(copy_constructor:perfetto.protos.Profiling)
3921 }
3922 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3923 inline void Profiling::SharedCtor(
3924     ::_pb::Arena* arena, bool is_message_owned) {
3925   (void)arena;
3926   (void)is_message_owned;
3927   new (&_impl_) Impl_{
3928       /*decltype(_impl_._cached_size_)*/{}
3929   };
3930 }
3931 
~Profiling()3932 Profiling::~Profiling() {
3933   // @@protoc_insertion_point(destructor:perfetto.protos.Profiling)
3934   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3935   (void)arena;
3936     return;
3937   }
3938   SharedDtor();
3939 }
3940 
SharedDtor()3941 inline void Profiling::SharedDtor() {
3942   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3943 }
3944 
SetCachedSize(int size) const3945 void Profiling::SetCachedSize(int size) const {
3946   _impl_._cached_size_.Set(size);
3947 }
3948 
Clear()3949 void Profiling::Clear() {
3950 // @@protoc_insertion_point(message_clear_start:perfetto.protos.Profiling)
3951   ::uint32_t cached_has_bits = 0;
3952   // Prevent compiler warnings about cached_has_bits being unused
3953   (void) cached_has_bits;
3954 
3955   _internal_metadata_.Clear<std::string>();
3956 }
3957 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3958 const char* Profiling::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3959 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3960   while (!ctx->Done(&ptr)) {
3961     ::uint32_t tag;
3962     ptr = ::_pbi::ReadTag(ptr, &tag);
3963     if ((tag == 0) || ((tag & 7) == 4)) {
3964       CHK_(ptr);
3965       ctx->SetLastTag(tag);
3966       goto message_done;
3967     }
3968     ptr = UnknownFieldParse(
3969         tag,
3970         _internal_metadata_.mutable_unknown_fields<std::string>(),
3971         ptr, ctx);
3972     CHK_(ptr != nullptr);
3973   }  // while
3974 message_done:
3975   return ptr;
3976 failure:
3977   ptr = nullptr;
3978   goto message_done;
3979 #undef CHK_
3980 }
3981 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3982 ::uint8_t* Profiling::_InternalSerialize(
3983     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3984   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.Profiling)
3985   ::uint32_t cached_has_bits = 0;
3986   (void) cached_has_bits;
3987 
3988   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3989     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3990         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3991   }
3992   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.Profiling)
3993   return target;
3994 }
3995 
ByteSizeLong() const3996 size_t Profiling::ByteSizeLong() const {
3997 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.Profiling)
3998   size_t total_size = 0;
3999 
4000   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4001     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4002   }
4003   int cached_size = ::_pbi::ToCachedSize(total_size);
4004   SetCachedSize(cached_size);
4005   return total_size;
4006 }
4007 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4008 void Profiling::CheckTypeAndMergeFrom(
4009     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4010   MergeFrom(*::_pbi::DownCast<const Profiling*>(
4011       &from));
4012 }
4013 
MergeFrom(const Profiling & from)4014 void Profiling::MergeFrom(const Profiling& from) {
4015   Profiling* const _this = this;
4016   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.Profiling)
4017   GOOGLE_DCHECK_NE(&from, _this);
4018   ::uint32_t cached_has_bits = 0;
4019   (void) cached_has_bits;
4020 
4021   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4022 }
4023 
CopyFrom(const Profiling & from)4024 void Profiling::CopyFrom(const Profiling& from) {
4025 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.Profiling)
4026   if (&from == this) return;
4027   Clear();
4028   MergeFrom(from);
4029 }
4030 
IsInitialized() const4031 bool Profiling::IsInitialized() const {
4032   return true;
4033 }
4034 
InternalSwap(Profiling * other)4035 void Profiling::InternalSwap(Profiling* other) {
4036   using std::swap;
4037   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4038 }
4039 
GetTypeName() const4040 std::string Profiling::GetTypeName() const {
4041   return "perfetto.protos.Profiling";
4042 }
4043 
4044 
4045 // ===================================================================
4046 
4047 class PerfSample_ProducerEvent::_Internal {
4048  public:
4049 };
4050 
PerfSample_ProducerEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4051 PerfSample_ProducerEvent::PerfSample_ProducerEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4052                          bool is_message_owned)
4053   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4054   SharedCtor(arena, is_message_owned);
4055   // @@protoc_insertion_point(arena_constructor:perfetto.protos.PerfSample.ProducerEvent)
4056 }
PerfSample_ProducerEvent(const PerfSample_ProducerEvent & from)4057 PerfSample_ProducerEvent::PerfSample_ProducerEvent(const PerfSample_ProducerEvent& from)
4058   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4059   PerfSample_ProducerEvent* const _this = this; (void)_this;
4060   new (&_impl_) Impl_{
4061       decltype(_impl_.optional_source_stop_reason_){}
4062     , /*decltype(_impl_._cached_size_)*/{}
4063     , /*decltype(_impl_._oneof_case_)*/{}};
4064 
4065   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4066   clear_has_optional_source_stop_reason();
4067   switch (from.optional_source_stop_reason_case()) {
4068     case kSourceStopReason: {
4069       _this->_internal_set_source_stop_reason(from._internal_source_stop_reason());
4070       break;
4071     }
4072     case OPTIONAL_SOURCE_STOP_REASON_NOT_SET: {
4073       break;
4074     }
4075   }
4076   // @@protoc_insertion_point(copy_constructor:perfetto.protos.PerfSample.ProducerEvent)
4077 }
4078 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4079 inline void PerfSample_ProducerEvent::SharedCtor(
4080     ::_pb::Arena* arena, bool is_message_owned) {
4081   (void)arena;
4082   (void)is_message_owned;
4083   new (&_impl_) Impl_{
4084       decltype(_impl_.optional_source_stop_reason_){}
4085     , /*decltype(_impl_._cached_size_)*/{}
4086     , /*decltype(_impl_._oneof_case_)*/{}
4087   };
4088   clear_has_optional_source_stop_reason();
4089 }
4090 
~PerfSample_ProducerEvent()4091 PerfSample_ProducerEvent::~PerfSample_ProducerEvent() {
4092   // @@protoc_insertion_point(destructor:perfetto.protos.PerfSample.ProducerEvent)
4093   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4094   (void)arena;
4095     return;
4096   }
4097   SharedDtor();
4098 }
4099 
SharedDtor()4100 inline void PerfSample_ProducerEvent::SharedDtor() {
4101   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4102   if (has_optional_source_stop_reason()) {
4103     clear_optional_source_stop_reason();
4104   }
4105 }
4106 
SetCachedSize(int size) const4107 void PerfSample_ProducerEvent::SetCachedSize(int size) const {
4108   _impl_._cached_size_.Set(size);
4109 }
4110 
clear_optional_source_stop_reason()4111 void PerfSample_ProducerEvent::clear_optional_source_stop_reason() {
4112 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.PerfSample.ProducerEvent)
4113   switch (optional_source_stop_reason_case()) {
4114     case kSourceStopReason: {
4115       // No need to clear
4116       break;
4117     }
4118     case OPTIONAL_SOURCE_STOP_REASON_NOT_SET: {
4119       break;
4120     }
4121   }
4122   _impl_._oneof_case_[0] = OPTIONAL_SOURCE_STOP_REASON_NOT_SET;
4123 }
4124 
4125 
Clear()4126 void PerfSample_ProducerEvent::Clear() {
4127 // @@protoc_insertion_point(message_clear_start:perfetto.protos.PerfSample.ProducerEvent)
4128   ::uint32_t cached_has_bits = 0;
4129   // Prevent compiler warnings about cached_has_bits being unused
4130   (void) cached_has_bits;
4131 
4132   clear_optional_source_stop_reason();
4133   _internal_metadata_.Clear<std::string>();
4134 }
4135 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4136 const char* PerfSample_ProducerEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4137 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4138   while (!ctx->Done(&ptr)) {
4139     ::uint32_t tag;
4140     ptr = ::_pbi::ReadTag(ptr, &tag);
4141     switch (tag >> 3) {
4142       // .perfetto.protos.PerfSample.ProducerEvent.DataSourceStopReason source_stop_reason = 1;
4143       case 1:
4144         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
4145           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4146           CHK_(ptr);
4147           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::PerfSample_ProducerEvent_DataSourceStopReason_IsValid(val))) {
4148             _internal_set_source_stop_reason(static_cast<::perfetto::protos::PerfSample_ProducerEvent_DataSourceStopReason>(val));
4149           } else {
4150             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
4151           }
4152         } else {
4153           goto handle_unusual;
4154         }
4155         continue;
4156       default:
4157         goto handle_unusual;
4158     }  // switch
4159   handle_unusual:
4160     if ((tag == 0) || ((tag & 7) == 4)) {
4161       CHK_(ptr);
4162       ctx->SetLastTag(tag);
4163       goto message_done;
4164     }
4165     ptr = UnknownFieldParse(
4166         tag,
4167         _internal_metadata_.mutable_unknown_fields<std::string>(),
4168         ptr, ctx);
4169     CHK_(ptr != nullptr);
4170   }  // while
4171 message_done:
4172   return ptr;
4173 failure:
4174   ptr = nullptr;
4175   goto message_done;
4176 #undef CHK_
4177 }
4178 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4179 ::uint8_t* PerfSample_ProducerEvent::_InternalSerialize(
4180     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4181   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.PerfSample.ProducerEvent)
4182   ::uint32_t cached_has_bits = 0;
4183   (void) cached_has_bits;
4184 
4185   // .perfetto.protos.PerfSample.ProducerEvent.DataSourceStopReason source_stop_reason = 1;
4186   if (_internal_has_source_stop_reason()) {
4187     target = stream->EnsureSpace(target);
4188     target = ::_pbi::WireFormatLite::WriteEnumToArray(
4189       1, this->_internal_source_stop_reason(), target);
4190   }
4191 
4192   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4193     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4194         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4195   }
4196   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.PerfSample.ProducerEvent)
4197   return target;
4198 }
4199 
ByteSizeLong() const4200 size_t PerfSample_ProducerEvent::ByteSizeLong() const {
4201 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.PerfSample.ProducerEvent)
4202   size_t total_size = 0;
4203 
4204   switch (optional_source_stop_reason_case()) {
4205     // .perfetto.protos.PerfSample.ProducerEvent.DataSourceStopReason source_stop_reason = 1;
4206     case kSourceStopReason: {
4207       total_size += 1 +
4208         ::_pbi::WireFormatLite::EnumSize(this->_internal_source_stop_reason());
4209       break;
4210     }
4211     case OPTIONAL_SOURCE_STOP_REASON_NOT_SET: {
4212       break;
4213     }
4214   }
4215   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4216     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4217   }
4218   int cached_size = ::_pbi::ToCachedSize(total_size);
4219   SetCachedSize(cached_size);
4220   return total_size;
4221 }
4222 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4223 void PerfSample_ProducerEvent::CheckTypeAndMergeFrom(
4224     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4225   MergeFrom(*::_pbi::DownCast<const PerfSample_ProducerEvent*>(
4226       &from));
4227 }
4228 
MergeFrom(const PerfSample_ProducerEvent & from)4229 void PerfSample_ProducerEvent::MergeFrom(const PerfSample_ProducerEvent& from) {
4230   PerfSample_ProducerEvent* const _this = this;
4231   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.PerfSample.ProducerEvent)
4232   GOOGLE_DCHECK_NE(&from, _this);
4233   ::uint32_t cached_has_bits = 0;
4234   (void) cached_has_bits;
4235 
4236   switch (from.optional_source_stop_reason_case()) {
4237     case kSourceStopReason: {
4238       _this->_internal_set_source_stop_reason(from._internal_source_stop_reason());
4239       break;
4240     }
4241     case OPTIONAL_SOURCE_STOP_REASON_NOT_SET: {
4242       break;
4243     }
4244   }
4245   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4246 }
4247 
CopyFrom(const PerfSample_ProducerEvent & from)4248 void PerfSample_ProducerEvent::CopyFrom(const PerfSample_ProducerEvent& from) {
4249 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.PerfSample.ProducerEvent)
4250   if (&from == this) return;
4251   Clear();
4252   MergeFrom(from);
4253 }
4254 
IsInitialized() const4255 bool PerfSample_ProducerEvent::IsInitialized() const {
4256   return true;
4257 }
4258 
InternalSwap(PerfSample_ProducerEvent * other)4259 void PerfSample_ProducerEvent::InternalSwap(PerfSample_ProducerEvent* other) {
4260   using std::swap;
4261   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4262   swap(_impl_.optional_source_stop_reason_, other->_impl_.optional_source_stop_reason_);
4263   swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
4264 }
4265 
GetTypeName() const4266 std::string PerfSample_ProducerEvent::GetTypeName() const {
4267   return "perfetto.protos.PerfSample.ProducerEvent";
4268 }
4269 
4270 
4271 // ===================================================================
4272 
4273 class PerfSample::_Internal {
4274  public:
4275   using HasBits = decltype(std::declval<PerfSample>()._impl_._has_bits_);
set_has_cpu(HasBits * has_bits)4276   static void set_has_cpu(HasBits* has_bits) {
4277     (*has_bits)[0] |= 2u;
4278   }
set_has_pid(HasBits * has_bits)4279   static void set_has_pid(HasBits* has_bits) {
4280     (*has_bits)[0] |= 4u;
4281   }
set_has_tid(HasBits * has_bits)4282   static void set_has_tid(HasBits* has_bits) {
4283     (*has_bits)[0] |= 16u;
4284   }
set_has_cpu_mode(HasBits * has_bits)4285   static void set_has_cpu_mode(HasBits* has_bits) {
4286     (*has_bits)[0] |= 32u;
4287   }
set_has_timebase_count(HasBits * has_bits)4288   static void set_has_timebase_count(HasBits* has_bits) {
4289     (*has_bits)[0] |= 64u;
4290   }
set_has_callstack_iid(HasBits * has_bits)4291   static void set_has_callstack_iid(HasBits* has_bits) {
4292     (*has_bits)[0] |= 8u;
4293   }
set_has_kernel_records_lost(HasBits * has_bits)4294   static void set_has_kernel_records_lost(HasBits* has_bits) {
4295     (*has_bits)[0] |= 128u;
4296   }
4297   static const ::perfetto::protos::PerfSample_ProducerEvent& producer_event(const PerfSample* msg);
set_has_producer_event(HasBits * has_bits)4298   static void set_has_producer_event(HasBits* has_bits) {
4299     (*has_bits)[0] |= 1u;
4300   }
4301 };
4302 
4303 const ::perfetto::protos::PerfSample_ProducerEvent&
producer_event(const PerfSample * msg)4304 PerfSample::_Internal::producer_event(const PerfSample* msg) {
4305   return *msg->_impl_.producer_event_;
4306 }
PerfSample(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4307 PerfSample::PerfSample(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4308                          bool is_message_owned)
4309   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4310   SharedCtor(arena, is_message_owned);
4311   // @@protoc_insertion_point(arena_constructor:perfetto.protos.PerfSample)
4312 }
PerfSample(const PerfSample & from)4313 PerfSample::PerfSample(const PerfSample& from)
4314   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4315   PerfSample* const _this = this; (void)_this;
4316   new (&_impl_) Impl_{
4317       decltype(_impl_._has_bits_){from._impl_._has_bits_}
4318     , /*decltype(_impl_._cached_size_)*/{}
4319     , decltype(_impl_.follower_counts_){from._impl_.follower_counts_}
4320     , decltype(_impl_.producer_event_){nullptr}
4321     , decltype(_impl_.cpu_){}
4322     , decltype(_impl_.pid_){}
4323     , decltype(_impl_.callstack_iid_){}
4324     , decltype(_impl_.tid_){}
4325     , decltype(_impl_.cpu_mode_){}
4326     , decltype(_impl_.timebase_count_){}
4327     , decltype(_impl_.kernel_records_lost_){}
4328     , decltype(_impl_.optional_unwind_error_){}
4329     , decltype(_impl_.optional_sample_skipped_reason_){}
4330     , /*decltype(_impl_._oneof_case_)*/{}};
4331 
4332   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4333   if (from._internal_has_producer_event()) {
4334     _this->_impl_.producer_event_ = new ::perfetto::protos::PerfSample_ProducerEvent(*from._impl_.producer_event_);
4335   }
4336   ::memcpy(&_impl_.cpu_, &from._impl_.cpu_,
4337     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.kernel_records_lost_) -
4338     reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.kernel_records_lost_));
4339   clear_has_optional_unwind_error();
4340   switch (from.optional_unwind_error_case()) {
4341     case kUnwindError: {
4342       _this->_internal_set_unwind_error(from._internal_unwind_error());
4343       break;
4344     }
4345     case OPTIONAL_UNWIND_ERROR_NOT_SET: {
4346       break;
4347     }
4348   }
4349   clear_has_optional_sample_skipped_reason();
4350   switch (from.optional_sample_skipped_reason_case()) {
4351     case kSampleSkippedReason: {
4352       _this->_internal_set_sample_skipped_reason(from._internal_sample_skipped_reason());
4353       break;
4354     }
4355     case OPTIONAL_SAMPLE_SKIPPED_REASON_NOT_SET: {
4356       break;
4357     }
4358   }
4359   // @@protoc_insertion_point(copy_constructor:perfetto.protos.PerfSample)
4360 }
4361 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4362 inline void PerfSample::SharedCtor(
4363     ::_pb::Arena* arena, bool is_message_owned) {
4364   (void)arena;
4365   (void)is_message_owned;
4366   new (&_impl_) Impl_{
4367       decltype(_impl_._has_bits_){}
4368     , /*decltype(_impl_._cached_size_)*/{}
4369     , decltype(_impl_.follower_counts_){arena}
4370     , decltype(_impl_.producer_event_){nullptr}
4371     , decltype(_impl_.cpu_){0u}
4372     , decltype(_impl_.pid_){0u}
4373     , decltype(_impl_.callstack_iid_){::uint64_t{0u}}
4374     , decltype(_impl_.tid_){0u}
4375     , decltype(_impl_.cpu_mode_){0}
4376     , decltype(_impl_.timebase_count_){::uint64_t{0u}}
4377     , decltype(_impl_.kernel_records_lost_){::uint64_t{0u}}
4378     , decltype(_impl_.optional_unwind_error_){}
4379     , decltype(_impl_.optional_sample_skipped_reason_){}
4380     , /*decltype(_impl_._oneof_case_)*/{}
4381   };
4382   clear_has_optional_unwind_error();
4383   clear_has_optional_sample_skipped_reason();
4384 }
4385 
~PerfSample()4386 PerfSample::~PerfSample() {
4387   // @@protoc_insertion_point(destructor:perfetto.protos.PerfSample)
4388   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4389   (void)arena;
4390     return;
4391   }
4392   SharedDtor();
4393 }
4394 
SharedDtor()4395 inline void PerfSample::SharedDtor() {
4396   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4397   _impl_.follower_counts_.~RepeatedField();
4398   if (this != internal_default_instance()) delete _impl_.producer_event_;
4399   if (has_optional_unwind_error()) {
4400     clear_optional_unwind_error();
4401   }
4402   if (has_optional_sample_skipped_reason()) {
4403     clear_optional_sample_skipped_reason();
4404   }
4405 }
4406 
SetCachedSize(int size) const4407 void PerfSample::SetCachedSize(int size) const {
4408   _impl_._cached_size_.Set(size);
4409 }
4410 
clear_optional_unwind_error()4411 void PerfSample::clear_optional_unwind_error() {
4412 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.PerfSample)
4413   switch (optional_unwind_error_case()) {
4414     case kUnwindError: {
4415       // No need to clear
4416       break;
4417     }
4418     case OPTIONAL_UNWIND_ERROR_NOT_SET: {
4419       break;
4420     }
4421   }
4422   _impl_._oneof_case_[0] = OPTIONAL_UNWIND_ERROR_NOT_SET;
4423 }
4424 
clear_optional_sample_skipped_reason()4425 void PerfSample::clear_optional_sample_skipped_reason() {
4426 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.PerfSample)
4427   switch (optional_sample_skipped_reason_case()) {
4428     case kSampleSkippedReason: {
4429       // No need to clear
4430       break;
4431     }
4432     case OPTIONAL_SAMPLE_SKIPPED_REASON_NOT_SET: {
4433       break;
4434     }
4435   }
4436   _impl_._oneof_case_[1] = OPTIONAL_SAMPLE_SKIPPED_REASON_NOT_SET;
4437 }
4438 
4439 
Clear()4440 void PerfSample::Clear() {
4441 // @@protoc_insertion_point(message_clear_start:perfetto.protos.PerfSample)
4442   ::uint32_t cached_has_bits = 0;
4443   // Prevent compiler warnings about cached_has_bits being unused
4444   (void) cached_has_bits;
4445 
4446   _impl_.follower_counts_.Clear();
4447   cached_has_bits = _impl_._has_bits_[0];
4448   if (cached_has_bits & 0x00000001u) {
4449     GOOGLE_DCHECK(_impl_.producer_event_ != nullptr);
4450     _impl_.producer_event_->Clear();
4451   }
4452   if (cached_has_bits & 0x000000feu) {
4453     ::memset(&_impl_.cpu_, 0, static_cast<size_t>(
4454         reinterpret_cast<char*>(&_impl_.kernel_records_lost_) -
4455         reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.kernel_records_lost_));
4456   }
4457   clear_optional_unwind_error();
4458   clear_optional_sample_skipped_reason();
4459   _impl_._has_bits_.Clear();
4460   _internal_metadata_.Clear<std::string>();
4461 }
4462 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4463 const char* PerfSample::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4464 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4465   _Internal::HasBits has_bits{};
4466   while (!ctx->Done(&ptr)) {
4467     ::uint32_t tag;
4468     ptr = ::_pbi::ReadTag(ptr, &tag);
4469     switch (tag >> 3) {
4470       // optional uint32 cpu = 1;
4471       case 1:
4472         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
4473           _Internal::set_has_cpu(&has_bits);
4474           _impl_.cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4475           CHK_(ptr);
4476         } else {
4477           goto handle_unusual;
4478         }
4479         continue;
4480       // optional uint32 pid = 2;
4481       case 2:
4482         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
4483           _Internal::set_has_pid(&has_bits);
4484           _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4485           CHK_(ptr);
4486         } else {
4487           goto handle_unusual;
4488         }
4489         continue;
4490       // optional uint32 tid = 3;
4491       case 3:
4492         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
4493           _Internal::set_has_tid(&has_bits);
4494           _impl_.tid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4495           CHK_(ptr);
4496         } else {
4497           goto handle_unusual;
4498         }
4499         continue;
4500       // optional uint64 callstack_iid = 4;
4501       case 4:
4502         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
4503           _Internal::set_has_callstack_iid(&has_bits);
4504           _impl_.callstack_iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4505           CHK_(ptr);
4506         } else {
4507           goto handle_unusual;
4508         }
4509         continue;
4510       // optional .perfetto.protos.Profiling.CpuMode cpu_mode = 5;
4511       case 5:
4512         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
4513           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4514           CHK_(ptr);
4515           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::Profiling_CpuMode_IsValid(val))) {
4516             _internal_set_cpu_mode(static_cast<::perfetto::protos::Profiling_CpuMode>(val));
4517           } else {
4518             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
4519           }
4520         } else {
4521           goto handle_unusual;
4522         }
4523         continue;
4524       // optional uint64 timebase_count = 6;
4525       case 6:
4526         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
4527           _Internal::set_has_timebase_count(&has_bits);
4528           _impl_.timebase_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4529           CHK_(ptr);
4530         } else {
4531           goto handle_unusual;
4532         }
4533         continue;
4534       // repeated uint64 follower_counts = 7;
4535       case 7:
4536         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
4537           ptr -= 1;
4538           do {
4539             ptr += 1;
4540             _internal_add_follower_counts(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
4541             CHK_(ptr);
4542             if (!ctx->DataAvailable(ptr)) break;
4543           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<56>(ptr));
4544         } else if (static_cast<::uint8_t>(tag) == 58) {
4545           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_follower_counts(), ptr, ctx);
4546           CHK_(ptr);
4547         } else {
4548           goto handle_unusual;
4549         }
4550         continue;
4551       // .perfetto.protos.Profiling.StackUnwindError unwind_error = 16;
4552       case 16:
4553         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
4554           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4555           CHK_(ptr);
4556           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::Profiling_StackUnwindError_IsValid(val))) {
4557             _internal_set_unwind_error(static_cast<::perfetto::protos::Profiling_StackUnwindError>(val));
4558           } else {
4559             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(16, val, mutable_unknown_fields());
4560           }
4561         } else {
4562           goto handle_unusual;
4563         }
4564         continue;
4565       // optional uint64 kernel_records_lost = 17;
4566       case 17:
4567         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
4568           _Internal::set_has_kernel_records_lost(&has_bits);
4569           _impl_.kernel_records_lost_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4570           CHK_(ptr);
4571         } else {
4572           goto handle_unusual;
4573         }
4574         continue;
4575       // .perfetto.protos.PerfSample.SampleSkipReason sample_skipped_reason = 18;
4576       case 18:
4577         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 144)) {
4578           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4579           CHK_(ptr);
4580           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::PerfSample_SampleSkipReason_IsValid(val))) {
4581             _internal_set_sample_skipped_reason(static_cast<::perfetto::protos::PerfSample_SampleSkipReason>(val));
4582           } else {
4583             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(18, val, mutable_unknown_fields());
4584           }
4585         } else {
4586           goto handle_unusual;
4587         }
4588         continue;
4589       // optional .perfetto.protos.PerfSample.ProducerEvent producer_event = 19;
4590       case 19:
4591         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 154)) {
4592           ptr = ctx->ParseMessage(_internal_mutable_producer_event(), ptr);
4593           CHK_(ptr);
4594         } else {
4595           goto handle_unusual;
4596         }
4597         continue;
4598       default:
4599         goto handle_unusual;
4600     }  // switch
4601   handle_unusual:
4602     if ((tag == 0) || ((tag & 7) == 4)) {
4603       CHK_(ptr);
4604       ctx->SetLastTag(tag);
4605       goto message_done;
4606     }
4607     ptr = UnknownFieldParse(
4608         tag,
4609         _internal_metadata_.mutable_unknown_fields<std::string>(),
4610         ptr, ctx);
4611     CHK_(ptr != nullptr);
4612   }  // while
4613 message_done:
4614   _impl_._has_bits_.Or(has_bits);
4615   return ptr;
4616 failure:
4617   ptr = nullptr;
4618   goto message_done;
4619 #undef CHK_
4620 }
4621 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4622 ::uint8_t* PerfSample::_InternalSerialize(
4623     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4624   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.PerfSample)
4625   ::uint32_t cached_has_bits = 0;
4626   (void) cached_has_bits;
4627 
4628   cached_has_bits = _impl_._has_bits_[0];
4629   // optional uint32 cpu = 1;
4630   if (cached_has_bits & 0x00000002u) {
4631     target = stream->EnsureSpace(target);
4632     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cpu(), target);
4633   }
4634 
4635   // optional uint32 pid = 2;
4636   if (cached_has_bits & 0x00000004u) {
4637     target = stream->EnsureSpace(target);
4638     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_pid(), target);
4639   }
4640 
4641   // optional uint32 tid = 3;
4642   if (cached_has_bits & 0x00000010u) {
4643     target = stream->EnsureSpace(target);
4644     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_tid(), target);
4645   }
4646 
4647   // optional uint64 callstack_iid = 4;
4648   if (cached_has_bits & 0x00000008u) {
4649     target = stream->EnsureSpace(target);
4650     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_callstack_iid(), target);
4651   }
4652 
4653   // optional .perfetto.protos.Profiling.CpuMode cpu_mode = 5;
4654   if (cached_has_bits & 0x00000020u) {
4655     target = stream->EnsureSpace(target);
4656     target = ::_pbi::WireFormatLite::WriteEnumToArray(
4657       5, this->_internal_cpu_mode(), target);
4658   }
4659 
4660   // optional uint64 timebase_count = 6;
4661   if (cached_has_bits & 0x00000040u) {
4662     target = stream->EnsureSpace(target);
4663     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_timebase_count(), target);
4664   }
4665 
4666   // repeated uint64 follower_counts = 7;
4667   for (int i = 0, n = this->_internal_follower_counts_size(); i < n; i++) {
4668     target = stream->EnsureSpace(target);
4669     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_follower_counts(i), target);
4670   }
4671 
4672   // .perfetto.protos.Profiling.StackUnwindError unwind_error = 16;
4673   if (_internal_has_unwind_error()) {
4674     target = stream->EnsureSpace(target);
4675     target = ::_pbi::WireFormatLite::WriteEnumToArray(
4676       16, this->_internal_unwind_error(), target);
4677   }
4678 
4679   // optional uint64 kernel_records_lost = 17;
4680   if (cached_has_bits & 0x00000080u) {
4681     target = stream->EnsureSpace(target);
4682     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(17, this->_internal_kernel_records_lost(), target);
4683   }
4684 
4685   // .perfetto.protos.PerfSample.SampleSkipReason sample_skipped_reason = 18;
4686   if (_internal_has_sample_skipped_reason()) {
4687     target = stream->EnsureSpace(target);
4688     target = ::_pbi::WireFormatLite::WriteEnumToArray(
4689       18, this->_internal_sample_skipped_reason(), target);
4690   }
4691 
4692   // optional .perfetto.protos.PerfSample.ProducerEvent producer_event = 19;
4693   if (cached_has_bits & 0x00000001u) {
4694     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4695       InternalWriteMessage(19, _Internal::producer_event(this),
4696         _Internal::producer_event(this).GetCachedSize(), target, stream);
4697   }
4698 
4699   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4700     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4701         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4702   }
4703   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.PerfSample)
4704   return target;
4705 }
4706 
ByteSizeLong() const4707 size_t PerfSample::ByteSizeLong() const {
4708 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.PerfSample)
4709   size_t total_size = 0;
4710 
4711   ::uint32_t cached_has_bits = 0;
4712   // Prevent compiler warnings about cached_has_bits being unused
4713   (void) cached_has_bits;
4714 
4715   // repeated uint64 follower_counts = 7;
4716   {
4717     size_t data_size = ::_pbi::WireFormatLite::
4718       UInt64Size(this->_impl_.follower_counts_);
4719     total_size += 1 *
4720                   ::_pbi::FromIntSize(this->_internal_follower_counts_size());
4721     total_size += data_size;
4722   }
4723 
4724   cached_has_bits = _impl_._has_bits_[0];
4725   if (cached_has_bits & 0x000000ffu) {
4726     // optional .perfetto.protos.PerfSample.ProducerEvent producer_event = 19;
4727     if (cached_has_bits & 0x00000001u) {
4728       total_size += 2 +
4729         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4730           *_impl_.producer_event_);
4731     }
4732 
4733     // optional uint32 cpu = 1;
4734     if (cached_has_bits & 0x00000002u) {
4735       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpu());
4736     }
4737 
4738     // optional uint32 pid = 2;
4739     if (cached_has_bits & 0x00000004u) {
4740       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pid());
4741     }
4742 
4743     // optional uint64 callstack_iid = 4;
4744     if (cached_has_bits & 0x00000008u) {
4745       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_callstack_iid());
4746     }
4747 
4748     // optional uint32 tid = 3;
4749     if (cached_has_bits & 0x00000010u) {
4750       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_tid());
4751     }
4752 
4753     // optional .perfetto.protos.Profiling.CpuMode cpu_mode = 5;
4754     if (cached_has_bits & 0x00000020u) {
4755       total_size += 1 +
4756         ::_pbi::WireFormatLite::EnumSize(this->_internal_cpu_mode());
4757     }
4758 
4759     // optional uint64 timebase_count = 6;
4760     if (cached_has_bits & 0x00000040u) {
4761       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_timebase_count());
4762     }
4763 
4764     // optional uint64 kernel_records_lost = 17;
4765     if (cached_has_bits & 0x00000080u) {
4766       total_size += 2 +
4767         ::_pbi::WireFormatLite::UInt64Size(
4768           this->_internal_kernel_records_lost());
4769     }
4770 
4771   }
4772   switch (optional_unwind_error_case()) {
4773     // .perfetto.protos.Profiling.StackUnwindError unwind_error = 16;
4774     case kUnwindError: {
4775       total_size += 2 +
4776         ::_pbi::WireFormatLite::EnumSize(this->_internal_unwind_error());
4777       break;
4778     }
4779     case OPTIONAL_UNWIND_ERROR_NOT_SET: {
4780       break;
4781     }
4782   }
4783   switch (optional_sample_skipped_reason_case()) {
4784     // .perfetto.protos.PerfSample.SampleSkipReason sample_skipped_reason = 18;
4785     case kSampleSkippedReason: {
4786       total_size += 2 +
4787         ::_pbi::WireFormatLite::EnumSize(this->_internal_sample_skipped_reason());
4788       break;
4789     }
4790     case OPTIONAL_SAMPLE_SKIPPED_REASON_NOT_SET: {
4791       break;
4792     }
4793   }
4794   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4795     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4796   }
4797   int cached_size = ::_pbi::ToCachedSize(total_size);
4798   SetCachedSize(cached_size);
4799   return total_size;
4800 }
4801 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4802 void PerfSample::CheckTypeAndMergeFrom(
4803     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4804   MergeFrom(*::_pbi::DownCast<const PerfSample*>(
4805       &from));
4806 }
4807 
MergeFrom(const PerfSample & from)4808 void PerfSample::MergeFrom(const PerfSample& from) {
4809   PerfSample* const _this = this;
4810   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.PerfSample)
4811   GOOGLE_DCHECK_NE(&from, _this);
4812   ::uint32_t cached_has_bits = 0;
4813   (void) cached_has_bits;
4814 
4815   _this->_impl_.follower_counts_.MergeFrom(from._impl_.follower_counts_);
4816   cached_has_bits = from._impl_._has_bits_[0];
4817   if (cached_has_bits & 0x000000ffu) {
4818     if (cached_has_bits & 0x00000001u) {
4819       _this->_internal_mutable_producer_event()->::perfetto::protos::PerfSample_ProducerEvent::MergeFrom(
4820           from._internal_producer_event());
4821     }
4822     if (cached_has_bits & 0x00000002u) {
4823       _this->_impl_.cpu_ = from._impl_.cpu_;
4824     }
4825     if (cached_has_bits & 0x00000004u) {
4826       _this->_impl_.pid_ = from._impl_.pid_;
4827     }
4828     if (cached_has_bits & 0x00000008u) {
4829       _this->_impl_.callstack_iid_ = from._impl_.callstack_iid_;
4830     }
4831     if (cached_has_bits & 0x00000010u) {
4832       _this->_impl_.tid_ = from._impl_.tid_;
4833     }
4834     if (cached_has_bits & 0x00000020u) {
4835       _this->_impl_.cpu_mode_ = from._impl_.cpu_mode_;
4836     }
4837     if (cached_has_bits & 0x00000040u) {
4838       _this->_impl_.timebase_count_ = from._impl_.timebase_count_;
4839     }
4840     if (cached_has_bits & 0x00000080u) {
4841       _this->_impl_.kernel_records_lost_ = from._impl_.kernel_records_lost_;
4842     }
4843     _this->_impl_._has_bits_[0] |= cached_has_bits;
4844   }
4845   switch (from.optional_unwind_error_case()) {
4846     case kUnwindError: {
4847       _this->_internal_set_unwind_error(from._internal_unwind_error());
4848       break;
4849     }
4850     case OPTIONAL_UNWIND_ERROR_NOT_SET: {
4851       break;
4852     }
4853   }
4854   switch (from.optional_sample_skipped_reason_case()) {
4855     case kSampleSkippedReason: {
4856       _this->_internal_set_sample_skipped_reason(from._internal_sample_skipped_reason());
4857       break;
4858     }
4859     case OPTIONAL_SAMPLE_SKIPPED_REASON_NOT_SET: {
4860       break;
4861     }
4862   }
4863   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4864 }
4865 
CopyFrom(const PerfSample & from)4866 void PerfSample::CopyFrom(const PerfSample& from) {
4867 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.PerfSample)
4868   if (&from == this) return;
4869   Clear();
4870   MergeFrom(from);
4871 }
4872 
IsInitialized() const4873 bool PerfSample::IsInitialized() const {
4874   return true;
4875 }
4876 
InternalSwap(PerfSample * other)4877 void PerfSample::InternalSwap(PerfSample* other) {
4878   using std::swap;
4879   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4880   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4881   _impl_.follower_counts_.InternalSwap(&other->_impl_.follower_counts_);
4882   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4883       PROTOBUF_FIELD_OFFSET(PerfSample, _impl_.kernel_records_lost_)
4884       + sizeof(PerfSample::_impl_.kernel_records_lost_)  // NOLINT
4885       - PROTOBUF_FIELD_OFFSET(PerfSample, _impl_.producer_event_)>(
4886           reinterpret_cast<char*>(&_impl_.producer_event_),
4887           reinterpret_cast<char*>(&other->_impl_.producer_event_));
4888   swap(_impl_.optional_unwind_error_, other->_impl_.optional_unwind_error_);
4889   swap(_impl_.optional_sample_skipped_reason_, other->_impl_.optional_sample_skipped_reason_);
4890   swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
4891   swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]);
4892 }
4893 
GetTypeName() const4894 std::string PerfSample::GetTypeName() const {
4895   return "perfetto.protos.PerfSample";
4896 }
4897 
4898 
4899 // ===================================================================
4900 
4901 class PerfSampleDefaults::_Internal {
4902  public:
4903   using HasBits = decltype(std::declval<PerfSampleDefaults>()._impl_._has_bits_);
4904   static const ::perfetto::protos::PerfEvents_Timebase& timebase(const PerfSampleDefaults* msg);
set_has_timebase(HasBits * has_bits)4905   static void set_has_timebase(HasBits* has_bits) {
4906     (*has_bits)[0] |= 1u;
4907   }
set_has_process_shard_count(HasBits * has_bits)4908   static void set_has_process_shard_count(HasBits* has_bits) {
4909     (*has_bits)[0] |= 2u;
4910   }
set_has_chosen_process_shard(HasBits * has_bits)4911   static void set_has_chosen_process_shard(HasBits* has_bits) {
4912     (*has_bits)[0] |= 4u;
4913   }
4914 };
4915 
4916 const ::perfetto::protos::PerfEvents_Timebase&
timebase(const PerfSampleDefaults * msg)4917 PerfSampleDefaults::_Internal::timebase(const PerfSampleDefaults* msg) {
4918   return *msg->_impl_.timebase_;
4919 }
clear_timebase()4920 void PerfSampleDefaults::clear_timebase() {
4921   if (_impl_.timebase_ != nullptr) _impl_.timebase_->Clear();
4922   _impl_._has_bits_[0] &= ~0x00000001u;
4923 }
clear_followers()4924 void PerfSampleDefaults::clear_followers() {
4925   _impl_.followers_.Clear();
4926 }
PerfSampleDefaults(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4927 PerfSampleDefaults::PerfSampleDefaults(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4928                          bool is_message_owned)
4929   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4930   SharedCtor(arena, is_message_owned);
4931   // @@protoc_insertion_point(arena_constructor:perfetto.protos.PerfSampleDefaults)
4932 }
PerfSampleDefaults(const PerfSampleDefaults & from)4933 PerfSampleDefaults::PerfSampleDefaults(const PerfSampleDefaults& from)
4934   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4935   PerfSampleDefaults* const _this = this; (void)_this;
4936   new (&_impl_) Impl_{
4937       decltype(_impl_._has_bits_){from._impl_._has_bits_}
4938     , /*decltype(_impl_._cached_size_)*/{}
4939     , decltype(_impl_.followers_){from._impl_.followers_}
4940     , decltype(_impl_.timebase_){nullptr}
4941     , decltype(_impl_.process_shard_count_){}
4942     , decltype(_impl_.chosen_process_shard_){}};
4943 
4944   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4945   if (from._internal_has_timebase()) {
4946     _this->_impl_.timebase_ = new ::perfetto::protos::PerfEvents_Timebase(*from._impl_.timebase_);
4947   }
4948   ::memcpy(&_impl_.process_shard_count_, &from._impl_.process_shard_count_,
4949     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.chosen_process_shard_) -
4950     reinterpret_cast<char*>(&_impl_.process_shard_count_)) + sizeof(_impl_.chosen_process_shard_));
4951   // @@protoc_insertion_point(copy_constructor:perfetto.protos.PerfSampleDefaults)
4952 }
4953 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4954 inline void PerfSampleDefaults::SharedCtor(
4955     ::_pb::Arena* arena, bool is_message_owned) {
4956   (void)arena;
4957   (void)is_message_owned;
4958   new (&_impl_) Impl_{
4959       decltype(_impl_._has_bits_){}
4960     , /*decltype(_impl_._cached_size_)*/{}
4961     , decltype(_impl_.followers_){arena}
4962     , decltype(_impl_.timebase_){nullptr}
4963     , decltype(_impl_.process_shard_count_){0u}
4964     , decltype(_impl_.chosen_process_shard_){0u}
4965   };
4966 }
4967 
~PerfSampleDefaults()4968 PerfSampleDefaults::~PerfSampleDefaults() {
4969   // @@protoc_insertion_point(destructor:perfetto.protos.PerfSampleDefaults)
4970   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4971   (void)arena;
4972     return;
4973   }
4974   SharedDtor();
4975 }
4976 
SharedDtor()4977 inline void PerfSampleDefaults::SharedDtor() {
4978   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4979   _impl_.followers_.~RepeatedPtrField();
4980   if (this != internal_default_instance()) delete _impl_.timebase_;
4981 }
4982 
SetCachedSize(int size) const4983 void PerfSampleDefaults::SetCachedSize(int size) const {
4984   _impl_._cached_size_.Set(size);
4985 }
4986 
Clear()4987 void PerfSampleDefaults::Clear() {
4988 // @@protoc_insertion_point(message_clear_start:perfetto.protos.PerfSampleDefaults)
4989   ::uint32_t cached_has_bits = 0;
4990   // Prevent compiler warnings about cached_has_bits being unused
4991   (void) cached_has_bits;
4992 
4993   _impl_.followers_.Clear();
4994   cached_has_bits = _impl_._has_bits_[0];
4995   if (cached_has_bits & 0x00000001u) {
4996     GOOGLE_DCHECK(_impl_.timebase_ != nullptr);
4997     _impl_.timebase_->Clear();
4998   }
4999   if (cached_has_bits & 0x00000006u) {
5000     ::memset(&_impl_.process_shard_count_, 0, static_cast<size_t>(
5001         reinterpret_cast<char*>(&_impl_.chosen_process_shard_) -
5002         reinterpret_cast<char*>(&_impl_.process_shard_count_)) + sizeof(_impl_.chosen_process_shard_));
5003   }
5004   _impl_._has_bits_.Clear();
5005   _internal_metadata_.Clear<std::string>();
5006 }
5007 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)5008 const char* PerfSampleDefaults::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
5009 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
5010   _Internal::HasBits has_bits{};
5011   while (!ctx->Done(&ptr)) {
5012     ::uint32_t tag;
5013     ptr = ::_pbi::ReadTag(ptr, &tag);
5014     switch (tag >> 3) {
5015       // optional .perfetto.protos.PerfEvents.Timebase timebase = 1;
5016       case 1:
5017         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
5018           ptr = ctx->ParseMessage(_internal_mutable_timebase(), ptr);
5019           CHK_(ptr);
5020         } else {
5021           goto handle_unusual;
5022         }
5023         continue;
5024       // optional uint32 process_shard_count = 2;
5025       case 2:
5026         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
5027           _Internal::set_has_process_shard_count(&has_bits);
5028           _impl_.process_shard_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
5029           CHK_(ptr);
5030         } else {
5031           goto handle_unusual;
5032         }
5033         continue;
5034       // optional uint32 chosen_process_shard = 3;
5035       case 3:
5036         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
5037           _Internal::set_has_chosen_process_shard(&has_bits);
5038           _impl_.chosen_process_shard_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
5039           CHK_(ptr);
5040         } else {
5041           goto handle_unusual;
5042         }
5043         continue;
5044       // repeated .perfetto.protos.FollowerEvent followers = 4;
5045       case 4:
5046         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
5047           ptr -= 1;
5048           do {
5049             ptr += 1;
5050             ptr = ctx->ParseMessage(_internal_add_followers(), ptr);
5051             CHK_(ptr);
5052             if (!ctx->DataAvailable(ptr)) break;
5053           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
5054         } else {
5055           goto handle_unusual;
5056         }
5057         continue;
5058       default:
5059         goto handle_unusual;
5060     }  // switch
5061   handle_unusual:
5062     if ((tag == 0) || ((tag & 7) == 4)) {
5063       CHK_(ptr);
5064       ctx->SetLastTag(tag);
5065       goto message_done;
5066     }
5067     ptr = UnknownFieldParse(
5068         tag,
5069         _internal_metadata_.mutable_unknown_fields<std::string>(),
5070         ptr, ctx);
5071     CHK_(ptr != nullptr);
5072   }  // while
5073 message_done:
5074   _impl_._has_bits_.Or(has_bits);
5075   return ptr;
5076 failure:
5077   ptr = nullptr;
5078   goto message_done;
5079 #undef CHK_
5080 }
5081 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const5082 ::uint8_t* PerfSampleDefaults::_InternalSerialize(
5083     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
5084   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.PerfSampleDefaults)
5085   ::uint32_t cached_has_bits = 0;
5086   (void) cached_has_bits;
5087 
5088   cached_has_bits = _impl_._has_bits_[0];
5089   // optional .perfetto.protos.PerfEvents.Timebase timebase = 1;
5090   if (cached_has_bits & 0x00000001u) {
5091     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
5092       InternalWriteMessage(1, _Internal::timebase(this),
5093         _Internal::timebase(this).GetCachedSize(), target, stream);
5094   }
5095 
5096   // optional uint32 process_shard_count = 2;
5097   if (cached_has_bits & 0x00000002u) {
5098     target = stream->EnsureSpace(target);
5099     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_process_shard_count(), target);
5100   }
5101 
5102   // optional uint32 chosen_process_shard = 3;
5103   if (cached_has_bits & 0x00000004u) {
5104     target = stream->EnsureSpace(target);
5105     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_chosen_process_shard(), target);
5106   }
5107 
5108   // repeated .perfetto.protos.FollowerEvent followers = 4;
5109   for (unsigned i = 0,
5110       n = static_cast<unsigned>(this->_internal_followers_size()); i < n; i++) {
5111     const auto& repfield = this->_internal_followers(i);
5112     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
5113         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
5114   }
5115 
5116   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5117     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
5118         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
5119   }
5120   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.PerfSampleDefaults)
5121   return target;
5122 }
5123 
ByteSizeLong() const5124 size_t PerfSampleDefaults::ByteSizeLong() const {
5125 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.PerfSampleDefaults)
5126   size_t total_size = 0;
5127 
5128   ::uint32_t cached_has_bits = 0;
5129   // Prevent compiler warnings about cached_has_bits being unused
5130   (void) cached_has_bits;
5131 
5132   // repeated .perfetto.protos.FollowerEvent followers = 4;
5133   total_size += 1UL * this->_internal_followers_size();
5134   for (const auto& msg : this->_impl_.followers_) {
5135     total_size +=
5136       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
5137   }
5138 
5139   cached_has_bits = _impl_._has_bits_[0];
5140   if (cached_has_bits & 0x00000007u) {
5141     // optional .perfetto.protos.PerfEvents.Timebase timebase = 1;
5142     if (cached_has_bits & 0x00000001u) {
5143       total_size += 1 +
5144         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
5145           *_impl_.timebase_);
5146     }
5147 
5148     // optional uint32 process_shard_count = 2;
5149     if (cached_has_bits & 0x00000002u) {
5150       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_process_shard_count());
5151     }
5152 
5153     // optional uint32 chosen_process_shard = 3;
5154     if (cached_has_bits & 0x00000004u) {
5155       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_chosen_process_shard());
5156     }
5157 
5158   }
5159   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5160     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
5161   }
5162   int cached_size = ::_pbi::ToCachedSize(total_size);
5163   SetCachedSize(cached_size);
5164   return total_size;
5165 }
5166 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)5167 void PerfSampleDefaults::CheckTypeAndMergeFrom(
5168     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
5169   MergeFrom(*::_pbi::DownCast<const PerfSampleDefaults*>(
5170       &from));
5171 }
5172 
MergeFrom(const PerfSampleDefaults & from)5173 void PerfSampleDefaults::MergeFrom(const PerfSampleDefaults& from) {
5174   PerfSampleDefaults* const _this = this;
5175   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.PerfSampleDefaults)
5176   GOOGLE_DCHECK_NE(&from, _this);
5177   ::uint32_t cached_has_bits = 0;
5178   (void) cached_has_bits;
5179 
5180   _this->_impl_.followers_.MergeFrom(from._impl_.followers_);
5181   cached_has_bits = from._impl_._has_bits_[0];
5182   if (cached_has_bits & 0x00000007u) {
5183     if (cached_has_bits & 0x00000001u) {
5184       _this->_internal_mutable_timebase()->::perfetto::protos::PerfEvents_Timebase::MergeFrom(
5185           from._internal_timebase());
5186     }
5187     if (cached_has_bits & 0x00000002u) {
5188       _this->_impl_.process_shard_count_ = from._impl_.process_shard_count_;
5189     }
5190     if (cached_has_bits & 0x00000004u) {
5191       _this->_impl_.chosen_process_shard_ = from._impl_.chosen_process_shard_;
5192     }
5193     _this->_impl_._has_bits_[0] |= cached_has_bits;
5194   }
5195   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5196 }
5197 
CopyFrom(const PerfSampleDefaults & from)5198 void PerfSampleDefaults::CopyFrom(const PerfSampleDefaults& from) {
5199 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.PerfSampleDefaults)
5200   if (&from == this) return;
5201   Clear();
5202   MergeFrom(from);
5203 }
5204 
IsInitialized() const5205 bool PerfSampleDefaults::IsInitialized() const {
5206   return true;
5207 }
5208 
InternalSwap(PerfSampleDefaults * other)5209 void PerfSampleDefaults::InternalSwap(PerfSampleDefaults* other) {
5210   using std::swap;
5211   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
5212   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
5213   _impl_.followers_.InternalSwap(&other->_impl_.followers_);
5214   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
5215       PROTOBUF_FIELD_OFFSET(PerfSampleDefaults, _impl_.chosen_process_shard_)
5216       + sizeof(PerfSampleDefaults::_impl_.chosen_process_shard_)  // NOLINT
5217       - PROTOBUF_FIELD_OFFSET(PerfSampleDefaults, _impl_.timebase_)>(
5218           reinterpret_cast<char*>(&_impl_.timebase_),
5219           reinterpret_cast<char*>(&other->_impl_.timebase_));
5220 }
5221 
GetTypeName() const5222 std::string PerfSampleDefaults::GetTypeName() const {
5223   return "perfetto.protos.PerfSampleDefaults";
5224 }
5225 
5226 
5227 // @@protoc_insertion_point(namespace_scope)
5228 }  // namespace protos
5229 }  // namespace perfetto
5230 PROTOBUF_NAMESPACE_OPEN
5231 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProfilePacket_HeapSample*
CreateMaybeMessage(Arena * arena)5232 Arena::CreateMaybeMessage< ::perfetto::protos::ProfilePacket_HeapSample >(Arena* arena) {
5233   return Arena::CreateMessageInternal< ::perfetto::protos::ProfilePacket_HeapSample >(arena);
5234 }
5235 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProfilePacket_Histogram_Bucket*
CreateMaybeMessage(Arena * arena)5236 Arena::CreateMaybeMessage< ::perfetto::protos::ProfilePacket_Histogram_Bucket >(Arena* arena) {
5237   return Arena::CreateMessageInternal< ::perfetto::protos::ProfilePacket_Histogram_Bucket >(arena);
5238 }
5239 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProfilePacket_Histogram*
CreateMaybeMessage(Arena * arena)5240 Arena::CreateMaybeMessage< ::perfetto::protos::ProfilePacket_Histogram >(Arena* arena) {
5241   return Arena::CreateMessageInternal< ::perfetto::protos::ProfilePacket_Histogram >(arena);
5242 }
5243 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProfilePacket_ProcessStats*
CreateMaybeMessage(Arena * arena)5244 Arena::CreateMaybeMessage< ::perfetto::protos::ProfilePacket_ProcessStats >(Arena* arena) {
5245   return Arena::CreateMessageInternal< ::perfetto::protos::ProfilePacket_ProcessStats >(arena);
5246 }
5247 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProfilePacket_ProcessHeapSamples*
CreateMaybeMessage(Arena * arena)5248 Arena::CreateMaybeMessage< ::perfetto::protos::ProfilePacket_ProcessHeapSamples >(Arena* arena) {
5249   return Arena::CreateMessageInternal< ::perfetto::protos::ProfilePacket_ProcessHeapSamples >(arena);
5250 }
5251 template<> PROTOBUF_NOINLINE ::perfetto::protos::ProfilePacket*
CreateMaybeMessage(Arena * arena)5252 Arena::CreateMaybeMessage< ::perfetto::protos::ProfilePacket >(Arena* arena) {
5253   return Arena::CreateMessageInternal< ::perfetto::protos::ProfilePacket >(arena);
5254 }
5255 template<> PROTOBUF_NOINLINE ::perfetto::protos::StreamingAllocation*
CreateMaybeMessage(Arena * arena)5256 Arena::CreateMaybeMessage< ::perfetto::protos::StreamingAllocation >(Arena* arena) {
5257   return Arena::CreateMessageInternal< ::perfetto::protos::StreamingAllocation >(arena);
5258 }
5259 template<> PROTOBUF_NOINLINE ::perfetto::protos::StreamingFree*
CreateMaybeMessage(Arena * arena)5260 Arena::CreateMaybeMessage< ::perfetto::protos::StreamingFree >(Arena* arena) {
5261   return Arena::CreateMessageInternal< ::perfetto::protos::StreamingFree >(arena);
5262 }
5263 template<> PROTOBUF_NOINLINE ::perfetto::protos::StreamingProfilePacket*
CreateMaybeMessage(Arena * arena)5264 Arena::CreateMaybeMessage< ::perfetto::protos::StreamingProfilePacket >(Arena* arena) {
5265   return Arena::CreateMessageInternal< ::perfetto::protos::StreamingProfilePacket >(arena);
5266 }
5267 template<> PROTOBUF_NOINLINE ::perfetto::protos::Profiling*
CreateMaybeMessage(Arena * arena)5268 Arena::CreateMaybeMessage< ::perfetto::protos::Profiling >(Arena* arena) {
5269   return Arena::CreateMessageInternal< ::perfetto::protos::Profiling >(arena);
5270 }
5271 template<> PROTOBUF_NOINLINE ::perfetto::protos::PerfSample_ProducerEvent*
CreateMaybeMessage(Arena * arena)5272 Arena::CreateMaybeMessage< ::perfetto::protos::PerfSample_ProducerEvent >(Arena* arena) {
5273   return Arena::CreateMessageInternal< ::perfetto::protos::PerfSample_ProducerEvent >(arena);
5274 }
5275 template<> PROTOBUF_NOINLINE ::perfetto::protos::PerfSample*
CreateMaybeMessage(Arena * arena)5276 Arena::CreateMaybeMessage< ::perfetto::protos::PerfSample >(Arena* arena) {
5277   return Arena::CreateMessageInternal< ::perfetto::protos::PerfSample >(arena);
5278 }
5279 template<> PROTOBUF_NOINLINE ::perfetto::protos::PerfSampleDefaults*
CreateMaybeMessage(Arena * arena)5280 Arena::CreateMaybeMessage< ::perfetto::protos::PerfSampleDefaults >(Arena* arena) {
5281   return Arena::CreateMessageInternal< ::perfetto::protos::PerfSampleDefaults >(arena);
5282 }
5283 PROTOBUF_NAMESPACE_CLOSE
5284 
5285 // @@protoc_insertion_point(global_scope)
5286 #include <google/protobuf/port_undef.inc>
5287