1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: system/extras/simpleperf/cmd_report_sample.proto
3 
4 #include "system/extras/simpleperf/cmd_report_sample.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 simpleperf_report_proto {
Sample_CallChainEntry(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR Sample_CallChainEntry::Sample_CallChainEntry(
23     ::_pbi::ConstantInitialized): _impl_{
24     /*decltype(_impl_._has_bits_)*/{}
25   , /*decltype(_impl_._cached_size_)*/{}
26   , /*decltype(_impl_.vaddr_in_file_)*/::uint64_t{0u}
27   , /*decltype(_impl_.file_id_)*/0u
28   , /*decltype(_impl_.symbol_id_)*/0
29   , /*decltype(_impl_.execution_type_)*/0} {}
30 struct Sample_CallChainEntryDefaultTypeInternal {
Sample_CallChainEntryDefaultTypeInternalsimpleperf_report_proto::Sample_CallChainEntryDefaultTypeInternal31   PROTOBUF_CONSTEXPR Sample_CallChainEntryDefaultTypeInternal()
32       : _instance(::_pbi::ConstantInitialized{}) {}
~Sample_CallChainEntryDefaultTypeInternalsimpleperf_report_proto::Sample_CallChainEntryDefaultTypeInternal33   ~Sample_CallChainEntryDefaultTypeInternal() {}
34   union {  // NOLINT(misc-non-private-member-variables-in-classes)
35     Sample_CallChainEntry _instance;
36   };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Sample_CallChainEntryDefaultTypeInternal _Sample_CallChainEntry_default_instance_;
Sample_UnwindingResult(::_pbi::ConstantInitialized)39 PROTOBUF_CONSTEXPR Sample_UnwindingResult::Sample_UnwindingResult(
40     ::_pbi::ConstantInitialized): _impl_{
41     /*decltype(_impl_._has_bits_)*/{}
42   , /*decltype(_impl_._cached_size_)*/{}
43   , /*decltype(_impl_.error_addr_)*/::uint64_t{0u}
44   , /*decltype(_impl_.raw_error_code_)*/0u
45   , /*decltype(_impl_.error_code_)*/0} {}
46 struct Sample_UnwindingResultDefaultTypeInternal {
Sample_UnwindingResultDefaultTypeInternalsimpleperf_report_proto::Sample_UnwindingResultDefaultTypeInternal47   PROTOBUF_CONSTEXPR Sample_UnwindingResultDefaultTypeInternal()
48       : _instance(::_pbi::ConstantInitialized{}) {}
~Sample_UnwindingResultDefaultTypeInternalsimpleperf_report_proto::Sample_UnwindingResultDefaultTypeInternal49   ~Sample_UnwindingResultDefaultTypeInternal() {}
50   union {  // NOLINT(misc-non-private-member-variables-in-classes)
51     Sample_UnwindingResult _instance;
52   };
53 };
54 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Sample_UnwindingResultDefaultTypeInternal _Sample_UnwindingResult_default_instance_;
Sample(::_pbi::ConstantInitialized)55 PROTOBUF_CONSTEXPR Sample::Sample(
56     ::_pbi::ConstantInitialized): _impl_{
57     /*decltype(_impl_._has_bits_)*/{}
58   , /*decltype(_impl_._cached_size_)*/{}
59   , /*decltype(_impl_.callchain_)*/{}
60   , /*decltype(_impl_.unwinding_result_)*/nullptr
61   , /*decltype(_impl_.time_)*/::uint64_t{0u}
62   , /*decltype(_impl_.thread_id_)*/0
63   , /*decltype(_impl_.event_type_id_)*/0u
64   , /*decltype(_impl_.event_count_)*/::uint64_t{0u}} {}
65 struct SampleDefaultTypeInternal {
SampleDefaultTypeInternalsimpleperf_report_proto::SampleDefaultTypeInternal66   PROTOBUF_CONSTEXPR SampleDefaultTypeInternal()
67       : _instance(::_pbi::ConstantInitialized{}) {}
~SampleDefaultTypeInternalsimpleperf_report_proto::SampleDefaultTypeInternal68   ~SampleDefaultTypeInternal() {}
69   union {  // NOLINT(misc-non-private-member-variables-in-classes)
70     Sample _instance;
71   };
72 };
73 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SampleDefaultTypeInternal _Sample_default_instance_;
LostSituation(::_pbi::ConstantInitialized)74 PROTOBUF_CONSTEXPR LostSituation::LostSituation(
75     ::_pbi::ConstantInitialized): _impl_{
76     /*decltype(_impl_._has_bits_)*/{}
77   , /*decltype(_impl_._cached_size_)*/{}
78   , /*decltype(_impl_.sample_count_)*/::uint64_t{0u}
79   , /*decltype(_impl_.lost_count_)*/::uint64_t{0u}} {}
80 struct LostSituationDefaultTypeInternal {
LostSituationDefaultTypeInternalsimpleperf_report_proto::LostSituationDefaultTypeInternal81   PROTOBUF_CONSTEXPR LostSituationDefaultTypeInternal()
82       : _instance(::_pbi::ConstantInitialized{}) {}
~LostSituationDefaultTypeInternalsimpleperf_report_proto::LostSituationDefaultTypeInternal83   ~LostSituationDefaultTypeInternal() {}
84   union {  // NOLINT(misc-non-private-member-variables-in-classes)
85     LostSituation _instance;
86   };
87 };
88 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LostSituationDefaultTypeInternal _LostSituation_default_instance_;
File(::_pbi::ConstantInitialized)89 PROTOBUF_CONSTEXPR File::File(
90     ::_pbi::ConstantInitialized): _impl_{
91     /*decltype(_impl_._has_bits_)*/{}
92   , /*decltype(_impl_._cached_size_)*/{}
93   , /*decltype(_impl_.symbol_)*/{}
94   , /*decltype(_impl_.mangled_symbol_)*/{}
95   , /*decltype(_impl_.path_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
96   , /*decltype(_impl_.id_)*/0u} {}
97 struct FileDefaultTypeInternal {
FileDefaultTypeInternalsimpleperf_report_proto::FileDefaultTypeInternal98   PROTOBUF_CONSTEXPR FileDefaultTypeInternal()
99       : _instance(::_pbi::ConstantInitialized{}) {}
~FileDefaultTypeInternalsimpleperf_report_proto::FileDefaultTypeInternal100   ~FileDefaultTypeInternal() {}
101   union {  // NOLINT(misc-non-private-member-variables-in-classes)
102     File _instance;
103   };
104 };
105 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileDefaultTypeInternal _File_default_instance_;
Thread(::_pbi::ConstantInitialized)106 PROTOBUF_CONSTEXPR Thread::Thread(
107     ::_pbi::ConstantInitialized): _impl_{
108     /*decltype(_impl_._has_bits_)*/{}
109   , /*decltype(_impl_._cached_size_)*/{}
110   , /*decltype(_impl_.thread_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
111   , /*decltype(_impl_.thread_id_)*/0u
112   , /*decltype(_impl_.process_id_)*/0u} {}
113 struct ThreadDefaultTypeInternal {
ThreadDefaultTypeInternalsimpleperf_report_proto::ThreadDefaultTypeInternal114   PROTOBUF_CONSTEXPR ThreadDefaultTypeInternal()
115       : _instance(::_pbi::ConstantInitialized{}) {}
~ThreadDefaultTypeInternalsimpleperf_report_proto::ThreadDefaultTypeInternal116   ~ThreadDefaultTypeInternal() {}
117   union {  // NOLINT(misc-non-private-member-variables-in-classes)
118     Thread _instance;
119   };
120 };
121 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreadDefaultTypeInternal _Thread_default_instance_;
MetaInfo(::_pbi::ConstantInitialized)122 PROTOBUF_CONSTEXPR MetaInfo::MetaInfo(
123     ::_pbi::ConstantInitialized): _impl_{
124     /*decltype(_impl_._has_bits_)*/{}
125   , /*decltype(_impl_._cached_size_)*/{}
126   , /*decltype(_impl_.event_type_)*/{}
127   , /*decltype(_impl_.app_package_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
128   , /*decltype(_impl_.app_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
129   , /*decltype(_impl_.android_sdk_version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
130   , /*decltype(_impl_.android_build_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
131   , /*decltype(_impl_.trace_offcpu_)*/false} {}
132 struct MetaInfoDefaultTypeInternal {
MetaInfoDefaultTypeInternalsimpleperf_report_proto::MetaInfoDefaultTypeInternal133   PROTOBUF_CONSTEXPR MetaInfoDefaultTypeInternal()
134       : _instance(::_pbi::ConstantInitialized{}) {}
~MetaInfoDefaultTypeInternalsimpleperf_report_proto::MetaInfoDefaultTypeInternal135   ~MetaInfoDefaultTypeInternal() {}
136   union {  // NOLINT(misc-non-private-member-variables-in-classes)
137     MetaInfo _instance;
138   };
139 };
140 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetaInfoDefaultTypeInternal _MetaInfo_default_instance_;
ContextSwitch(::_pbi::ConstantInitialized)141 PROTOBUF_CONSTEXPR ContextSwitch::ContextSwitch(
142     ::_pbi::ConstantInitialized): _impl_{
143     /*decltype(_impl_._has_bits_)*/{}
144   , /*decltype(_impl_._cached_size_)*/{}
145   , /*decltype(_impl_.time_)*/::uint64_t{0u}
146   , /*decltype(_impl_.switch_on_)*/false
147   , /*decltype(_impl_.thread_id_)*/0u} {}
148 struct ContextSwitchDefaultTypeInternal {
ContextSwitchDefaultTypeInternalsimpleperf_report_proto::ContextSwitchDefaultTypeInternal149   PROTOBUF_CONSTEXPR ContextSwitchDefaultTypeInternal()
150       : _instance(::_pbi::ConstantInitialized{}) {}
~ContextSwitchDefaultTypeInternalsimpleperf_report_proto::ContextSwitchDefaultTypeInternal151   ~ContextSwitchDefaultTypeInternal() {}
152   union {  // NOLINT(misc-non-private-member-variables-in-classes)
153     ContextSwitch _instance;
154   };
155 };
156 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContextSwitchDefaultTypeInternal _ContextSwitch_default_instance_;
Record(::_pbi::ConstantInitialized)157 PROTOBUF_CONSTEXPR Record::Record(
158     ::_pbi::ConstantInitialized): _impl_{
159     /*decltype(_impl_.record_data_)*/{}
160   , /*decltype(_impl_._cached_size_)*/{}
161   , /*decltype(_impl_._oneof_case_)*/{}} {}
162 struct RecordDefaultTypeInternal {
RecordDefaultTypeInternalsimpleperf_report_proto::RecordDefaultTypeInternal163   PROTOBUF_CONSTEXPR RecordDefaultTypeInternal()
164       : _instance(::_pbi::ConstantInitialized{}) {}
~RecordDefaultTypeInternalsimpleperf_report_proto::RecordDefaultTypeInternal165   ~RecordDefaultTypeInternal() {}
166   union {  // NOLINT(misc-non-private-member-variables-in-classes)
167     Record _instance;
168   };
169 };
170 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RecordDefaultTypeInternal _Record_default_instance_;
171 }  // namespace simpleperf_report_proto
172 namespace simpleperf_report_proto {
Sample_CallChainEntry_ExecutionType_IsValid(int value)173 bool Sample_CallChainEntry_ExecutionType_IsValid(int value) {
174   switch (value) {
175     case 0:
176     case 1:
177     case 2:
178     case 3:
179       return true;
180     default:
181       return false;
182   }
183 }
184 
185 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Sample_CallChainEntry_ExecutionType_strings[4] = {};
186 
187 static const char Sample_CallChainEntry_ExecutionType_names[] =
188   "ART_METHOD"
189   "INTERPRETED_JVM_METHOD"
190   "JIT_JVM_METHOD"
191   "NATIVE_METHOD";
192 
193 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Sample_CallChainEntry_ExecutionType_entries[] = {
194   { {Sample_CallChainEntry_ExecutionType_names + 0, 10}, 3 },
195   { {Sample_CallChainEntry_ExecutionType_names + 10, 22}, 1 },
196   { {Sample_CallChainEntry_ExecutionType_names + 32, 14}, 2 },
197   { {Sample_CallChainEntry_ExecutionType_names + 46, 13}, 0 },
198 };
199 
200 static const int Sample_CallChainEntry_ExecutionType_entries_by_number[] = {
201   3, // 0 -> NATIVE_METHOD
202   1, // 1 -> INTERPRETED_JVM_METHOD
203   2, // 2 -> JIT_JVM_METHOD
204   0, // 3 -> ART_METHOD
205 };
206 
Sample_CallChainEntry_ExecutionType_Name(Sample_CallChainEntry_ExecutionType value)207 const std::string& Sample_CallChainEntry_ExecutionType_Name(
208     Sample_CallChainEntry_ExecutionType value) {
209   static const bool dummy =
210       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
211           Sample_CallChainEntry_ExecutionType_entries,
212           Sample_CallChainEntry_ExecutionType_entries_by_number,
213           4, Sample_CallChainEntry_ExecutionType_strings);
214   (void) dummy;
215   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
216       Sample_CallChainEntry_ExecutionType_entries,
217       Sample_CallChainEntry_ExecutionType_entries_by_number,
218       4, value);
219   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
220                      Sample_CallChainEntry_ExecutionType_strings[idx].get();
221 }
Sample_CallChainEntry_ExecutionType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,Sample_CallChainEntry_ExecutionType * value)222 bool Sample_CallChainEntry_ExecutionType_Parse(
223     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Sample_CallChainEntry_ExecutionType* value) {
224   int int_value;
225   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
226       Sample_CallChainEntry_ExecutionType_entries, 4, name, &int_value);
227   if (success) {
228     *value = static_cast<Sample_CallChainEntry_ExecutionType>(int_value);
229   }
230   return success;
231 }
232 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
233 constexpr Sample_CallChainEntry_ExecutionType Sample_CallChainEntry::NATIVE_METHOD;
234 constexpr Sample_CallChainEntry_ExecutionType Sample_CallChainEntry::INTERPRETED_JVM_METHOD;
235 constexpr Sample_CallChainEntry_ExecutionType Sample_CallChainEntry::JIT_JVM_METHOD;
236 constexpr Sample_CallChainEntry_ExecutionType Sample_CallChainEntry::ART_METHOD;
237 constexpr Sample_CallChainEntry_ExecutionType Sample_CallChainEntry::ExecutionType_MIN;
238 constexpr Sample_CallChainEntry_ExecutionType Sample_CallChainEntry::ExecutionType_MAX;
239 constexpr int Sample_CallChainEntry::ExecutionType_ARRAYSIZE;
240 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
Sample_UnwindingResult_ErrorCode_IsValid(int value)241 bool Sample_UnwindingResult_ErrorCode_IsValid(int value) {
242   switch (value) {
243     case 0:
244     case 1:
245     case 2:
246     case 3:
247     case 4:
248     case 5:
249     case 6:
250     case 7:
251     case 8:
252       return true;
253     default:
254       return false;
255   }
256 }
257 
258 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Sample_UnwindingResult_ErrorCode_strings[9] = {};
259 
260 static const char Sample_UnwindingResult_ErrorCode_names[] =
261   "ERROR_INVALID_ELF"
262   "ERROR_INVALID_MAP"
263   "ERROR_MAX_FRAME_EXCEEDED"
264   "ERROR_MEMORY_INVALID"
265   "ERROR_NONE"
266   "ERROR_NOT_ENOUGH_STACK"
267   "ERROR_REPEATED_FRAME"
268   "ERROR_UNKNOWN"
269   "ERROR_UNWIND_INFO";
270 
271 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Sample_UnwindingResult_ErrorCode_entries[] = {
272   { {Sample_UnwindingResult_ErrorCode_names + 0, 17}, 8 },
273   { {Sample_UnwindingResult_ErrorCode_names + 17, 17}, 5 },
274   { {Sample_UnwindingResult_ErrorCode_names + 34, 24}, 6 },
275   { {Sample_UnwindingResult_ErrorCode_names + 58, 20}, 3 },
276   { {Sample_UnwindingResult_ErrorCode_names + 78, 10}, 0 },
277   { {Sample_UnwindingResult_ErrorCode_names + 88, 22}, 2 },
278   { {Sample_UnwindingResult_ErrorCode_names + 110, 20}, 7 },
279   { {Sample_UnwindingResult_ErrorCode_names + 130, 13}, 1 },
280   { {Sample_UnwindingResult_ErrorCode_names + 143, 17}, 4 },
281 };
282 
283 static const int Sample_UnwindingResult_ErrorCode_entries_by_number[] = {
284   4, // 0 -> ERROR_NONE
285   7, // 1 -> ERROR_UNKNOWN
286   5, // 2 -> ERROR_NOT_ENOUGH_STACK
287   3, // 3 -> ERROR_MEMORY_INVALID
288   8, // 4 -> ERROR_UNWIND_INFO
289   1, // 5 -> ERROR_INVALID_MAP
290   2, // 6 -> ERROR_MAX_FRAME_EXCEEDED
291   6, // 7 -> ERROR_REPEATED_FRAME
292   0, // 8 -> ERROR_INVALID_ELF
293 };
294 
Sample_UnwindingResult_ErrorCode_Name(Sample_UnwindingResult_ErrorCode value)295 const std::string& Sample_UnwindingResult_ErrorCode_Name(
296     Sample_UnwindingResult_ErrorCode value) {
297   static const bool dummy =
298       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
299           Sample_UnwindingResult_ErrorCode_entries,
300           Sample_UnwindingResult_ErrorCode_entries_by_number,
301           9, Sample_UnwindingResult_ErrorCode_strings);
302   (void) dummy;
303   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
304       Sample_UnwindingResult_ErrorCode_entries,
305       Sample_UnwindingResult_ErrorCode_entries_by_number,
306       9, value);
307   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
308                      Sample_UnwindingResult_ErrorCode_strings[idx].get();
309 }
Sample_UnwindingResult_ErrorCode_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,Sample_UnwindingResult_ErrorCode * value)310 bool Sample_UnwindingResult_ErrorCode_Parse(
311     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Sample_UnwindingResult_ErrorCode* value) {
312   int int_value;
313   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
314       Sample_UnwindingResult_ErrorCode_entries, 9, name, &int_value);
315   if (success) {
316     *value = static_cast<Sample_UnwindingResult_ErrorCode>(int_value);
317   }
318   return success;
319 }
320 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
321 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_NONE;
322 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_UNKNOWN;
323 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_NOT_ENOUGH_STACK;
324 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_MEMORY_INVALID;
325 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_UNWIND_INFO;
326 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_INVALID_MAP;
327 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_MAX_FRAME_EXCEEDED;
328 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_REPEATED_FRAME;
329 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ERROR_INVALID_ELF;
330 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ErrorCode_MIN;
331 constexpr Sample_UnwindingResult_ErrorCode Sample_UnwindingResult::ErrorCode_MAX;
332 constexpr int Sample_UnwindingResult::ErrorCode_ARRAYSIZE;
333 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
334 
335 // ===================================================================
336 
337 class Sample_CallChainEntry::_Internal {
338  public:
339   using HasBits = decltype(std::declval<Sample_CallChainEntry>()._impl_._has_bits_);
set_has_vaddr_in_file(HasBits * has_bits)340   static void set_has_vaddr_in_file(HasBits* has_bits) {
341     (*has_bits)[0] |= 1u;
342   }
set_has_file_id(HasBits * has_bits)343   static void set_has_file_id(HasBits* has_bits) {
344     (*has_bits)[0] |= 2u;
345   }
set_has_symbol_id(HasBits * has_bits)346   static void set_has_symbol_id(HasBits* has_bits) {
347     (*has_bits)[0] |= 4u;
348   }
set_has_execution_type(HasBits * has_bits)349   static void set_has_execution_type(HasBits* has_bits) {
350     (*has_bits)[0] |= 8u;
351   }
352 };
353 
Sample_CallChainEntry(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)354 Sample_CallChainEntry::Sample_CallChainEntry(::PROTOBUF_NAMESPACE_ID::Arena* arena,
355                          bool is_message_owned)
356   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
357   SharedCtor(arena, is_message_owned);
358   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.Sample.CallChainEntry)
359 }
Sample_CallChainEntry(const Sample_CallChainEntry & from)360 Sample_CallChainEntry::Sample_CallChainEntry(const Sample_CallChainEntry& from)
361   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
362   Sample_CallChainEntry* const _this = this; (void)_this;
363   new (&_impl_) Impl_{
364       decltype(_impl_._has_bits_){from._impl_._has_bits_}
365     , /*decltype(_impl_._cached_size_)*/{}
366     , decltype(_impl_.vaddr_in_file_){}
367     , decltype(_impl_.file_id_){}
368     , decltype(_impl_.symbol_id_){}
369     , decltype(_impl_.execution_type_){}};
370 
371   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
372   ::memcpy(&_impl_.vaddr_in_file_, &from._impl_.vaddr_in_file_,
373     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.execution_type_) -
374     reinterpret_cast<char*>(&_impl_.vaddr_in_file_)) + sizeof(_impl_.execution_type_));
375   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.Sample.CallChainEntry)
376 }
377 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)378 inline void Sample_CallChainEntry::SharedCtor(
379     ::_pb::Arena* arena, bool is_message_owned) {
380   (void)arena;
381   (void)is_message_owned;
382   new (&_impl_) Impl_{
383       decltype(_impl_._has_bits_){}
384     , /*decltype(_impl_._cached_size_)*/{}
385     , decltype(_impl_.vaddr_in_file_){::uint64_t{0u}}
386     , decltype(_impl_.file_id_){0u}
387     , decltype(_impl_.symbol_id_){0}
388     , decltype(_impl_.execution_type_){0}
389   };
390 }
391 
~Sample_CallChainEntry()392 Sample_CallChainEntry::~Sample_CallChainEntry() {
393   // @@protoc_insertion_point(destructor:simpleperf_report_proto.Sample.CallChainEntry)
394   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
395   (void)arena;
396     return;
397   }
398   SharedDtor();
399 }
400 
SharedDtor()401 inline void Sample_CallChainEntry::SharedDtor() {
402   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
403 }
404 
SetCachedSize(int size) const405 void Sample_CallChainEntry::SetCachedSize(int size) const {
406   _impl_._cached_size_.Set(size);
407 }
408 
Clear()409 void Sample_CallChainEntry::Clear() {
410 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.Sample.CallChainEntry)
411   ::uint32_t cached_has_bits = 0;
412   // Prevent compiler warnings about cached_has_bits being unused
413   (void) cached_has_bits;
414 
415   cached_has_bits = _impl_._has_bits_[0];
416   if (cached_has_bits & 0x0000000fu) {
417     ::memset(&_impl_.vaddr_in_file_, 0, static_cast<size_t>(
418         reinterpret_cast<char*>(&_impl_.execution_type_) -
419         reinterpret_cast<char*>(&_impl_.vaddr_in_file_)) + sizeof(_impl_.execution_type_));
420   }
421   _impl_._has_bits_.Clear();
422   _internal_metadata_.Clear<std::string>();
423 }
424 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)425 const char* Sample_CallChainEntry::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
426 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
427   _Internal::HasBits has_bits{};
428   while (!ctx->Done(&ptr)) {
429     ::uint32_t tag;
430     ptr = ::_pbi::ReadTag(ptr, &tag);
431     switch (tag >> 3) {
432       // optional uint64 vaddr_in_file = 1;
433       case 1:
434         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
435           _Internal::set_has_vaddr_in_file(&has_bits);
436           _impl_.vaddr_in_file_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
437           CHK_(ptr);
438         } else {
439           goto handle_unusual;
440         }
441         continue;
442       // optional uint32 file_id = 2;
443       case 2:
444         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
445           _Internal::set_has_file_id(&has_bits);
446           _impl_.file_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
447           CHK_(ptr);
448         } else {
449           goto handle_unusual;
450         }
451         continue;
452       // optional int32 symbol_id = 3;
453       case 3:
454         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
455           _Internal::set_has_symbol_id(&has_bits);
456           _impl_.symbol_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
457           CHK_(ptr);
458         } else {
459           goto handle_unusual;
460         }
461         continue;
462       // optional .simpleperf_report_proto.Sample.CallChainEntry.ExecutionType execution_type = 4 [default = NATIVE_METHOD];
463       case 4:
464         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
465           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
466           CHK_(ptr);
467           if (PROTOBUF_PREDICT_TRUE(::simpleperf_report_proto::Sample_CallChainEntry_ExecutionType_IsValid(val))) {
468             _internal_set_execution_type(static_cast<::simpleperf_report_proto::Sample_CallChainEntry_ExecutionType>(val));
469           } else {
470             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
471           }
472         } else {
473           goto handle_unusual;
474         }
475         continue;
476       default:
477         goto handle_unusual;
478     }  // switch
479   handle_unusual:
480     if ((tag == 0) || ((tag & 7) == 4)) {
481       CHK_(ptr);
482       ctx->SetLastTag(tag);
483       goto message_done;
484     }
485     ptr = UnknownFieldParse(
486         tag,
487         _internal_metadata_.mutable_unknown_fields<std::string>(),
488         ptr, ctx);
489     CHK_(ptr != nullptr);
490   }  // while
491 message_done:
492   _impl_._has_bits_.Or(has_bits);
493   return ptr;
494 failure:
495   ptr = nullptr;
496   goto message_done;
497 #undef CHK_
498 }
499 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const500 ::uint8_t* Sample_CallChainEntry::_InternalSerialize(
501     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
502   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.Sample.CallChainEntry)
503   ::uint32_t cached_has_bits = 0;
504   (void) cached_has_bits;
505 
506   cached_has_bits = _impl_._has_bits_[0];
507   // optional uint64 vaddr_in_file = 1;
508   if (cached_has_bits & 0x00000001u) {
509     target = stream->EnsureSpace(target);
510     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_vaddr_in_file(), target);
511   }
512 
513   // optional uint32 file_id = 2;
514   if (cached_has_bits & 0x00000002u) {
515     target = stream->EnsureSpace(target);
516     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_file_id(), target);
517   }
518 
519   // optional int32 symbol_id = 3;
520   if (cached_has_bits & 0x00000004u) {
521     target = stream->EnsureSpace(target);
522     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_symbol_id(), target);
523   }
524 
525   // optional .simpleperf_report_proto.Sample.CallChainEntry.ExecutionType execution_type = 4 [default = NATIVE_METHOD];
526   if (cached_has_bits & 0x00000008u) {
527     target = stream->EnsureSpace(target);
528     target = ::_pbi::WireFormatLite::WriteEnumToArray(
529       4, this->_internal_execution_type(), target);
530   }
531 
532   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
533     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
534         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
535   }
536   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.Sample.CallChainEntry)
537   return target;
538 }
539 
ByteSizeLong() const540 size_t Sample_CallChainEntry::ByteSizeLong() const {
541 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.Sample.CallChainEntry)
542   size_t total_size = 0;
543 
544   ::uint32_t cached_has_bits = 0;
545   // Prevent compiler warnings about cached_has_bits being unused
546   (void) cached_has_bits;
547 
548   cached_has_bits = _impl_._has_bits_[0];
549   if (cached_has_bits & 0x0000000fu) {
550     // optional uint64 vaddr_in_file = 1;
551     if (cached_has_bits & 0x00000001u) {
552       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_vaddr_in_file());
553     }
554 
555     // optional uint32 file_id = 2;
556     if (cached_has_bits & 0x00000002u) {
557       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_file_id());
558     }
559 
560     // optional int32 symbol_id = 3;
561     if (cached_has_bits & 0x00000004u) {
562       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_symbol_id());
563     }
564 
565     // optional .simpleperf_report_proto.Sample.CallChainEntry.ExecutionType execution_type = 4 [default = NATIVE_METHOD];
566     if (cached_has_bits & 0x00000008u) {
567       total_size += 1 +
568         ::_pbi::WireFormatLite::EnumSize(this->_internal_execution_type());
569     }
570 
571   }
572   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
573     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
574   }
575   int cached_size = ::_pbi::ToCachedSize(total_size);
576   SetCachedSize(cached_size);
577   return total_size;
578 }
579 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)580 void Sample_CallChainEntry::CheckTypeAndMergeFrom(
581     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
582   MergeFrom(*::_pbi::DownCast<const Sample_CallChainEntry*>(
583       &from));
584 }
585 
MergeFrom(const Sample_CallChainEntry & from)586 void Sample_CallChainEntry::MergeFrom(const Sample_CallChainEntry& from) {
587   Sample_CallChainEntry* const _this = this;
588   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.Sample.CallChainEntry)
589   GOOGLE_DCHECK_NE(&from, _this);
590   ::uint32_t cached_has_bits = 0;
591   (void) cached_has_bits;
592 
593   cached_has_bits = from._impl_._has_bits_[0];
594   if (cached_has_bits & 0x0000000fu) {
595     if (cached_has_bits & 0x00000001u) {
596       _this->_impl_.vaddr_in_file_ = from._impl_.vaddr_in_file_;
597     }
598     if (cached_has_bits & 0x00000002u) {
599       _this->_impl_.file_id_ = from._impl_.file_id_;
600     }
601     if (cached_has_bits & 0x00000004u) {
602       _this->_impl_.symbol_id_ = from._impl_.symbol_id_;
603     }
604     if (cached_has_bits & 0x00000008u) {
605       _this->_impl_.execution_type_ = from._impl_.execution_type_;
606     }
607     _this->_impl_._has_bits_[0] |= cached_has_bits;
608   }
609   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
610 }
611 
CopyFrom(const Sample_CallChainEntry & from)612 void Sample_CallChainEntry::CopyFrom(const Sample_CallChainEntry& from) {
613 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.Sample.CallChainEntry)
614   if (&from == this) return;
615   Clear();
616   MergeFrom(from);
617 }
618 
IsInitialized() const619 bool Sample_CallChainEntry::IsInitialized() const {
620   return true;
621 }
622 
InternalSwap(Sample_CallChainEntry * other)623 void Sample_CallChainEntry::InternalSwap(Sample_CallChainEntry* other) {
624   using std::swap;
625   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
626   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
627   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
628       PROTOBUF_FIELD_OFFSET(Sample_CallChainEntry, _impl_.execution_type_)
629       + sizeof(Sample_CallChainEntry::_impl_.execution_type_)  // NOLINT
630       - PROTOBUF_FIELD_OFFSET(Sample_CallChainEntry, _impl_.vaddr_in_file_)>(
631           reinterpret_cast<char*>(&_impl_.vaddr_in_file_),
632           reinterpret_cast<char*>(&other->_impl_.vaddr_in_file_));
633 }
634 
GetTypeName() const635 std::string Sample_CallChainEntry::GetTypeName() const {
636   return "simpleperf_report_proto.Sample.CallChainEntry";
637 }
638 
639 
640 // ===================================================================
641 
642 class Sample_UnwindingResult::_Internal {
643  public:
644   using HasBits = decltype(std::declval<Sample_UnwindingResult>()._impl_._has_bits_);
set_has_raw_error_code(HasBits * has_bits)645   static void set_has_raw_error_code(HasBits* has_bits) {
646     (*has_bits)[0] |= 2u;
647   }
set_has_error_addr(HasBits * has_bits)648   static void set_has_error_addr(HasBits* has_bits) {
649     (*has_bits)[0] |= 1u;
650   }
set_has_error_code(HasBits * has_bits)651   static void set_has_error_code(HasBits* has_bits) {
652     (*has_bits)[0] |= 4u;
653   }
654 };
655 
Sample_UnwindingResult(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)656 Sample_UnwindingResult::Sample_UnwindingResult(::PROTOBUF_NAMESPACE_ID::Arena* arena,
657                          bool is_message_owned)
658   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
659   SharedCtor(arena, is_message_owned);
660   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.Sample.UnwindingResult)
661 }
Sample_UnwindingResult(const Sample_UnwindingResult & from)662 Sample_UnwindingResult::Sample_UnwindingResult(const Sample_UnwindingResult& from)
663   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
664   Sample_UnwindingResult* const _this = this; (void)_this;
665   new (&_impl_) Impl_{
666       decltype(_impl_._has_bits_){from._impl_._has_bits_}
667     , /*decltype(_impl_._cached_size_)*/{}
668     , decltype(_impl_.error_addr_){}
669     , decltype(_impl_.raw_error_code_){}
670     , decltype(_impl_.error_code_){}};
671 
672   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
673   ::memcpy(&_impl_.error_addr_, &from._impl_.error_addr_,
674     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.error_code_) -
675     reinterpret_cast<char*>(&_impl_.error_addr_)) + sizeof(_impl_.error_code_));
676   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.Sample.UnwindingResult)
677 }
678 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)679 inline void Sample_UnwindingResult::SharedCtor(
680     ::_pb::Arena* arena, bool is_message_owned) {
681   (void)arena;
682   (void)is_message_owned;
683   new (&_impl_) Impl_{
684       decltype(_impl_._has_bits_){}
685     , /*decltype(_impl_._cached_size_)*/{}
686     , decltype(_impl_.error_addr_){::uint64_t{0u}}
687     , decltype(_impl_.raw_error_code_){0u}
688     , decltype(_impl_.error_code_){0}
689   };
690 }
691 
~Sample_UnwindingResult()692 Sample_UnwindingResult::~Sample_UnwindingResult() {
693   // @@protoc_insertion_point(destructor:simpleperf_report_proto.Sample.UnwindingResult)
694   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
695   (void)arena;
696     return;
697   }
698   SharedDtor();
699 }
700 
SharedDtor()701 inline void Sample_UnwindingResult::SharedDtor() {
702   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
703 }
704 
SetCachedSize(int size) const705 void Sample_UnwindingResult::SetCachedSize(int size) const {
706   _impl_._cached_size_.Set(size);
707 }
708 
Clear()709 void Sample_UnwindingResult::Clear() {
710 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.Sample.UnwindingResult)
711   ::uint32_t cached_has_bits = 0;
712   // Prevent compiler warnings about cached_has_bits being unused
713   (void) cached_has_bits;
714 
715   cached_has_bits = _impl_._has_bits_[0];
716   if (cached_has_bits & 0x00000007u) {
717     ::memset(&_impl_.error_addr_, 0, static_cast<size_t>(
718         reinterpret_cast<char*>(&_impl_.error_code_) -
719         reinterpret_cast<char*>(&_impl_.error_addr_)) + sizeof(_impl_.error_code_));
720   }
721   _impl_._has_bits_.Clear();
722   _internal_metadata_.Clear<std::string>();
723 }
724 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)725 const char* Sample_UnwindingResult::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
726 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
727   _Internal::HasBits has_bits{};
728   while (!ctx->Done(&ptr)) {
729     ::uint32_t tag;
730     ptr = ::_pbi::ReadTag(ptr, &tag);
731     switch (tag >> 3) {
732       // optional uint32 raw_error_code = 1;
733       case 1:
734         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
735           _Internal::set_has_raw_error_code(&has_bits);
736           _impl_.raw_error_code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
737           CHK_(ptr);
738         } else {
739           goto handle_unusual;
740         }
741         continue;
742       // optional uint64 error_addr = 2;
743       case 2:
744         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
745           _Internal::set_has_error_addr(&has_bits);
746           _impl_.error_addr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
747           CHK_(ptr);
748         } else {
749           goto handle_unusual;
750         }
751         continue;
752       // optional .simpleperf_report_proto.Sample.UnwindingResult.ErrorCode error_code = 3;
753       case 3:
754         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
755           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
756           CHK_(ptr);
757           if (PROTOBUF_PREDICT_TRUE(::simpleperf_report_proto::Sample_UnwindingResult_ErrorCode_IsValid(val))) {
758             _internal_set_error_code(static_cast<::simpleperf_report_proto::Sample_UnwindingResult_ErrorCode>(val));
759           } else {
760             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
761           }
762         } else {
763           goto handle_unusual;
764         }
765         continue;
766       default:
767         goto handle_unusual;
768     }  // switch
769   handle_unusual:
770     if ((tag == 0) || ((tag & 7) == 4)) {
771       CHK_(ptr);
772       ctx->SetLastTag(tag);
773       goto message_done;
774     }
775     ptr = UnknownFieldParse(
776         tag,
777         _internal_metadata_.mutable_unknown_fields<std::string>(),
778         ptr, ctx);
779     CHK_(ptr != nullptr);
780   }  // while
781 message_done:
782   _impl_._has_bits_.Or(has_bits);
783   return ptr;
784 failure:
785   ptr = nullptr;
786   goto message_done;
787 #undef CHK_
788 }
789 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const790 ::uint8_t* Sample_UnwindingResult::_InternalSerialize(
791     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
792   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.Sample.UnwindingResult)
793   ::uint32_t cached_has_bits = 0;
794   (void) cached_has_bits;
795 
796   cached_has_bits = _impl_._has_bits_[0];
797   // optional uint32 raw_error_code = 1;
798   if (cached_has_bits & 0x00000002u) {
799     target = stream->EnsureSpace(target);
800     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_raw_error_code(), target);
801   }
802 
803   // optional uint64 error_addr = 2;
804   if (cached_has_bits & 0x00000001u) {
805     target = stream->EnsureSpace(target);
806     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_error_addr(), target);
807   }
808 
809   // optional .simpleperf_report_proto.Sample.UnwindingResult.ErrorCode error_code = 3;
810   if (cached_has_bits & 0x00000004u) {
811     target = stream->EnsureSpace(target);
812     target = ::_pbi::WireFormatLite::WriteEnumToArray(
813       3, this->_internal_error_code(), target);
814   }
815 
816   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
817     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
818         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
819   }
820   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.Sample.UnwindingResult)
821   return target;
822 }
823 
ByteSizeLong() const824 size_t Sample_UnwindingResult::ByteSizeLong() const {
825 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.Sample.UnwindingResult)
826   size_t total_size = 0;
827 
828   ::uint32_t cached_has_bits = 0;
829   // Prevent compiler warnings about cached_has_bits being unused
830   (void) cached_has_bits;
831 
832   cached_has_bits = _impl_._has_bits_[0];
833   if (cached_has_bits & 0x00000007u) {
834     // optional uint64 error_addr = 2;
835     if (cached_has_bits & 0x00000001u) {
836       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_error_addr());
837     }
838 
839     // optional uint32 raw_error_code = 1;
840     if (cached_has_bits & 0x00000002u) {
841       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_raw_error_code());
842     }
843 
844     // optional .simpleperf_report_proto.Sample.UnwindingResult.ErrorCode error_code = 3;
845     if (cached_has_bits & 0x00000004u) {
846       total_size += 1 +
847         ::_pbi::WireFormatLite::EnumSize(this->_internal_error_code());
848     }
849 
850   }
851   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
852     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
853   }
854   int cached_size = ::_pbi::ToCachedSize(total_size);
855   SetCachedSize(cached_size);
856   return total_size;
857 }
858 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)859 void Sample_UnwindingResult::CheckTypeAndMergeFrom(
860     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
861   MergeFrom(*::_pbi::DownCast<const Sample_UnwindingResult*>(
862       &from));
863 }
864 
MergeFrom(const Sample_UnwindingResult & from)865 void Sample_UnwindingResult::MergeFrom(const Sample_UnwindingResult& from) {
866   Sample_UnwindingResult* const _this = this;
867   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.Sample.UnwindingResult)
868   GOOGLE_DCHECK_NE(&from, _this);
869   ::uint32_t cached_has_bits = 0;
870   (void) cached_has_bits;
871 
872   cached_has_bits = from._impl_._has_bits_[0];
873   if (cached_has_bits & 0x00000007u) {
874     if (cached_has_bits & 0x00000001u) {
875       _this->_impl_.error_addr_ = from._impl_.error_addr_;
876     }
877     if (cached_has_bits & 0x00000002u) {
878       _this->_impl_.raw_error_code_ = from._impl_.raw_error_code_;
879     }
880     if (cached_has_bits & 0x00000004u) {
881       _this->_impl_.error_code_ = from._impl_.error_code_;
882     }
883     _this->_impl_._has_bits_[0] |= cached_has_bits;
884   }
885   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
886 }
887 
CopyFrom(const Sample_UnwindingResult & from)888 void Sample_UnwindingResult::CopyFrom(const Sample_UnwindingResult& from) {
889 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.Sample.UnwindingResult)
890   if (&from == this) return;
891   Clear();
892   MergeFrom(from);
893 }
894 
IsInitialized() const895 bool Sample_UnwindingResult::IsInitialized() const {
896   return true;
897 }
898 
InternalSwap(Sample_UnwindingResult * other)899 void Sample_UnwindingResult::InternalSwap(Sample_UnwindingResult* other) {
900   using std::swap;
901   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
902   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
903   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
904       PROTOBUF_FIELD_OFFSET(Sample_UnwindingResult, _impl_.error_code_)
905       + sizeof(Sample_UnwindingResult::_impl_.error_code_)  // NOLINT
906       - PROTOBUF_FIELD_OFFSET(Sample_UnwindingResult, _impl_.error_addr_)>(
907           reinterpret_cast<char*>(&_impl_.error_addr_),
908           reinterpret_cast<char*>(&other->_impl_.error_addr_));
909 }
910 
GetTypeName() const911 std::string Sample_UnwindingResult::GetTypeName() const {
912   return "simpleperf_report_proto.Sample.UnwindingResult";
913 }
914 
915 
916 // ===================================================================
917 
918 class Sample::_Internal {
919  public:
920   using HasBits = decltype(std::declval<Sample>()._impl_._has_bits_);
set_has_time(HasBits * has_bits)921   static void set_has_time(HasBits* has_bits) {
922     (*has_bits)[0] |= 2u;
923   }
set_has_thread_id(HasBits * has_bits)924   static void set_has_thread_id(HasBits* has_bits) {
925     (*has_bits)[0] |= 4u;
926   }
set_has_event_count(HasBits * has_bits)927   static void set_has_event_count(HasBits* has_bits) {
928     (*has_bits)[0] |= 16u;
929   }
set_has_event_type_id(HasBits * has_bits)930   static void set_has_event_type_id(HasBits* has_bits) {
931     (*has_bits)[0] |= 8u;
932   }
933   static const ::simpleperf_report_proto::Sample_UnwindingResult& unwinding_result(const Sample* msg);
set_has_unwinding_result(HasBits * has_bits)934   static void set_has_unwinding_result(HasBits* has_bits) {
935     (*has_bits)[0] |= 1u;
936   }
937 };
938 
939 const ::simpleperf_report_proto::Sample_UnwindingResult&
unwinding_result(const Sample * msg)940 Sample::_Internal::unwinding_result(const Sample* msg) {
941   return *msg->_impl_.unwinding_result_;
942 }
Sample(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)943 Sample::Sample(::PROTOBUF_NAMESPACE_ID::Arena* arena,
944                          bool is_message_owned)
945   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
946   SharedCtor(arena, is_message_owned);
947   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.Sample)
948 }
Sample(const Sample & from)949 Sample::Sample(const Sample& from)
950   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
951   Sample* const _this = this; (void)_this;
952   new (&_impl_) Impl_{
953       decltype(_impl_._has_bits_){from._impl_._has_bits_}
954     , /*decltype(_impl_._cached_size_)*/{}
955     , decltype(_impl_.callchain_){from._impl_.callchain_}
956     , decltype(_impl_.unwinding_result_){nullptr}
957     , decltype(_impl_.time_){}
958     , decltype(_impl_.thread_id_){}
959     , decltype(_impl_.event_type_id_){}
960     , decltype(_impl_.event_count_){}};
961 
962   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
963   if (from._internal_has_unwinding_result()) {
964     _this->_impl_.unwinding_result_ = new ::simpleperf_report_proto::Sample_UnwindingResult(*from._impl_.unwinding_result_);
965   }
966   ::memcpy(&_impl_.time_, &from._impl_.time_,
967     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.event_count_) -
968     reinterpret_cast<char*>(&_impl_.time_)) + sizeof(_impl_.event_count_));
969   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.Sample)
970 }
971 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)972 inline void Sample::SharedCtor(
973     ::_pb::Arena* arena, bool is_message_owned) {
974   (void)arena;
975   (void)is_message_owned;
976   new (&_impl_) Impl_{
977       decltype(_impl_._has_bits_){}
978     , /*decltype(_impl_._cached_size_)*/{}
979     , decltype(_impl_.callchain_){arena}
980     , decltype(_impl_.unwinding_result_){nullptr}
981     , decltype(_impl_.time_){::uint64_t{0u}}
982     , decltype(_impl_.thread_id_){0}
983     , decltype(_impl_.event_type_id_){0u}
984     , decltype(_impl_.event_count_){::uint64_t{0u}}
985   };
986 }
987 
~Sample()988 Sample::~Sample() {
989   // @@protoc_insertion_point(destructor:simpleperf_report_proto.Sample)
990   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
991   (void)arena;
992     return;
993   }
994   SharedDtor();
995 }
996 
SharedDtor()997 inline void Sample::SharedDtor() {
998   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
999   _impl_.callchain_.~RepeatedPtrField();
1000   if (this != internal_default_instance()) delete _impl_.unwinding_result_;
1001 }
1002 
SetCachedSize(int size) const1003 void Sample::SetCachedSize(int size) const {
1004   _impl_._cached_size_.Set(size);
1005 }
1006 
Clear()1007 void Sample::Clear() {
1008 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.Sample)
1009   ::uint32_t cached_has_bits = 0;
1010   // Prevent compiler warnings about cached_has_bits being unused
1011   (void) cached_has_bits;
1012 
1013   _impl_.callchain_.Clear();
1014   cached_has_bits = _impl_._has_bits_[0];
1015   if (cached_has_bits & 0x00000001u) {
1016     GOOGLE_DCHECK(_impl_.unwinding_result_ != nullptr);
1017     _impl_.unwinding_result_->Clear();
1018   }
1019   if (cached_has_bits & 0x0000001eu) {
1020     ::memset(&_impl_.time_, 0, static_cast<size_t>(
1021         reinterpret_cast<char*>(&_impl_.event_count_) -
1022         reinterpret_cast<char*>(&_impl_.time_)) + sizeof(_impl_.event_count_));
1023   }
1024   _impl_._has_bits_.Clear();
1025   _internal_metadata_.Clear<std::string>();
1026 }
1027 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1028 const char* Sample::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1029 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1030   _Internal::HasBits has_bits{};
1031   while (!ctx->Done(&ptr)) {
1032     ::uint32_t tag;
1033     ptr = ::_pbi::ReadTag(ptr, &tag);
1034     switch (tag >> 3) {
1035       // optional uint64 time = 1;
1036       case 1:
1037         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1038           _Internal::set_has_time(&has_bits);
1039           _impl_.time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1040           CHK_(ptr);
1041         } else {
1042           goto handle_unusual;
1043         }
1044         continue;
1045       // optional int32 thread_id = 2;
1046       case 2:
1047         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1048           _Internal::set_has_thread_id(&has_bits);
1049           _impl_.thread_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1050           CHK_(ptr);
1051         } else {
1052           goto handle_unusual;
1053         }
1054         continue;
1055       // repeated .simpleperf_report_proto.Sample.CallChainEntry callchain = 3;
1056       case 3:
1057         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1058           ptr -= 1;
1059           do {
1060             ptr += 1;
1061             ptr = ctx->ParseMessage(_internal_add_callchain(), ptr);
1062             CHK_(ptr);
1063             if (!ctx->DataAvailable(ptr)) break;
1064           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1065         } else {
1066           goto handle_unusual;
1067         }
1068         continue;
1069       // optional uint64 event_count = 4;
1070       case 4:
1071         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1072           _Internal::set_has_event_count(&has_bits);
1073           _impl_.event_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1074           CHK_(ptr);
1075         } else {
1076           goto handle_unusual;
1077         }
1078         continue;
1079       // optional uint32 event_type_id = 5;
1080       case 5:
1081         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1082           _Internal::set_has_event_type_id(&has_bits);
1083           _impl_.event_type_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1084           CHK_(ptr);
1085         } else {
1086           goto handle_unusual;
1087         }
1088         continue;
1089       // optional .simpleperf_report_proto.Sample.UnwindingResult unwinding_result = 6;
1090       case 6:
1091         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1092           ptr = ctx->ParseMessage(_internal_mutable_unwinding_result(), ptr);
1093           CHK_(ptr);
1094         } else {
1095           goto handle_unusual;
1096         }
1097         continue;
1098       default:
1099         goto handle_unusual;
1100     }  // switch
1101   handle_unusual:
1102     if ((tag == 0) || ((tag & 7) == 4)) {
1103       CHK_(ptr);
1104       ctx->SetLastTag(tag);
1105       goto message_done;
1106     }
1107     ptr = UnknownFieldParse(
1108         tag,
1109         _internal_metadata_.mutable_unknown_fields<std::string>(),
1110         ptr, ctx);
1111     CHK_(ptr != nullptr);
1112   }  // while
1113 message_done:
1114   _impl_._has_bits_.Or(has_bits);
1115   return ptr;
1116 failure:
1117   ptr = nullptr;
1118   goto message_done;
1119 #undef CHK_
1120 }
1121 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1122 ::uint8_t* Sample::_InternalSerialize(
1123     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1124   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.Sample)
1125   ::uint32_t cached_has_bits = 0;
1126   (void) cached_has_bits;
1127 
1128   cached_has_bits = _impl_._has_bits_[0];
1129   // optional uint64 time = 1;
1130   if (cached_has_bits & 0x00000002u) {
1131     target = stream->EnsureSpace(target);
1132     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_time(), target);
1133   }
1134 
1135   // optional int32 thread_id = 2;
1136   if (cached_has_bits & 0x00000004u) {
1137     target = stream->EnsureSpace(target);
1138     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_thread_id(), target);
1139   }
1140 
1141   // repeated .simpleperf_report_proto.Sample.CallChainEntry callchain = 3;
1142   for (unsigned i = 0,
1143       n = static_cast<unsigned>(this->_internal_callchain_size()); i < n; i++) {
1144     const auto& repfield = this->_internal_callchain(i);
1145     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1146         InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
1147   }
1148 
1149   // optional uint64 event_count = 4;
1150   if (cached_has_bits & 0x00000010u) {
1151     target = stream->EnsureSpace(target);
1152     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_event_count(), target);
1153   }
1154 
1155   // optional uint32 event_type_id = 5;
1156   if (cached_has_bits & 0x00000008u) {
1157     target = stream->EnsureSpace(target);
1158     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_event_type_id(), target);
1159   }
1160 
1161   // optional .simpleperf_report_proto.Sample.UnwindingResult unwinding_result = 6;
1162   if (cached_has_bits & 0x00000001u) {
1163     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1164       InternalWriteMessage(6, _Internal::unwinding_result(this),
1165         _Internal::unwinding_result(this).GetCachedSize(), target, stream);
1166   }
1167 
1168   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1169     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1170         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1171   }
1172   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.Sample)
1173   return target;
1174 }
1175 
ByteSizeLong() const1176 size_t Sample::ByteSizeLong() const {
1177 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.Sample)
1178   size_t total_size = 0;
1179 
1180   ::uint32_t cached_has_bits = 0;
1181   // Prevent compiler warnings about cached_has_bits being unused
1182   (void) cached_has_bits;
1183 
1184   // repeated .simpleperf_report_proto.Sample.CallChainEntry callchain = 3;
1185   total_size += 1UL * this->_internal_callchain_size();
1186   for (const auto& msg : this->_impl_.callchain_) {
1187     total_size +=
1188       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1189   }
1190 
1191   cached_has_bits = _impl_._has_bits_[0];
1192   if (cached_has_bits & 0x0000001fu) {
1193     // optional .simpleperf_report_proto.Sample.UnwindingResult unwinding_result = 6;
1194     if (cached_has_bits & 0x00000001u) {
1195       total_size += 1 +
1196         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1197           *_impl_.unwinding_result_);
1198     }
1199 
1200     // optional uint64 time = 1;
1201     if (cached_has_bits & 0x00000002u) {
1202       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_time());
1203     }
1204 
1205     // optional int32 thread_id = 2;
1206     if (cached_has_bits & 0x00000004u) {
1207       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_thread_id());
1208     }
1209 
1210     // optional uint32 event_type_id = 5;
1211     if (cached_has_bits & 0x00000008u) {
1212       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_event_type_id());
1213     }
1214 
1215     // optional uint64 event_count = 4;
1216     if (cached_has_bits & 0x00000010u) {
1217       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_event_count());
1218     }
1219 
1220   }
1221   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1222     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1223   }
1224   int cached_size = ::_pbi::ToCachedSize(total_size);
1225   SetCachedSize(cached_size);
1226   return total_size;
1227 }
1228 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1229 void Sample::CheckTypeAndMergeFrom(
1230     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1231   MergeFrom(*::_pbi::DownCast<const Sample*>(
1232       &from));
1233 }
1234 
MergeFrom(const Sample & from)1235 void Sample::MergeFrom(const Sample& from) {
1236   Sample* const _this = this;
1237   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.Sample)
1238   GOOGLE_DCHECK_NE(&from, _this);
1239   ::uint32_t cached_has_bits = 0;
1240   (void) cached_has_bits;
1241 
1242   _this->_impl_.callchain_.MergeFrom(from._impl_.callchain_);
1243   cached_has_bits = from._impl_._has_bits_[0];
1244   if (cached_has_bits & 0x0000001fu) {
1245     if (cached_has_bits & 0x00000001u) {
1246       _this->_internal_mutable_unwinding_result()->::simpleperf_report_proto::Sample_UnwindingResult::MergeFrom(
1247           from._internal_unwinding_result());
1248     }
1249     if (cached_has_bits & 0x00000002u) {
1250       _this->_impl_.time_ = from._impl_.time_;
1251     }
1252     if (cached_has_bits & 0x00000004u) {
1253       _this->_impl_.thread_id_ = from._impl_.thread_id_;
1254     }
1255     if (cached_has_bits & 0x00000008u) {
1256       _this->_impl_.event_type_id_ = from._impl_.event_type_id_;
1257     }
1258     if (cached_has_bits & 0x00000010u) {
1259       _this->_impl_.event_count_ = from._impl_.event_count_;
1260     }
1261     _this->_impl_._has_bits_[0] |= cached_has_bits;
1262   }
1263   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1264 }
1265 
CopyFrom(const Sample & from)1266 void Sample::CopyFrom(const Sample& from) {
1267 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.Sample)
1268   if (&from == this) return;
1269   Clear();
1270   MergeFrom(from);
1271 }
1272 
IsInitialized() const1273 bool Sample::IsInitialized() const {
1274   return true;
1275 }
1276 
InternalSwap(Sample * other)1277 void Sample::InternalSwap(Sample* other) {
1278   using std::swap;
1279   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1280   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1281   _impl_.callchain_.InternalSwap(&other->_impl_.callchain_);
1282   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1283       PROTOBUF_FIELD_OFFSET(Sample, _impl_.event_count_)
1284       + sizeof(Sample::_impl_.event_count_)  // NOLINT
1285       - PROTOBUF_FIELD_OFFSET(Sample, _impl_.unwinding_result_)>(
1286           reinterpret_cast<char*>(&_impl_.unwinding_result_),
1287           reinterpret_cast<char*>(&other->_impl_.unwinding_result_));
1288 }
1289 
GetTypeName() const1290 std::string Sample::GetTypeName() const {
1291   return "simpleperf_report_proto.Sample";
1292 }
1293 
1294 
1295 // ===================================================================
1296 
1297 class LostSituation::_Internal {
1298  public:
1299   using HasBits = decltype(std::declval<LostSituation>()._impl_._has_bits_);
set_has_sample_count(HasBits * has_bits)1300   static void set_has_sample_count(HasBits* has_bits) {
1301     (*has_bits)[0] |= 1u;
1302   }
set_has_lost_count(HasBits * has_bits)1303   static void set_has_lost_count(HasBits* has_bits) {
1304     (*has_bits)[0] |= 2u;
1305   }
1306 };
1307 
LostSituation(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1308 LostSituation::LostSituation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1309                          bool is_message_owned)
1310   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1311   SharedCtor(arena, is_message_owned);
1312   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.LostSituation)
1313 }
LostSituation(const LostSituation & from)1314 LostSituation::LostSituation(const LostSituation& from)
1315   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1316   LostSituation* const _this = this; (void)_this;
1317   new (&_impl_) Impl_{
1318       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1319     , /*decltype(_impl_._cached_size_)*/{}
1320     , decltype(_impl_.sample_count_){}
1321     , decltype(_impl_.lost_count_){}};
1322 
1323   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1324   ::memcpy(&_impl_.sample_count_, &from._impl_.sample_count_,
1325     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.lost_count_) -
1326     reinterpret_cast<char*>(&_impl_.sample_count_)) + sizeof(_impl_.lost_count_));
1327   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.LostSituation)
1328 }
1329 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1330 inline void LostSituation::SharedCtor(
1331     ::_pb::Arena* arena, bool is_message_owned) {
1332   (void)arena;
1333   (void)is_message_owned;
1334   new (&_impl_) Impl_{
1335       decltype(_impl_._has_bits_){}
1336     , /*decltype(_impl_._cached_size_)*/{}
1337     , decltype(_impl_.sample_count_){::uint64_t{0u}}
1338     , decltype(_impl_.lost_count_){::uint64_t{0u}}
1339   };
1340 }
1341 
~LostSituation()1342 LostSituation::~LostSituation() {
1343   // @@protoc_insertion_point(destructor:simpleperf_report_proto.LostSituation)
1344   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1345   (void)arena;
1346     return;
1347   }
1348   SharedDtor();
1349 }
1350 
SharedDtor()1351 inline void LostSituation::SharedDtor() {
1352   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1353 }
1354 
SetCachedSize(int size) const1355 void LostSituation::SetCachedSize(int size) const {
1356   _impl_._cached_size_.Set(size);
1357 }
1358 
Clear()1359 void LostSituation::Clear() {
1360 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.LostSituation)
1361   ::uint32_t cached_has_bits = 0;
1362   // Prevent compiler warnings about cached_has_bits being unused
1363   (void) cached_has_bits;
1364 
1365   cached_has_bits = _impl_._has_bits_[0];
1366   if (cached_has_bits & 0x00000003u) {
1367     ::memset(&_impl_.sample_count_, 0, static_cast<size_t>(
1368         reinterpret_cast<char*>(&_impl_.lost_count_) -
1369         reinterpret_cast<char*>(&_impl_.sample_count_)) + sizeof(_impl_.lost_count_));
1370   }
1371   _impl_._has_bits_.Clear();
1372   _internal_metadata_.Clear<std::string>();
1373 }
1374 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1375 const char* LostSituation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1376 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1377   _Internal::HasBits has_bits{};
1378   while (!ctx->Done(&ptr)) {
1379     ::uint32_t tag;
1380     ptr = ::_pbi::ReadTag(ptr, &tag);
1381     switch (tag >> 3) {
1382       // optional uint64 sample_count = 1;
1383       case 1:
1384         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1385           _Internal::set_has_sample_count(&has_bits);
1386           _impl_.sample_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1387           CHK_(ptr);
1388         } else {
1389           goto handle_unusual;
1390         }
1391         continue;
1392       // optional uint64 lost_count = 2;
1393       case 2:
1394         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1395           _Internal::set_has_lost_count(&has_bits);
1396           _impl_.lost_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1397           CHK_(ptr);
1398         } else {
1399           goto handle_unusual;
1400         }
1401         continue;
1402       default:
1403         goto handle_unusual;
1404     }  // switch
1405   handle_unusual:
1406     if ((tag == 0) || ((tag & 7) == 4)) {
1407       CHK_(ptr);
1408       ctx->SetLastTag(tag);
1409       goto message_done;
1410     }
1411     ptr = UnknownFieldParse(
1412         tag,
1413         _internal_metadata_.mutable_unknown_fields<std::string>(),
1414         ptr, ctx);
1415     CHK_(ptr != nullptr);
1416   }  // while
1417 message_done:
1418   _impl_._has_bits_.Or(has_bits);
1419   return ptr;
1420 failure:
1421   ptr = nullptr;
1422   goto message_done;
1423 #undef CHK_
1424 }
1425 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1426 ::uint8_t* LostSituation::_InternalSerialize(
1427     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1428   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.LostSituation)
1429   ::uint32_t cached_has_bits = 0;
1430   (void) cached_has_bits;
1431 
1432   cached_has_bits = _impl_._has_bits_[0];
1433   // optional uint64 sample_count = 1;
1434   if (cached_has_bits & 0x00000001u) {
1435     target = stream->EnsureSpace(target);
1436     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_sample_count(), target);
1437   }
1438 
1439   // optional uint64 lost_count = 2;
1440   if (cached_has_bits & 0x00000002u) {
1441     target = stream->EnsureSpace(target);
1442     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_lost_count(), target);
1443   }
1444 
1445   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1446     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1447         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1448   }
1449   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.LostSituation)
1450   return target;
1451 }
1452 
ByteSizeLong() const1453 size_t LostSituation::ByteSizeLong() const {
1454 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.LostSituation)
1455   size_t total_size = 0;
1456 
1457   ::uint32_t cached_has_bits = 0;
1458   // Prevent compiler warnings about cached_has_bits being unused
1459   (void) cached_has_bits;
1460 
1461   cached_has_bits = _impl_._has_bits_[0];
1462   if (cached_has_bits & 0x00000003u) {
1463     // optional uint64 sample_count = 1;
1464     if (cached_has_bits & 0x00000001u) {
1465       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_sample_count());
1466     }
1467 
1468     // optional uint64 lost_count = 2;
1469     if (cached_has_bits & 0x00000002u) {
1470       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_lost_count());
1471     }
1472 
1473   }
1474   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1475     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1476   }
1477   int cached_size = ::_pbi::ToCachedSize(total_size);
1478   SetCachedSize(cached_size);
1479   return total_size;
1480 }
1481 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1482 void LostSituation::CheckTypeAndMergeFrom(
1483     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1484   MergeFrom(*::_pbi::DownCast<const LostSituation*>(
1485       &from));
1486 }
1487 
MergeFrom(const LostSituation & from)1488 void LostSituation::MergeFrom(const LostSituation& from) {
1489   LostSituation* const _this = this;
1490   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.LostSituation)
1491   GOOGLE_DCHECK_NE(&from, _this);
1492   ::uint32_t cached_has_bits = 0;
1493   (void) cached_has_bits;
1494 
1495   cached_has_bits = from._impl_._has_bits_[0];
1496   if (cached_has_bits & 0x00000003u) {
1497     if (cached_has_bits & 0x00000001u) {
1498       _this->_impl_.sample_count_ = from._impl_.sample_count_;
1499     }
1500     if (cached_has_bits & 0x00000002u) {
1501       _this->_impl_.lost_count_ = from._impl_.lost_count_;
1502     }
1503     _this->_impl_._has_bits_[0] |= cached_has_bits;
1504   }
1505   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1506 }
1507 
CopyFrom(const LostSituation & from)1508 void LostSituation::CopyFrom(const LostSituation& from) {
1509 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.LostSituation)
1510   if (&from == this) return;
1511   Clear();
1512   MergeFrom(from);
1513 }
1514 
IsInitialized() const1515 bool LostSituation::IsInitialized() const {
1516   return true;
1517 }
1518 
InternalSwap(LostSituation * other)1519 void LostSituation::InternalSwap(LostSituation* other) {
1520   using std::swap;
1521   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1522   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1523   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1524       PROTOBUF_FIELD_OFFSET(LostSituation, _impl_.lost_count_)
1525       + sizeof(LostSituation::_impl_.lost_count_)  // NOLINT
1526       - PROTOBUF_FIELD_OFFSET(LostSituation, _impl_.sample_count_)>(
1527           reinterpret_cast<char*>(&_impl_.sample_count_),
1528           reinterpret_cast<char*>(&other->_impl_.sample_count_));
1529 }
1530 
GetTypeName() const1531 std::string LostSituation::GetTypeName() const {
1532   return "simpleperf_report_proto.LostSituation";
1533 }
1534 
1535 
1536 // ===================================================================
1537 
1538 class File::_Internal {
1539  public:
1540   using HasBits = decltype(std::declval<File>()._impl_._has_bits_);
set_has_id(HasBits * has_bits)1541   static void set_has_id(HasBits* has_bits) {
1542     (*has_bits)[0] |= 2u;
1543   }
set_has_path(HasBits * has_bits)1544   static void set_has_path(HasBits* has_bits) {
1545     (*has_bits)[0] |= 1u;
1546   }
1547 };
1548 
File(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1549 File::File(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1550                          bool is_message_owned)
1551   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1552   SharedCtor(arena, is_message_owned);
1553   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.File)
1554 }
File(const File & from)1555 File::File(const File& from)
1556   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1557   File* const _this = this; (void)_this;
1558   new (&_impl_) Impl_{
1559       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1560     , /*decltype(_impl_._cached_size_)*/{}
1561     , decltype(_impl_.symbol_){from._impl_.symbol_}
1562     , decltype(_impl_.mangled_symbol_){from._impl_.mangled_symbol_}
1563     , decltype(_impl_.path_){}
1564     , decltype(_impl_.id_){}};
1565 
1566   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1567   _impl_.path_.InitDefault();
1568   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1569     _impl_.path_.Set("", GetArenaForAllocation());
1570   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1571   if (from._internal_has_path()) {
1572     _this->_impl_.path_.Set(from._internal_path(),
1573       _this->GetArenaForAllocation());
1574   }
1575   _this->_impl_.id_ = from._impl_.id_;
1576   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.File)
1577 }
1578 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1579 inline void File::SharedCtor(
1580     ::_pb::Arena* arena, bool is_message_owned) {
1581   (void)arena;
1582   (void)is_message_owned;
1583   new (&_impl_) Impl_{
1584       decltype(_impl_._has_bits_){}
1585     , /*decltype(_impl_._cached_size_)*/{}
1586     , decltype(_impl_.symbol_){arena}
1587     , decltype(_impl_.mangled_symbol_){arena}
1588     , decltype(_impl_.path_){}
1589     , decltype(_impl_.id_){0u}
1590   };
1591   _impl_.path_.InitDefault();
1592   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1593     _impl_.path_.Set("", GetArenaForAllocation());
1594   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1595 }
1596 
~File()1597 File::~File() {
1598   // @@protoc_insertion_point(destructor:simpleperf_report_proto.File)
1599   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1600   (void)arena;
1601     return;
1602   }
1603   SharedDtor();
1604 }
1605 
SharedDtor()1606 inline void File::SharedDtor() {
1607   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1608   _impl_.symbol_.~RepeatedPtrField();
1609   _impl_.mangled_symbol_.~RepeatedPtrField();
1610   _impl_.path_.Destroy();
1611 }
1612 
SetCachedSize(int size) const1613 void File::SetCachedSize(int size) const {
1614   _impl_._cached_size_.Set(size);
1615 }
1616 
Clear()1617 void File::Clear() {
1618 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.File)
1619   ::uint32_t cached_has_bits = 0;
1620   // Prevent compiler warnings about cached_has_bits being unused
1621   (void) cached_has_bits;
1622 
1623   _impl_.symbol_.Clear();
1624   _impl_.mangled_symbol_.Clear();
1625   cached_has_bits = _impl_._has_bits_[0];
1626   if (cached_has_bits & 0x00000001u) {
1627     _impl_.path_.ClearNonDefaultToEmpty();
1628   }
1629   _impl_.id_ = 0u;
1630   _impl_._has_bits_.Clear();
1631   _internal_metadata_.Clear<std::string>();
1632 }
1633 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1634 const char* File::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1635 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1636   _Internal::HasBits has_bits{};
1637   while (!ctx->Done(&ptr)) {
1638     ::uint32_t tag;
1639     ptr = ::_pbi::ReadTag(ptr, &tag);
1640     switch (tag >> 3) {
1641       // optional uint32 id = 1;
1642       case 1:
1643         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1644           _Internal::set_has_id(&has_bits);
1645           _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1646           CHK_(ptr);
1647         } else {
1648           goto handle_unusual;
1649         }
1650         continue;
1651       // optional string path = 2;
1652       case 2:
1653         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1654           auto str = _internal_mutable_path();
1655           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1656           CHK_(ptr);
1657         } else {
1658           goto handle_unusual;
1659         }
1660         continue;
1661       // repeated string symbol = 3;
1662       case 3:
1663         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1664           ptr -= 1;
1665           do {
1666             ptr += 1;
1667             auto str = _internal_add_symbol();
1668             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1669             CHK_(ptr);
1670             if (!ctx->DataAvailable(ptr)) break;
1671           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1672         } else {
1673           goto handle_unusual;
1674         }
1675         continue;
1676       // repeated string mangled_symbol = 4;
1677       case 4:
1678         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1679           ptr -= 1;
1680           do {
1681             ptr += 1;
1682             auto str = _internal_add_mangled_symbol();
1683             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1684             CHK_(ptr);
1685             if (!ctx->DataAvailable(ptr)) break;
1686           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
1687         } else {
1688           goto handle_unusual;
1689         }
1690         continue;
1691       default:
1692         goto handle_unusual;
1693     }  // switch
1694   handle_unusual:
1695     if ((tag == 0) || ((tag & 7) == 4)) {
1696       CHK_(ptr);
1697       ctx->SetLastTag(tag);
1698       goto message_done;
1699     }
1700     ptr = UnknownFieldParse(
1701         tag,
1702         _internal_metadata_.mutable_unknown_fields<std::string>(),
1703         ptr, ctx);
1704     CHK_(ptr != nullptr);
1705   }  // while
1706 message_done:
1707   _impl_._has_bits_.Or(has_bits);
1708   return ptr;
1709 failure:
1710   ptr = nullptr;
1711   goto message_done;
1712 #undef CHK_
1713 }
1714 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1715 ::uint8_t* File::_InternalSerialize(
1716     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1717   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.File)
1718   ::uint32_t cached_has_bits = 0;
1719   (void) cached_has_bits;
1720 
1721   cached_has_bits = _impl_._has_bits_[0];
1722   // optional uint32 id = 1;
1723   if (cached_has_bits & 0x00000002u) {
1724     target = stream->EnsureSpace(target);
1725     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_id(), target);
1726   }
1727 
1728   // optional string path = 2;
1729   if (cached_has_bits & 0x00000001u) {
1730     target = stream->WriteStringMaybeAliased(
1731         2, this->_internal_path(), target);
1732   }
1733 
1734   // repeated string symbol = 3;
1735   for (int i = 0, n = this->_internal_symbol_size(); i < n; i++) {
1736     const auto& s = this->_internal_symbol(i);
1737     target = stream->WriteString(3, s, target);
1738   }
1739 
1740   // repeated string mangled_symbol = 4;
1741   for (int i = 0, n = this->_internal_mangled_symbol_size(); i < n; i++) {
1742     const auto& s = this->_internal_mangled_symbol(i);
1743     target = stream->WriteString(4, s, target);
1744   }
1745 
1746   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1747     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1748         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1749   }
1750   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.File)
1751   return target;
1752 }
1753 
ByteSizeLong() const1754 size_t File::ByteSizeLong() const {
1755 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.File)
1756   size_t total_size = 0;
1757 
1758   ::uint32_t cached_has_bits = 0;
1759   // Prevent compiler warnings about cached_has_bits being unused
1760   (void) cached_has_bits;
1761 
1762   // repeated string symbol = 3;
1763   total_size += 1 *
1764       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.symbol_.size());
1765   for (int i = 0, n = _impl_.symbol_.size(); i < n; i++) {
1766     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1767       _impl_.symbol_.Get(i));
1768   }
1769 
1770   // repeated string mangled_symbol = 4;
1771   total_size += 1 *
1772       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.mangled_symbol_.size());
1773   for (int i = 0, n = _impl_.mangled_symbol_.size(); i < n; i++) {
1774     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1775       _impl_.mangled_symbol_.Get(i));
1776   }
1777 
1778   cached_has_bits = _impl_._has_bits_[0];
1779   if (cached_has_bits & 0x00000003u) {
1780     // optional string path = 2;
1781     if (cached_has_bits & 0x00000001u) {
1782       total_size += 1 +
1783         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1784           this->_internal_path());
1785     }
1786 
1787     // optional uint32 id = 1;
1788     if (cached_has_bits & 0x00000002u) {
1789       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_id());
1790     }
1791 
1792   }
1793   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1794     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1795   }
1796   int cached_size = ::_pbi::ToCachedSize(total_size);
1797   SetCachedSize(cached_size);
1798   return total_size;
1799 }
1800 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1801 void File::CheckTypeAndMergeFrom(
1802     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1803   MergeFrom(*::_pbi::DownCast<const File*>(
1804       &from));
1805 }
1806 
MergeFrom(const File & from)1807 void File::MergeFrom(const File& from) {
1808   File* const _this = this;
1809   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.File)
1810   GOOGLE_DCHECK_NE(&from, _this);
1811   ::uint32_t cached_has_bits = 0;
1812   (void) cached_has_bits;
1813 
1814   _this->_impl_.symbol_.MergeFrom(from._impl_.symbol_);
1815   _this->_impl_.mangled_symbol_.MergeFrom(from._impl_.mangled_symbol_);
1816   cached_has_bits = from._impl_._has_bits_[0];
1817   if (cached_has_bits & 0x00000003u) {
1818     if (cached_has_bits & 0x00000001u) {
1819       _this->_internal_set_path(from._internal_path());
1820     }
1821     if (cached_has_bits & 0x00000002u) {
1822       _this->_impl_.id_ = from._impl_.id_;
1823     }
1824     _this->_impl_._has_bits_[0] |= cached_has_bits;
1825   }
1826   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1827 }
1828 
CopyFrom(const File & from)1829 void File::CopyFrom(const File& from) {
1830 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.File)
1831   if (&from == this) return;
1832   Clear();
1833   MergeFrom(from);
1834 }
1835 
IsInitialized() const1836 bool File::IsInitialized() const {
1837   return true;
1838 }
1839 
InternalSwap(File * other)1840 void File::InternalSwap(File* other) {
1841   using std::swap;
1842   auto* lhs_arena = GetArenaForAllocation();
1843   auto* rhs_arena = other->GetArenaForAllocation();
1844   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1845   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1846   _impl_.symbol_.InternalSwap(&other->_impl_.symbol_);
1847   _impl_.mangled_symbol_.InternalSwap(&other->_impl_.mangled_symbol_);
1848   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1849       &_impl_.path_, lhs_arena,
1850       &other->_impl_.path_, rhs_arena
1851   );
1852   swap(_impl_.id_, other->_impl_.id_);
1853 }
1854 
GetTypeName() const1855 std::string File::GetTypeName() const {
1856   return "simpleperf_report_proto.File";
1857 }
1858 
1859 
1860 // ===================================================================
1861 
1862 class Thread::_Internal {
1863  public:
1864   using HasBits = decltype(std::declval<Thread>()._impl_._has_bits_);
set_has_thread_id(HasBits * has_bits)1865   static void set_has_thread_id(HasBits* has_bits) {
1866     (*has_bits)[0] |= 2u;
1867   }
set_has_process_id(HasBits * has_bits)1868   static void set_has_process_id(HasBits* has_bits) {
1869     (*has_bits)[0] |= 4u;
1870   }
set_has_thread_name(HasBits * has_bits)1871   static void set_has_thread_name(HasBits* has_bits) {
1872     (*has_bits)[0] |= 1u;
1873   }
1874 };
1875 
Thread(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1876 Thread::Thread(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1877                          bool is_message_owned)
1878   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1879   SharedCtor(arena, is_message_owned);
1880   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.Thread)
1881 }
Thread(const Thread & from)1882 Thread::Thread(const Thread& from)
1883   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1884   Thread* const _this = this; (void)_this;
1885   new (&_impl_) Impl_{
1886       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1887     , /*decltype(_impl_._cached_size_)*/{}
1888     , decltype(_impl_.thread_name_){}
1889     , decltype(_impl_.thread_id_){}
1890     , decltype(_impl_.process_id_){}};
1891 
1892   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1893   _impl_.thread_name_.InitDefault();
1894   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1895     _impl_.thread_name_.Set("", GetArenaForAllocation());
1896   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1897   if (from._internal_has_thread_name()) {
1898     _this->_impl_.thread_name_.Set(from._internal_thread_name(),
1899       _this->GetArenaForAllocation());
1900   }
1901   ::memcpy(&_impl_.thread_id_, &from._impl_.thread_id_,
1902     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.process_id_) -
1903     reinterpret_cast<char*>(&_impl_.thread_id_)) + sizeof(_impl_.process_id_));
1904   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.Thread)
1905 }
1906 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1907 inline void Thread::SharedCtor(
1908     ::_pb::Arena* arena, bool is_message_owned) {
1909   (void)arena;
1910   (void)is_message_owned;
1911   new (&_impl_) Impl_{
1912       decltype(_impl_._has_bits_){}
1913     , /*decltype(_impl_._cached_size_)*/{}
1914     , decltype(_impl_.thread_name_){}
1915     , decltype(_impl_.thread_id_){0u}
1916     , decltype(_impl_.process_id_){0u}
1917   };
1918   _impl_.thread_name_.InitDefault();
1919   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1920     _impl_.thread_name_.Set("", GetArenaForAllocation());
1921   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1922 }
1923 
~Thread()1924 Thread::~Thread() {
1925   // @@protoc_insertion_point(destructor:simpleperf_report_proto.Thread)
1926   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1927   (void)arena;
1928     return;
1929   }
1930   SharedDtor();
1931 }
1932 
SharedDtor()1933 inline void Thread::SharedDtor() {
1934   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1935   _impl_.thread_name_.Destroy();
1936 }
1937 
SetCachedSize(int size) const1938 void Thread::SetCachedSize(int size) const {
1939   _impl_._cached_size_.Set(size);
1940 }
1941 
Clear()1942 void Thread::Clear() {
1943 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.Thread)
1944   ::uint32_t cached_has_bits = 0;
1945   // Prevent compiler warnings about cached_has_bits being unused
1946   (void) cached_has_bits;
1947 
1948   cached_has_bits = _impl_._has_bits_[0];
1949   if (cached_has_bits & 0x00000001u) {
1950     _impl_.thread_name_.ClearNonDefaultToEmpty();
1951   }
1952   if (cached_has_bits & 0x00000006u) {
1953     ::memset(&_impl_.thread_id_, 0, static_cast<size_t>(
1954         reinterpret_cast<char*>(&_impl_.process_id_) -
1955         reinterpret_cast<char*>(&_impl_.thread_id_)) + sizeof(_impl_.process_id_));
1956   }
1957   _impl_._has_bits_.Clear();
1958   _internal_metadata_.Clear<std::string>();
1959 }
1960 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1961 const char* Thread::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1962 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1963   _Internal::HasBits has_bits{};
1964   while (!ctx->Done(&ptr)) {
1965     ::uint32_t tag;
1966     ptr = ::_pbi::ReadTag(ptr, &tag);
1967     switch (tag >> 3) {
1968       // optional uint32 thread_id = 1;
1969       case 1:
1970         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1971           _Internal::set_has_thread_id(&has_bits);
1972           _impl_.thread_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1973           CHK_(ptr);
1974         } else {
1975           goto handle_unusual;
1976         }
1977         continue;
1978       // optional uint32 process_id = 2;
1979       case 2:
1980         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1981           _Internal::set_has_process_id(&has_bits);
1982           _impl_.process_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1983           CHK_(ptr);
1984         } else {
1985           goto handle_unusual;
1986         }
1987         continue;
1988       // optional string thread_name = 3;
1989       case 3:
1990         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1991           auto str = _internal_mutable_thread_name();
1992           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1993           CHK_(ptr);
1994         } else {
1995           goto handle_unusual;
1996         }
1997         continue;
1998       default:
1999         goto handle_unusual;
2000     }  // switch
2001   handle_unusual:
2002     if ((tag == 0) || ((tag & 7) == 4)) {
2003       CHK_(ptr);
2004       ctx->SetLastTag(tag);
2005       goto message_done;
2006     }
2007     ptr = UnknownFieldParse(
2008         tag,
2009         _internal_metadata_.mutable_unknown_fields<std::string>(),
2010         ptr, ctx);
2011     CHK_(ptr != nullptr);
2012   }  // while
2013 message_done:
2014   _impl_._has_bits_.Or(has_bits);
2015   return ptr;
2016 failure:
2017   ptr = nullptr;
2018   goto message_done;
2019 #undef CHK_
2020 }
2021 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2022 ::uint8_t* Thread::_InternalSerialize(
2023     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2024   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.Thread)
2025   ::uint32_t cached_has_bits = 0;
2026   (void) cached_has_bits;
2027 
2028   cached_has_bits = _impl_._has_bits_[0];
2029   // optional uint32 thread_id = 1;
2030   if (cached_has_bits & 0x00000002u) {
2031     target = stream->EnsureSpace(target);
2032     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_thread_id(), target);
2033   }
2034 
2035   // optional uint32 process_id = 2;
2036   if (cached_has_bits & 0x00000004u) {
2037     target = stream->EnsureSpace(target);
2038     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_process_id(), target);
2039   }
2040 
2041   // optional string thread_name = 3;
2042   if (cached_has_bits & 0x00000001u) {
2043     target = stream->WriteStringMaybeAliased(
2044         3, this->_internal_thread_name(), target);
2045   }
2046 
2047   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2048     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2049         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2050   }
2051   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.Thread)
2052   return target;
2053 }
2054 
ByteSizeLong() const2055 size_t Thread::ByteSizeLong() const {
2056 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.Thread)
2057   size_t total_size = 0;
2058 
2059   ::uint32_t cached_has_bits = 0;
2060   // Prevent compiler warnings about cached_has_bits being unused
2061   (void) cached_has_bits;
2062 
2063   cached_has_bits = _impl_._has_bits_[0];
2064   if (cached_has_bits & 0x00000007u) {
2065     // optional string thread_name = 3;
2066     if (cached_has_bits & 0x00000001u) {
2067       total_size += 1 +
2068         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2069           this->_internal_thread_name());
2070     }
2071 
2072     // optional uint32 thread_id = 1;
2073     if (cached_has_bits & 0x00000002u) {
2074       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_thread_id());
2075     }
2076 
2077     // optional uint32 process_id = 2;
2078     if (cached_has_bits & 0x00000004u) {
2079       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_process_id());
2080     }
2081 
2082   }
2083   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2084     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2085   }
2086   int cached_size = ::_pbi::ToCachedSize(total_size);
2087   SetCachedSize(cached_size);
2088   return total_size;
2089 }
2090 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2091 void Thread::CheckTypeAndMergeFrom(
2092     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2093   MergeFrom(*::_pbi::DownCast<const Thread*>(
2094       &from));
2095 }
2096 
MergeFrom(const Thread & from)2097 void Thread::MergeFrom(const Thread& from) {
2098   Thread* const _this = this;
2099   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.Thread)
2100   GOOGLE_DCHECK_NE(&from, _this);
2101   ::uint32_t cached_has_bits = 0;
2102   (void) cached_has_bits;
2103 
2104   cached_has_bits = from._impl_._has_bits_[0];
2105   if (cached_has_bits & 0x00000007u) {
2106     if (cached_has_bits & 0x00000001u) {
2107       _this->_internal_set_thread_name(from._internal_thread_name());
2108     }
2109     if (cached_has_bits & 0x00000002u) {
2110       _this->_impl_.thread_id_ = from._impl_.thread_id_;
2111     }
2112     if (cached_has_bits & 0x00000004u) {
2113       _this->_impl_.process_id_ = from._impl_.process_id_;
2114     }
2115     _this->_impl_._has_bits_[0] |= cached_has_bits;
2116   }
2117   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2118 }
2119 
CopyFrom(const Thread & from)2120 void Thread::CopyFrom(const Thread& from) {
2121 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.Thread)
2122   if (&from == this) return;
2123   Clear();
2124   MergeFrom(from);
2125 }
2126 
IsInitialized() const2127 bool Thread::IsInitialized() const {
2128   return true;
2129 }
2130 
InternalSwap(Thread * other)2131 void Thread::InternalSwap(Thread* other) {
2132   using std::swap;
2133   auto* lhs_arena = GetArenaForAllocation();
2134   auto* rhs_arena = other->GetArenaForAllocation();
2135   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2136   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2137   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2138       &_impl_.thread_name_, lhs_arena,
2139       &other->_impl_.thread_name_, rhs_arena
2140   );
2141   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2142       PROTOBUF_FIELD_OFFSET(Thread, _impl_.process_id_)
2143       + sizeof(Thread::_impl_.process_id_)  // NOLINT
2144       - PROTOBUF_FIELD_OFFSET(Thread, _impl_.thread_id_)>(
2145           reinterpret_cast<char*>(&_impl_.thread_id_),
2146           reinterpret_cast<char*>(&other->_impl_.thread_id_));
2147 }
2148 
GetTypeName() const2149 std::string Thread::GetTypeName() const {
2150   return "simpleperf_report_proto.Thread";
2151 }
2152 
2153 
2154 // ===================================================================
2155 
2156 class MetaInfo::_Internal {
2157  public:
2158   using HasBits = decltype(std::declval<MetaInfo>()._impl_._has_bits_);
set_has_app_package_name(HasBits * has_bits)2159   static void set_has_app_package_name(HasBits* has_bits) {
2160     (*has_bits)[0] |= 1u;
2161   }
set_has_app_type(HasBits * has_bits)2162   static void set_has_app_type(HasBits* has_bits) {
2163     (*has_bits)[0] |= 2u;
2164   }
set_has_android_sdk_version(HasBits * has_bits)2165   static void set_has_android_sdk_version(HasBits* has_bits) {
2166     (*has_bits)[0] |= 4u;
2167   }
set_has_android_build_type(HasBits * has_bits)2168   static void set_has_android_build_type(HasBits* has_bits) {
2169     (*has_bits)[0] |= 8u;
2170   }
set_has_trace_offcpu(HasBits * has_bits)2171   static void set_has_trace_offcpu(HasBits* has_bits) {
2172     (*has_bits)[0] |= 16u;
2173   }
2174 };
2175 
MetaInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2176 MetaInfo::MetaInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2177                          bool is_message_owned)
2178   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2179   SharedCtor(arena, is_message_owned);
2180   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.MetaInfo)
2181 }
MetaInfo(const MetaInfo & from)2182 MetaInfo::MetaInfo(const MetaInfo& from)
2183   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2184   MetaInfo* const _this = this; (void)_this;
2185   new (&_impl_) Impl_{
2186       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2187     , /*decltype(_impl_._cached_size_)*/{}
2188     , decltype(_impl_.event_type_){from._impl_.event_type_}
2189     , decltype(_impl_.app_package_name_){}
2190     , decltype(_impl_.app_type_){}
2191     , decltype(_impl_.android_sdk_version_){}
2192     , decltype(_impl_.android_build_type_){}
2193     , decltype(_impl_.trace_offcpu_){}};
2194 
2195   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2196   _impl_.app_package_name_.InitDefault();
2197   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2198     _impl_.app_package_name_.Set("", GetArenaForAllocation());
2199   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2200   if (from._internal_has_app_package_name()) {
2201     _this->_impl_.app_package_name_.Set(from._internal_app_package_name(),
2202       _this->GetArenaForAllocation());
2203   }
2204   _impl_.app_type_.InitDefault();
2205   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2206     _impl_.app_type_.Set("", GetArenaForAllocation());
2207   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2208   if (from._internal_has_app_type()) {
2209     _this->_impl_.app_type_.Set(from._internal_app_type(),
2210       _this->GetArenaForAllocation());
2211   }
2212   _impl_.android_sdk_version_.InitDefault();
2213   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2214     _impl_.android_sdk_version_.Set("", GetArenaForAllocation());
2215   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2216   if (from._internal_has_android_sdk_version()) {
2217     _this->_impl_.android_sdk_version_.Set(from._internal_android_sdk_version(),
2218       _this->GetArenaForAllocation());
2219   }
2220   _impl_.android_build_type_.InitDefault();
2221   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2222     _impl_.android_build_type_.Set("", GetArenaForAllocation());
2223   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2224   if (from._internal_has_android_build_type()) {
2225     _this->_impl_.android_build_type_.Set(from._internal_android_build_type(),
2226       _this->GetArenaForAllocation());
2227   }
2228   _this->_impl_.trace_offcpu_ = from._impl_.trace_offcpu_;
2229   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.MetaInfo)
2230 }
2231 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2232 inline void MetaInfo::SharedCtor(
2233     ::_pb::Arena* arena, bool is_message_owned) {
2234   (void)arena;
2235   (void)is_message_owned;
2236   new (&_impl_) Impl_{
2237       decltype(_impl_._has_bits_){}
2238     , /*decltype(_impl_._cached_size_)*/{}
2239     , decltype(_impl_.event_type_){arena}
2240     , decltype(_impl_.app_package_name_){}
2241     , decltype(_impl_.app_type_){}
2242     , decltype(_impl_.android_sdk_version_){}
2243     , decltype(_impl_.android_build_type_){}
2244     , decltype(_impl_.trace_offcpu_){false}
2245   };
2246   _impl_.app_package_name_.InitDefault();
2247   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2248     _impl_.app_package_name_.Set("", GetArenaForAllocation());
2249   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2250   _impl_.app_type_.InitDefault();
2251   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2252     _impl_.app_type_.Set("", GetArenaForAllocation());
2253   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2254   _impl_.android_sdk_version_.InitDefault();
2255   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2256     _impl_.android_sdk_version_.Set("", GetArenaForAllocation());
2257   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2258   _impl_.android_build_type_.InitDefault();
2259   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2260     _impl_.android_build_type_.Set("", GetArenaForAllocation());
2261   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2262 }
2263 
~MetaInfo()2264 MetaInfo::~MetaInfo() {
2265   // @@protoc_insertion_point(destructor:simpleperf_report_proto.MetaInfo)
2266   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2267   (void)arena;
2268     return;
2269   }
2270   SharedDtor();
2271 }
2272 
SharedDtor()2273 inline void MetaInfo::SharedDtor() {
2274   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2275   _impl_.event_type_.~RepeatedPtrField();
2276   _impl_.app_package_name_.Destroy();
2277   _impl_.app_type_.Destroy();
2278   _impl_.android_sdk_version_.Destroy();
2279   _impl_.android_build_type_.Destroy();
2280 }
2281 
SetCachedSize(int size) const2282 void MetaInfo::SetCachedSize(int size) const {
2283   _impl_._cached_size_.Set(size);
2284 }
2285 
Clear()2286 void MetaInfo::Clear() {
2287 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.MetaInfo)
2288   ::uint32_t cached_has_bits = 0;
2289   // Prevent compiler warnings about cached_has_bits being unused
2290   (void) cached_has_bits;
2291 
2292   _impl_.event_type_.Clear();
2293   cached_has_bits = _impl_._has_bits_[0];
2294   if (cached_has_bits & 0x0000000fu) {
2295     if (cached_has_bits & 0x00000001u) {
2296       _impl_.app_package_name_.ClearNonDefaultToEmpty();
2297     }
2298     if (cached_has_bits & 0x00000002u) {
2299       _impl_.app_type_.ClearNonDefaultToEmpty();
2300     }
2301     if (cached_has_bits & 0x00000004u) {
2302       _impl_.android_sdk_version_.ClearNonDefaultToEmpty();
2303     }
2304     if (cached_has_bits & 0x00000008u) {
2305       _impl_.android_build_type_.ClearNonDefaultToEmpty();
2306     }
2307   }
2308   _impl_.trace_offcpu_ = false;
2309   _impl_._has_bits_.Clear();
2310   _internal_metadata_.Clear<std::string>();
2311 }
2312 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2313 const char* MetaInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2314 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2315   _Internal::HasBits has_bits{};
2316   while (!ctx->Done(&ptr)) {
2317     ::uint32_t tag;
2318     ptr = ::_pbi::ReadTag(ptr, &tag);
2319     switch (tag >> 3) {
2320       // repeated string event_type = 1;
2321       case 1:
2322         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2323           ptr -= 1;
2324           do {
2325             ptr += 1;
2326             auto str = _internal_add_event_type();
2327             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2328             CHK_(ptr);
2329             if (!ctx->DataAvailable(ptr)) break;
2330           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
2331         } else {
2332           goto handle_unusual;
2333         }
2334         continue;
2335       // optional string app_package_name = 2;
2336       case 2:
2337         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2338           auto str = _internal_mutable_app_package_name();
2339           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2340           CHK_(ptr);
2341         } else {
2342           goto handle_unusual;
2343         }
2344         continue;
2345       // optional string app_type = 3;
2346       case 3:
2347         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2348           auto str = _internal_mutable_app_type();
2349           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2350           CHK_(ptr);
2351         } else {
2352           goto handle_unusual;
2353         }
2354         continue;
2355       // optional string android_sdk_version = 4;
2356       case 4:
2357         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2358           auto str = _internal_mutable_android_sdk_version();
2359           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2360           CHK_(ptr);
2361         } else {
2362           goto handle_unusual;
2363         }
2364         continue;
2365       // optional string android_build_type = 5;
2366       case 5:
2367         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2368           auto str = _internal_mutable_android_build_type();
2369           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2370           CHK_(ptr);
2371         } else {
2372           goto handle_unusual;
2373         }
2374         continue;
2375       // optional bool trace_offcpu = 6;
2376       case 6:
2377         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2378           _Internal::set_has_trace_offcpu(&has_bits);
2379           _impl_.trace_offcpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2380           CHK_(ptr);
2381         } else {
2382           goto handle_unusual;
2383         }
2384         continue;
2385       default:
2386         goto handle_unusual;
2387     }  // switch
2388   handle_unusual:
2389     if ((tag == 0) || ((tag & 7) == 4)) {
2390       CHK_(ptr);
2391       ctx->SetLastTag(tag);
2392       goto message_done;
2393     }
2394     ptr = UnknownFieldParse(
2395         tag,
2396         _internal_metadata_.mutable_unknown_fields<std::string>(),
2397         ptr, ctx);
2398     CHK_(ptr != nullptr);
2399   }  // while
2400 message_done:
2401   _impl_._has_bits_.Or(has_bits);
2402   return ptr;
2403 failure:
2404   ptr = nullptr;
2405   goto message_done;
2406 #undef CHK_
2407 }
2408 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2409 ::uint8_t* MetaInfo::_InternalSerialize(
2410     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2411   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.MetaInfo)
2412   ::uint32_t cached_has_bits = 0;
2413   (void) cached_has_bits;
2414 
2415   // repeated string event_type = 1;
2416   for (int i = 0, n = this->_internal_event_type_size(); i < n; i++) {
2417     const auto& s = this->_internal_event_type(i);
2418     target = stream->WriteString(1, s, target);
2419   }
2420 
2421   cached_has_bits = _impl_._has_bits_[0];
2422   // optional string app_package_name = 2;
2423   if (cached_has_bits & 0x00000001u) {
2424     target = stream->WriteStringMaybeAliased(
2425         2, this->_internal_app_package_name(), target);
2426   }
2427 
2428   // optional string app_type = 3;
2429   if (cached_has_bits & 0x00000002u) {
2430     target = stream->WriteStringMaybeAliased(
2431         3, this->_internal_app_type(), target);
2432   }
2433 
2434   // optional string android_sdk_version = 4;
2435   if (cached_has_bits & 0x00000004u) {
2436     target = stream->WriteStringMaybeAliased(
2437         4, this->_internal_android_sdk_version(), target);
2438   }
2439 
2440   // optional string android_build_type = 5;
2441   if (cached_has_bits & 0x00000008u) {
2442     target = stream->WriteStringMaybeAliased(
2443         5, this->_internal_android_build_type(), target);
2444   }
2445 
2446   // optional bool trace_offcpu = 6;
2447   if (cached_has_bits & 0x00000010u) {
2448     target = stream->EnsureSpace(target);
2449     target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_trace_offcpu(), target);
2450   }
2451 
2452   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2453     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2454         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2455   }
2456   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.MetaInfo)
2457   return target;
2458 }
2459 
ByteSizeLong() const2460 size_t MetaInfo::ByteSizeLong() const {
2461 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.MetaInfo)
2462   size_t total_size = 0;
2463 
2464   ::uint32_t cached_has_bits = 0;
2465   // Prevent compiler warnings about cached_has_bits being unused
2466   (void) cached_has_bits;
2467 
2468   // repeated string event_type = 1;
2469   total_size += 1 *
2470       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.event_type_.size());
2471   for (int i = 0, n = _impl_.event_type_.size(); i < n; i++) {
2472     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2473       _impl_.event_type_.Get(i));
2474   }
2475 
2476   cached_has_bits = _impl_._has_bits_[0];
2477   if (cached_has_bits & 0x0000001fu) {
2478     // optional string app_package_name = 2;
2479     if (cached_has_bits & 0x00000001u) {
2480       total_size += 1 +
2481         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2482           this->_internal_app_package_name());
2483     }
2484 
2485     // optional string app_type = 3;
2486     if (cached_has_bits & 0x00000002u) {
2487       total_size += 1 +
2488         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2489           this->_internal_app_type());
2490     }
2491 
2492     // optional string android_sdk_version = 4;
2493     if (cached_has_bits & 0x00000004u) {
2494       total_size += 1 +
2495         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2496           this->_internal_android_sdk_version());
2497     }
2498 
2499     // optional string android_build_type = 5;
2500     if (cached_has_bits & 0x00000008u) {
2501       total_size += 1 +
2502         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2503           this->_internal_android_build_type());
2504     }
2505 
2506     // optional bool trace_offcpu = 6;
2507     if (cached_has_bits & 0x00000010u) {
2508       total_size += 1 + 1;
2509     }
2510 
2511   }
2512   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2513     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2514   }
2515   int cached_size = ::_pbi::ToCachedSize(total_size);
2516   SetCachedSize(cached_size);
2517   return total_size;
2518 }
2519 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2520 void MetaInfo::CheckTypeAndMergeFrom(
2521     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2522   MergeFrom(*::_pbi::DownCast<const MetaInfo*>(
2523       &from));
2524 }
2525 
MergeFrom(const MetaInfo & from)2526 void MetaInfo::MergeFrom(const MetaInfo& from) {
2527   MetaInfo* const _this = this;
2528   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.MetaInfo)
2529   GOOGLE_DCHECK_NE(&from, _this);
2530   ::uint32_t cached_has_bits = 0;
2531   (void) cached_has_bits;
2532 
2533   _this->_impl_.event_type_.MergeFrom(from._impl_.event_type_);
2534   cached_has_bits = from._impl_._has_bits_[0];
2535   if (cached_has_bits & 0x0000001fu) {
2536     if (cached_has_bits & 0x00000001u) {
2537       _this->_internal_set_app_package_name(from._internal_app_package_name());
2538     }
2539     if (cached_has_bits & 0x00000002u) {
2540       _this->_internal_set_app_type(from._internal_app_type());
2541     }
2542     if (cached_has_bits & 0x00000004u) {
2543       _this->_internal_set_android_sdk_version(from._internal_android_sdk_version());
2544     }
2545     if (cached_has_bits & 0x00000008u) {
2546       _this->_internal_set_android_build_type(from._internal_android_build_type());
2547     }
2548     if (cached_has_bits & 0x00000010u) {
2549       _this->_impl_.trace_offcpu_ = from._impl_.trace_offcpu_;
2550     }
2551     _this->_impl_._has_bits_[0] |= cached_has_bits;
2552   }
2553   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2554 }
2555 
CopyFrom(const MetaInfo & from)2556 void MetaInfo::CopyFrom(const MetaInfo& from) {
2557 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.MetaInfo)
2558   if (&from == this) return;
2559   Clear();
2560   MergeFrom(from);
2561 }
2562 
IsInitialized() const2563 bool MetaInfo::IsInitialized() const {
2564   return true;
2565 }
2566 
InternalSwap(MetaInfo * other)2567 void MetaInfo::InternalSwap(MetaInfo* other) {
2568   using std::swap;
2569   auto* lhs_arena = GetArenaForAllocation();
2570   auto* rhs_arena = other->GetArenaForAllocation();
2571   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2572   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2573   _impl_.event_type_.InternalSwap(&other->_impl_.event_type_);
2574   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2575       &_impl_.app_package_name_, lhs_arena,
2576       &other->_impl_.app_package_name_, rhs_arena
2577   );
2578   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2579       &_impl_.app_type_, lhs_arena,
2580       &other->_impl_.app_type_, rhs_arena
2581   );
2582   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2583       &_impl_.android_sdk_version_, lhs_arena,
2584       &other->_impl_.android_sdk_version_, rhs_arena
2585   );
2586   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2587       &_impl_.android_build_type_, lhs_arena,
2588       &other->_impl_.android_build_type_, rhs_arena
2589   );
2590   swap(_impl_.trace_offcpu_, other->_impl_.trace_offcpu_);
2591 }
2592 
GetTypeName() const2593 std::string MetaInfo::GetTypeName() const {
2594   return "simpleperf_report_proto.MetaInfo";
2595 }
2596 
2597 
2598 // ===================================================================
2599 
2600 class ContextSwitch::_Internal {
2601  public:
2602   using HasBits = decltype(std::declval<ContextSwitch>()._impl_._has_bits_);
set_has_switch_on(HasBits * has_bits)2603   static void set_has_switch_on(HasBits* has_bits) {
2604     (*has_bits)[0] |= 2u;
2605   }
set_has_time(HasBits * has_bits)2606   static void set_has_time(HasBits* has_bits) {
2607     (*has_bits)[0] |= 1u;
2608   }
set_has_thread_id(HasBits * has_bits)2609   static void set_has_thread_id(HasBits* has_bits) {
2610     (*has_bits)[0] |= 4u;
2611   }
2612 };
2613 
ContextSwitch(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2614 ContextSwitch::ContextSwitch(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2615                          bool is_message_owned)
2616   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2617   SharedCtor(arena, is_message_owned);
2618   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.ContextSwitch)
2619 }
ContextSwitch(const ContextSwitch & from)2620 ContextSwitch::ContextSwitch(const ContextSwitch& from)
2621   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2622   ContextSwitch* const _this = this; (void)_this;
2623   new (&_impl_) Impl_{
2624       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2625     , /*decltype(_impl_._cached_size_)*/{}
2626     , decltype(_impl_.time_){}
2627     , decltype(_impl_.switch_on_){}
2628     , decltype(_impl_.thread_id_){}};
2629 
2630   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2631   ::memcpy(&_impl_.time_, &from._impl_.time_,
2632     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.thread_id_) -
2633     reinterpret_cast<char*>(&_impl_.time_)) + sizeof(_impl_.thread_id_));
2634   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.ContextSwitch)
2635 }
2636 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2637 inline void ContextSwitch::SharedCtor(
2638     ::_pb::Arena* arena, bool is_message_owned) {
2639   (void)arena;
2640   (void)is_message_owned;
2641   new (&_impl_) Impl_{
2642       decltype(_impl_._has_bits_){}
2643     , /*decltype(_impl_._cached_size_)*/{}
2644     , decltype(_impl_.time_){::uint64_t{0u}}
2645     , decltype(_impl_.switch_on_){false}
2646     , decltype(_impl_.thread_id_){0u}
2647   };
2648 }
2649 
~ContextSwitch()2650 ContextSwitch::~ContextSwitch() {
2651   // @@protoc_insertion_point(destructor:simpleperf_report_proto.ContextSwitch)
2652   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2653   (void)arena;
2654     return;
2655   }
2656   SharedDtor();
2657 }
2658 
SharedDtor()2659 inline void ContextSwitch::SharedDtor() {
2660   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2661 }
2662 
SetCachedSize(int size) const2663 void ContextSwitch::SetCachedSize(int size) const {
2664   _impl_._cached_size_.Set(size);
2665 }
2666 
Clear()2667 void ContextSwitch::Clear() {
2668 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.ContextSwitch)
2669   ::uint32_t cached_has_bits = 0;
2670   // Prevent compiler warnings about cached_has_bits being unused
2671   (void) cached_has_bits;
2672 
2673   cached_has_bits = _impl_._has_bits_[0];
2674   if (cached_has_bits & 0x00000007u) {
2675     ::memset(&_impl_.time_, 0, static_cast<size_t>(
2676         reinterpret_cast<char*>(&_impl_.thread_id_) -
2677         reinterpret_cast<char*>(&_impl_.time_)) + sizeof(_impl_.thread_id_));
2678   }
2679   _impl_._has_bits_.Clear();
2680   _internal_metadata_.Clear<std::string>();
2681 }
2682 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2683 const char* ContextSwitch::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2684 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2685   _Internal::HasBits has_bits{};
2686   while (!ctx->Done(&ptr)) {
2687     ::uint32_t tag;
2688     ptr = ::_pbi::ReadTag(ptr, &tag);
2689     switch (tag >> 3) {
2690       // optional bool switch_on = 1;
2691       case 1:
2692         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2693           _Internal::set_has_switch_on(&has_bits);
2694           _impl_.switch_on_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2695           CHK_(ptr);
2696         } else {
2697           goto handle_unusual;
2698         }
2699         continue;
2700       // optional uint64 time = 2;
2701       case 2:
2702         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2703           _Internal::set_has_time(&has_bits);
2704           _impl_.time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2705           CHK_(ptr);
2706         } else {
2707           goto handle_unusual;
2708         }
2709         continue;
2710       // optional uint32 thread_id = 3;
2711       case 3:
2712         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2713           _Internal::set_has_thread_id(&has_bits);
2714           _impl_.thread_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2715           CHK_(ptr);
2716         } else {
2717           goto handle_unusual;
2718         }
2719         continue;
2720       default:
2721         goto handle_unusual;
2722     }  // switch
2723   handle_unusual:
2724     if ((tag == 0) || ((tag & 7) == 4)) {
2725       CHK_(ptr);
2726       ctx->SetLastTag(tag);
2727       goto message_done;
2728     }
2729     ptr = UnknownFieldParse(
2730         tag,
2731         _internal_metadata_.mutable_unknown_fields<std::string>(),
2732         ptr, ctx);
2733     CHK_(ptr != nullptr);
2734   }  // while
2735 message_done:
2736   _impl_._has_bits_.Or(has_bits);
2737   return ptr;
2738 failure:
2739   ptr = nullptr;
2740   goto message_done;
2741 #undef CHK_
2742 }
2743 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2744 ::uint8_t* ContextSwitch::_InternalSerialize(
2745     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2746   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.ContextSwitch)
2747   ::uint32_t cached_has_bits = 0;
2748   (void) cached_has_bits;
2749 
2750   cached_has_bits = _impl_._has_bits_[0];
2751   // optional bool switch_on = 1;
2752   if (cached_has_bits & 0x00000002u) {
2753     target = stream->EnsureSpace(target);
2754     target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_switch_on(), target);
2755   }
2756 
2757   // optional uint64 time = 2;
2758   if (cached_has_bits & 0x00000001u) {
2759     target = stream->EnsureSpace(target);
2760     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_time(), target);
2761   }
2762 
2763   // optional uint32 thread_id = 3;
2764   if (cached_has_bits & 0x00000004u) {
2765     target = stream->EnsureSpace(target);
2766     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_thread_id(), target);
2767   }
2768 
2769   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2770     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2771         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2772   }
2773   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.ContextSwitch)
2774   return target;
2775 }
2776 
ByteSizeLong() const2777 size_t ContextSwitch::ByteSizeLong() const {
2778 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.ContextSwitch)
2779   size_t total_size = 0;
2780 
2781   ::uint32_t cached_has_bits = 0;
2782   // Prevent compiler warnings about cached_has_bits being unused
2783   (void) cached_has_bits;
2784 
2785   cached_has_bits = _impl_._has_bits_[0];
2786   if (cached_has_bits & 0x00000007u) {
2787     // optional uint64 time = 2;
2788     if (cached_has_bits & 0x00000001u) {
2789       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_time());
2790     }
2791 
2792     // optional bool switch_on = 1;
2793     if (cached_has_bits & 0x00000002u) {
2794       total_size += 1 + 1;
2795     }
2796 
2797     // optional uint32 thread_id = 3;
2798     if (cached_has_bits & 0x00000004u) {
2799       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_thread_id());
2800     }
2801 
2802   }
2803   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2804     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2805   }
2806   int cached_size = ::_pbi::ToCachedSize(total_size);
2807   SetCachedSize(cached_size);
2808   return total_size;
2809 }
2810 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2811 void ContextSwitch::CheckTypeAndMergeFrom(
2812     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2813   MergeFrom(*::_pbi::DownCast<const ContextSwitch*>(
2814       &from));
2815 }
2816 
MergeFrom(const ContextSwitch & from)2817 void ContextSwitch::MergeFrom(const ContextSwitch& from) {
2818   ContextSwitch* const _this = this;
2819   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.ContextSwitch)
2820   GOOGLE_DCHECK_NE(&from, _this);
2821   ::uint32_t cached_has_bits = 0;
2822   (void) cached_has_bits;
2823 
2824   cached_has_bits = from._impl_._has_bits_[0];
2825   if (cached_has_bits & 0x00000007u) {
2826     if (cached_has_bits & 0x00000001u) {
2827       _this->_impl_.time_ = from._impl_.time_;
2828     }
2829     if (cached_has_bits & 0x00000002u) {
2830       _this->_impl_.switch_on_ = from._impl_.switch_on_;
2831     }
2832     if (cached_has_bits & 0x00000004u) {
2833       _this->_impl_.thread_id_ = from._impl_.thread_id_;
2834     }
2835     _this->_impl_._has_bits_[0] |= cached_has_bits;
2836   }
2837   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2838 }
2839 
CopyFrom(const ContextSwitch & from)2840 void ContextSwitch::CopyFrom(const ContextSwitch& from) {
2841 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.ContextSwitch)
2842   if (&from == this) return;
2843   Clear();
2844   MergeFrom(from);
2845 }
2846 
IsInitialized() const2847 bool ContextSwitch::IsInitialized() const {
2848   return true;
2849 }
2850 
InternalSwap(ContextSwitch * other)2851 void ContextSwitch::InternalSwap(ContextSwitch* other) {
2852   using std::swap;
2853   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2854   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2855   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2856       PROTOBUF_FIELD_OFFSET(ContextSwitch, _impl_.thread_id_)
2857       + sizeof(ContextSwitch::_impl_.thread_id_)  // NOLINT
2858       - PROTOBUF_FIELD_OFFSET(ContextSwitch, _impl_.time_)>(
2859           reinterpret_cast<char*>(&_impl_.time_),
2860           reinterpret_cast<char*>(&other->_impl_.time_));
2861 }
2862 
GetTypeName() const2863 std::string ContextSwitch::GetTypeName() const {
2864   return "simpleperf_report_proto.ContextSwitch";
2865 }
2866 
2867 
2868 // ===================================================================
2869 
2870 class Record::_Internal {
2871  public:
2872   static const ::simpleperf_report_proto::Sample& sample(const Record* msg);
2873   static const ::simpleperf_report_proto::LostSituation& lost(const Record* msg);
2874   static const ::simpleperf_report_proto::File& file(const Record* msg);
2875   static const ::simpleperf_report_proto::Thread& thread(const Record* msg);
2876   static const ::simpleperf_report_proto::MetaInfo& meta_info(const Record* msg);
2877   static const ::simpleperf_report_proto::ContextSwitch& context_switch(const Record* msg);
2878 };
2879 
2880 const ::simpleperf_report_proto::Sample&
sample(const Record * msg)2881 Record::_Internal::sample(const Record* msg) {
2882   return *msg->_impl_.record_data_.sample_;
2883 }
2884 const ::simpleperf_report_proto::LostSituation&
lost(const Record * msg)2885 Record::_Internal::lost(const Record* msg) {
2886   return *msg->_impl_.record_data_.lost_;
2887 }
2888 const ::simpleperf_report_proto::File&
file(const Record * msg)2889 Record::_Internal::file(const Record* msg) {
2890   return *msg->_impl_.record_data_.file_;
2891 }
2892 const ::simpleperf_report_proto::Thread&
thread(const Record * msg)2893 Record::_Internal::thread(const Record* msg) {
2894   return *msg->_impl_.record_data_.thread_;
2895 }
2896 const ::simpleperf_report_proto::MetaInfo&
meta_info(const Record * msg)2897 Record::_Internal::meta_info(const Record* msg) {
2898   return *msg->_impl_.record_data_.meta_info_;
2899 }
2900 const ::simpleperf_report_proto::ContextSwitch&
context_switch(const Record * msg)2901 Record::_Internal::context_switch(const Record* msg) {
2902   return *msg->_impl_.record_data_.context_switch_;
2903 }
set_allocated_sample(::simpleperf_report_proto::Sample * sample)2904 void Record::set_allocated_sample(::simpleperf_report_proto::Sample* sample) {
2905   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2906   clear_record_data();
2907   if (sample) {
2908     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2909       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(sample);
2910     if (message_arena != submessage_arena) {
2911       sample = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2912           message_arena, sample, submessage_arena);
2913     }
2914     set_has_sample();
2915     _impl_.record_data_.sample_ = sample;
2916   }
2917   // @@protoc_insertion_point(field_set_allocated:simpleperf_report_proto.Record.sample)
2918 }
set_allocated_lost(::simpleperf_report_proto::LostSituation * lost)2919 void Record::set_allocated_lost(::simpleperf_report_proto::LostSituation* lost) {
2920   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2921   clear_record_data();
2922   if (lost) {
2923     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2924       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(lost);
2925     if (message_arena != submessage_arena) {
2926       lost = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2927           message_arena, lost, submessage_arena);
2928     }
2929     set_has_lost();
2930     _impl_.record_data_.lost_ = lost;
2931   }
2932   // @@protoc_insertion_point(field_set_allocated:simpleperf_report_proto.Record.lost)
2933 }
set_allocated_file(::simpleperf_report_proto::File * file)2934 void Record::set_allocated_file(::simpleperf_report_proto::File* file) {
2935   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2936   clear_record_data();
2937   if (file) {
2938     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2939       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(file);
2940     if (message_arena != submessage_arena) {
2941       file = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2942           message_arena, file, submessage_arena);
2943     }
2944     set_has_file();
2945     _impl_.record_data_.file_ = file;
2946   }
2947   // @@protoc_insertion_point(field_set_allocated:simpleperf_report_proto.Record.file)
2948 }
set_allocated_thread(::simpleperf_report_proto::Thread * thread)2949 void Record::set_allocated_thread(::simpleperf_report_proto::Thread* thread) {
2950   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2951   clear_record_data();
2952   if (thread) {
2953     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2954       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(thread);
2955     if (message_arena != submessage_arena) {
2956       thread = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2957           message_arena, thread, submessage_arena);
2958     }
2959     set_has_thread();
2960     _impl_.record_data_.thread_ = thread;
2961   }
2962   // @@protoc_insertion_point(field_set_allocated:simpleperf_report_proto.Record.thread)
2963 }
set_allocated_meta_info(::simpleperf_report_proto::MetaInfo * meta_info)2964 void Record::set_allocated_meta_info(::simpleperf_report_proto::MetaInfo* meta_info) {
2965   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2966   clear_record_data();
2967   if (meta_info) {
2968     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2969       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(meta_info);
2970     if (message_arena != submessage_arena) {
2971       meta_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2972           message_arena, meta_info, submessage_arena);
2973     }
2974     set_has_meta_info();
2975     _impl_.record_data_.meta_info_ = meta_info;
2976   }
2977   // @@protoc_insertion_point(field_set_allocated:simpleperf_report_proto.Record.meta_info)
2978 }
set_allocated_context_switch(::simpleperf_report_proto::ContextSwitch * context_switch)2979 void Record::set_allocated_context_switch(::simpleperf_report_proto::ContextSwitch* context_switch) {
2980   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2981   clear_record_data();
2982   if (context_switch) {
2983     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2984       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context_switch);
2985     if (message_arena != submessage_arena) {
2986       context_switch = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2987           message_arena, context_switch, submessage_arena);
2988     }
2989     set_has_context_switch();
2990     _impl_.record_data_.context_switch_ = context_switch;
2991   }
2992   // @@protoc_insertion_point(field_set_allocated:simpleperf_report_proto.Record.context_switch)
2993 }
Record(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2994 Record::Record(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2995                          bool is_message_owned)
2996   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2997   SharedCtor(arena, is_message_owned);
2998   // @@protoc_insertion_point(arena_constructor:simpleperf_report_proto.Record)
2999 }
Record(const Record & from)3000 Record::Record(const Record& from)
3001   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3002   Record* const _this = this; (void)_this;
3003   new (&_impl_) Impl_{
3004       decltype(_impl_.record_data_){}
3005     , /*decltype(_impl_._cached_size_)*/{}
3006     , /*decltype(_impl_._oneof_case_)*/{}};
3007 
3008   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3009   clear_has_record_data();
3010   switch (from.record_data_case()) {
3011     case kSample: {
3012       _this->_internal_mutable_sample()->::simpleperf_report_proto::Sample::MergeFrom(
3013           from._internal_sample());
3014       break;
3015     }
3016     case kLost: {
3017       _this->_internal_mutable_lost()->::simpleperf_report_proto::LostSituation::MergeFrom(
3018           from._internal_lost());
3019       break;
3020     }
3021     case kFile: {
3022       _this->_internal_mutable_file()->::simpleperf_report_proto::File::MergeFrom(
3023           from._internal_file());
3024       break;
3025     }
3026     case kThread: {
3027       _this->_internal_mutable_thread()->::simpleperf_report_proto::Thread::MergeFrom(
3028           from._internal_thread());
3029       break;
3030     }
3031     case kMetaInfo: {
3032       _this->_internal_mutable_meta_info()->::simpleperf_report_proto::MetaInfo::MergeFrom(
3033           from._internal_meta_info());
3034       break;
3035     }
3036     case kContextSwitch: {
3037       _this->_internal_mutable_context_switch()->::simpleperf_report_proto::ContextSwitch::MergeFrom(
3038           from._internal_context_switch());
3039       break;
3040     }
3041     case RECORD_DATA_NOT_SET: {
3042       break;
3043     }
3044   }
3045   // @@protoc_insertion_point(copy_constructor:simpleperf_report_proto.Record)
3046 }
3047 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3048 inline void Record::SharedCtor(
3049     ::_pb::Arena* arena, bool is_message_owned) {
3050   (void)arena;
3051   (void)is_message_owned;
3052   new (&_impl_) Impl_{
3053       decltype(_impl_.record_data_){}
3054     , /*decltype(_impl_._cached_size_)*/{}
3055     , /*decltype(_impl_._oneof_case_)*/{}
3056   };
3057   clear_has_record_data();
3058 }
3059 
~Record()3060 Record::~Record() {
3061   // @@protoc_insertion_point(destructor:simpleperf_report_proto.Record)
3062   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3063   (void)arena;
3064     return;
3065   }
3066   SharedDtor();
3067 }
3068 
SharedDtor()3069 inline void Record::SharedDtor() {
3070   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3071   if (has_record_data()) {
3072     clear_record_data();
3073   }
3074 }
3075 
SetCachedSize(int size) const3076 void Record::SetCachedSize(int size) const {
3077   _impl_._cached_size_.Set(size);
3078 }
3079 
clear_record_data()3080 void Record::clear_record_data() {
3081 // @@protoc_insertion_point(one_of_clear_start:simpleperf_report_proto.Record)
3082   switch (record_data_case()) {
3083     case kSample: {
3084       if (GetArenaForAllocation() == nullptr) {
3085         delete _impl_.record_data_.sample_;
3086       }
3087       break;
3088     }
3089     case kLost: {
3090       if (GetArenaForAllocation() == nullptr) {
3091         delete _impl_.record_data_.lost_;
3092       }
3093       break;
3094     }
3095     case kFile: {
3096       if (GetArenaForAllocation() == nullptr) {
3097         delete _impl_.record_data_.file_;
3098       }
3099       break;
3100     }
3101     case kThread: {
3102       if (GetArenaForAllocation() == nullptr) {
3103         delete _impl_.record_data_.thread_;
3104       }
3105       break;
3106     }
3107     case kMetaInfo: {
3108       if (GetArenaForAllocation() == nullptr) {
3109         delete _impl_.record_data_.meta_info_;
3110       }
3111       break;
3112     }
3113     case kContextSwitch: {
3114       if (GetArenaForAllocation() == nullptr) {
3115         delete _impl_.record_data_.context_switch_;
3116       }
3117       break;
3118     }
3119     case RECORD_DATA_NOT_SET: {
3120       break;
3121     }
3122   }
3123   _impl_._oneof_case_[0] = RECORD_DATA_NOT_SET;
3124 }
3125 
3126 
Clear()3127 void Record::Clear() {
3128 // @@protoc_insertion_point(message_clear_start:simpleperf_report_proto.Record)
3129   ::uint32_t cached_has_bits = 0;
3130   // Prevent compiler warnings about cached_has_bits being unused
3131   (void) cached_has_bits;
3132 
3133   clear_record_data();
3134   _internal_metadata_.Clear<std::string>();
3135 }
3136 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3137 const char* Record::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3138 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3139   while (!ctx->Done(&ptr)) {
3140     ::uint32_t tag;
3141     ptr = ::_pbi::ReadTag(ptr, &tag);
3142     switch (tag >> 3) {
3143       // .simpleperf_report_proto.Sample sample = 1;
3144       case 1:
3145         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3146           ptr = ctx->ParseMessage(_internal_mutable_sample(), ptr);
3147           CHK_(ptr);
3148         } else {
3149           goto handle_unusual;
3150         }
3151         continue;
3152       // .simpleperf_report_proto.LostSituation lost = 2;
3153       case 2:
3154         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3155           ptr = ctx->ParseMessage(_internal_mutable_lost(), ptr);
3156           CHK_(ptr);
3157         } else {
3158           goto handle_unusual;
3159         }
3160         continue;
3161       // .simpleperf_report_proto.File file = 3;
3162       case 3:
3163         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
3164           ptr = ctx->ParseMessage(_internal_mutable_file(), ptr);
3165           CHK_(ptr);
3166         } else {
3167           goto handle_unusual;
3168         }
3169         continue;
3170       // .simpleperf_report_proto.Thread thread = 4;
3171       case 4:
3172         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
3173           ptr = ctx->ParseMessage(_internal_mutable_thread(), ptr);
3174           CHK_(ptr);
3175         } else {
3176           goto handle_unusual;
3177         }
3178         continue;
3179       // .simpleperf_report_proto.MetaInfo meta_info = 5;
3180       case 5:
3181         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
3182           ptr = ctx->ParseMessage(_internal_mutable_meta_info(), ptr);
3183           CHK_(ptr);
3184         } else {
3185           goto handle_unusual;
3186         }
3187         continue;
3188       // .simpleperf_report_proto.ContextSwitch context_switch = 6;
3189       case 6:
3190         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
3191           ptr = ctx->ParseMessage(_internal_mutable_context_switch(), ptr);
3192           CHK_(ptr);
3193         } else {
3194           goto handle_unusual;
3195         }
3196         continue;
3197       default:
3198         goto handle_unusual;
3199     }  // switch
3200   handle_unusual:
3201     if ((tag == 0) || ((tag & 7) == 4)) {
3202       CHK_(ptr);
3203       ctx->SetLastTag(tag);
3204       goto message_done;
3205     }
3206     ptr = UnknownFieldParse(
3207         tag,
3208         _internal_metadata_.mutable_unknown_fields<std::string>(),
3209         ptr, ctx);
3210     CHK_(ptr != nullptr);
3211   }  // while
3212 message_done:
3213   return ptr;
3214 failure:
3215   ptr = nullptr;
3216   goto message_done;
3217 #undef CHK_
3218 }
3219 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3220 ::uint8_t* Record::_InternalSerialize(
3221     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3222   // @@protoc_insertion_point(serialize_to_array_start:simpleperf_report_proto.Record)
3223   ::uint32_t cached_has_bits = 0;
3224   (void) cached_has_bits;
3225 
3226   switch (record_data_case()) {
3227     case kSample: {
3228       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3229         InternalWriteMessage(1, _Internal::sample(this),
3230           _Internal::sample(this).GetCachedSize(), target, stream);
3231       break;
3232     }
3233     case kLost: {
3234       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3235         InternalWriteMessage(2, _Internal::lost(this),
3236           _Internal::lost(this).GetCachedSize(), target, stream);
3237       break;
3238     }
3239     case kFile: {
3240       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3241         InternalWriteMessage(3, _Internal::file(this),
3242           _Internal::file(this).GetCachedSize(), target, stream);
3243       break;
3244     }
3245     case kThread: {
3246       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3247         InternalWriteMessage(4, _Internal::thread(this),
3248           _Internal::thread(this).GetCachedSize(), target, stream);
3249       break;
3250     }
3251     case kMetaInfo: {
3252       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3253         InternalWriteMessage(5, _Internal::meta_info(this),
3254           _Internal::meta_info(this).GetCachedSize(), target, stream);
3255       break;
3256     }
3257     case kContextSwitch: {
3258       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3259         InternalWriteMessage(6, _Internal::context_switch(this),
3260           _Internal::context_switch(this).GetCachedSize(), target, stream);
3261       break;
3262     }
3263     default: ;
3264   }
3265   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3266     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3267         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3268   }
3269   // @@protoc_insertion_point(serialize_to_array_end:simpleperf_report_proto.Record)
3270   return target;
3271 }
3272 
ByteSizeLong() const3273 size_t Record::ByteSizeLong() const {
3274 // @@protoc_insertion_point(message_byte_size_start:simpleperf_report_proto.Record)
3275   size_t total_size = 0;
3276 
3277   switch (record_data_case()) {
3278     // .simpleperf_report_proto.Sample sample = 1;
3279     case kSample: {
3280       total_size += 1 +
3281         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3282           *_impl_.record_data_.sample_);
3283       break;
3284     }
3285     // .simpleperf_report_proto.LostSituation lost = 2;
3286     case kLost: {
3287       total_size += 1 +
3288         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3289           *_impl_.record_data_.lost_);
3290       break;
3291     }
3292     // .simpleperf_report_proto.File file = 3;
3293     case kFile: {
3294       total_size += 1 +
3295         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3296           *_impl_.record_data_.file_);
3297       break;
3298     }
3299     // .simpleperf_report_proto.Thread thread = 4;
3300     case kThread: {
3301       total_size += 1 +
3302         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3303           *_impl_.record_data_.thread_);
3304       break;
3305     }
3306     // .simpleperf_report_proto.MetaInfo meta_info = 5;
3307     case kMetaInfo: {
3308       total_size += 1 +
3309         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3310           *_impl_.record_data_.meta_info_);
3311       break;
3312     }
3313     // .simpleperf_report_proto.ContextSwitch context_switch = 6;
3314     case kContextSwitch: {
3315       total_size += 1 +
3316         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3317           *_impl_.record_data_.context_switch_);
3318       break;
3319     }
3320     case RECORD_DATA_NOT_SET: {
3321       break;
3322     }
3323   }
3324   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3325     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3326   }
3327   int cached_size = ::_pbi::ToCachedSize(total_size);
3328   SetCachedSize(cached_size);
3329   return total_size;
3330 }
3331 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3332 void Record::CheckTypeAndMergeFrom(
3333     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3334   MergeFrom(*::_pbi::DownCast<const Record*>(
3335       &from));
3336 }
3337 
MergeFrom(const Record & from)3338 void Record::MergeFrom(const Record& from) {
3339   Record* const _this = this;
3340   // @@protoc_insertion_point(class_specific_merge_from_start:simpleperf_report_proto.Record)
3341   GOOGLE_DCHECK_NE(&from, _this);
3342   ::uint32_t cached_has_bits = 0;
3343   (void) cached_has_bits;
3344 
3345   switch (from.record_data_case()) {
3346     case kSample: {
3347       _this->_internal_mutable_sample()->::simpleperf_report_proto::Sample::MergeFrom(
3348           from._internal_sample());
3349       break;
3350     }
3351     case kLost: {
3352       _this->_internal_mutable_lost()->::simpleperf_report_proto::LostSituation::MergeFrom(
3353           from._internal_lost());
3354       break;
3355     }
3356     case kFile: {
3357       _this->_internal_mutable_file()->::simpleperf_report_proto::File::MergeFrom(
3358           from._internal_file());
3359       break;
3360     }
3361     case kThread: {
3362       _this->_internal_mutable_thread()->::simpleperf_report_proto::Thread::MergeFrom(
3363           from._internal_thread());
3364       break;
3365     }
3366     case kMetaInfo: {
3367       _this->_internal_mutable_meta_info()->::simpleperf_report_proto::MetaInfo::MergeFrom(
3368           from._internal_meta_info());
3369       break;
3370     }
3371     case kContextSwitch: {
3372       _this->_internal_mutable_context_switch()->::simpleperf_report_proto::ContextSwitch::MergeFrom(
3373           from._internal_context_switch());
3374       break;
3375     }
3376     case RECORD_DATA_NOT_SET: {
3377       break;
3378     }
3379   }
3380   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3381 }
3382 
CopyFrom(const Record & from)3383 void Record::CopyFrom(const Record& from) {
3384 // @@protoc_insertion_point(class_specific_copy_from_start:simpleperf_report_proto.Record)
3385   if (&from == this) return;
3386   Clear();
3387   MergeFrom(from);
3388 }
3389 
IsInitialized() const3390 bool Record::IsInitialized() const {
3391   return true;
3392 }
3393 
InternalSwap(Record * other)3394 void Record::InternalSwap(Record* other) {
3395   using std::swap;
3396   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3397   swap(_impl_.record_data_, other->_impl_.record_data_);
3398   swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
3399 }
3400 
GetTypeName() const3401 std::string Record::GetTypeName() const {
3402   return "simpleperf_report_proto.Record";
3403 }
3404 
3405 
3406 // @@protoc_insertion_point(namespace_scope)
3407 }  // namespace simpleperf_report_proto
3408 PROTOBUF_NAMESPACE_OPEN
3409 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::Sample_CallChainEntry*
CreateMaybeMessage(Arena * arena)3410 Arena::CreateMaybeMessage< ::simpleperf_report_proto::Sample_CallChainEntry >(Arena* arena) {
3411   return Arena::CreateMessageInternal< ::simpleperf_report_proto::Sample_CallChainEntry >(arena);
3412 }
3413 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::Sample_UnwindingResult*
CreateMaybeMessage(Arena * arena)3414 Arena::CreateMaybeMessage< ::simpleperf_report_proto::Sample_UnwindingResult >(Arena* arena) {
3415   return Arena::CreateMessageInternal< ::simpleperf_report_proto::Sample_UnwindingResult >(arena);
3416 }
3417 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::Sample*
CreateMaybeMessage(Arena * arena)3418 Arena::CreateMaybeMessage< ::simpleperf_report_proto::Sample >(Arena* arena) {
3419   return Arena::CreateMessageInternal< ::simpleperf_report_proto::Sample >(arena);
3420 }
3421 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::LostSituation*
CreateMaybeMessage(Arena * arena)3422 Arena::CreateMaybeMessage< ::simpleperf_report_proto::LostSituation >(Arena* arena) {
3423   return Arena::CreateMessageInternal< ::simpleperf_report_proto::LostSituation >(arena);
3424 }
3425 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::File*
CreateMaybeMessage(Arena * arena)3426 Arena::CreateMaybeMessage< ::simpleperf_report_proto::File >(Arena* arena) {
3427   return Arena::CreateMessageInternal< ::simpleperf_report_proto::File >(arena);
3428 }
3429 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::Thread*
CreateMaybeMessage(Arena * arena)3430 Arena::CreateMaybeMessage< ::simpleperf_report_proto::Thread >(Arena* arena) {
3431   return Arena::CreateMessageInternal< ::simpleperf_report_proto::Thread >(arena);
3432 }
3433 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::MetaInfo*
CreateMaybeMessage(Arena * arena)3434 Arena::CreateMaybeMessage< ::simpleperf_report_proto::MetaInfo >(Arena* arena) {
3435   return Arena::CreateMessageInternal< ::simpleperf_report_proto::MetaInfo >(arena);
3436 }
3437 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::ContextSwitch*
CreateMaybeMessage(Arena * arena)3438 Arena::CreateMaybeMessage< ::simpleperf_report_proto::ContextSwitch >(Arena* arena) {
3439   return Arena::CreateMessageInternal< ::simpleperf_report_proto::ContextSwitch >(arena);
3440 }
3441 template<> PROTOBUF_NOINLINE ::simpleperf_report_proto::Record*
CreateMaybeMessage(Arena * arena)3442 Arena::CreateMaybeMessage< ::simpleperf_report_proto::Record >(Arena* arena) {
3443   return Arena::CreateMessageInternal< ::simpleperf_report_proto::Record >(arena);
3444 }
3445 PROTOBUF_NAMESPACE_CLOSE
3446 
3447 // @@protoc_insertion_point(global_scope)
3448 #include <google/protobuf/port_undef.inc>
3449