1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/ftrace_event_bundle.proto
3 
4 #include "protos/perfetto/trace/ftrace/ftrace_event_bundle.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace perfetto {
22 namespace protos {
FtraceEventBundle_CompactSched(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR FtraceEventBundle_CompactSched::FtraceEventBundle_CompactSched(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_.switch_timestamp_)*/{}
26   , /*decltype(_impl_._switch_timestamp_cached_byte_size_)*/{0}
27   , /*decltype(_impl_.switch_prev_state_)*/{}
28   , /*decltype(_impl_._switch_prev_state_cached_byte_size_)*/{0}
29   , /*decltype(_impl_.switch_next_pid_)*/{}
30   , /*decltype(_impl_._switch_next_pid_cached_byte_size_)*/{0}
31   , /*decltype(_impl_.switch_next_prio_)*/{}
32   , /*decltype(_impl_._switch_next_prio_cached_byte_size_)*/{0}
33   , /*decltype(_impl_.intern_table_)*/{}
34   , /*decltype(_impl_.switch_next_comm_index_)*/{}
35   , /*decltype(_impl_._switch_next_comm_index_cached_byte_size_)*/{0}
36   , /*decltype(_impl_.waking_timestamp_)*/{}
37   , /*decltype(_impl_._waking_timestamp_cached_byte_size_)*/{0}
38   , /*decltype(_impl_.waking_pid_)*/{}
39   , /*decltype(_impl_._waking_pid_cached_byte_size_)*/{0}
40   , /*decltype(_impl_.waking_target_cpu_)*/{}
41   , /*decltype(_impl_._waking_target_cpu_cached_byte_size_)*/{0}
42   , /*decltype(_impl_.waking_prio_)*/{}
43   , /*decltype(_impl_._waking_prio_cached_byte_size_)*/{0}
44   , /*decltype(_impl_.waking_comm_index_)*/{}
45   , /*decltype(_impl_._waking_comm_index_cached_byte_size_)*/{0}
46   , /*decltype(_impl_.waking_common_flags_)*/{}
47   , /*decltype(_impl_._waking_common_flags_cached_byte_size_)*/{0}
48   , /*decltype(_impl_._cached_size_)*/{}} {}
49 struct FtraceEventBundle_CompactSchedDefaultTypeInternal {
FtraceEventBundle_CompactSchedDefaultTypeInternalperfetto::protos::FtraceEventBundle_CompactSchedDefaultTypeInternal50   PROTOBUF_CONSTEXPR FtraceEventBundle_CompactSchedDefaultTypeInternal()
51       : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceEventBundle_CompactSchedDefaultTypeInternalperfetto::protos::FtraceEventBundle_CompactSchedDefaultTypeInternal52   ~FtraceEventBundle_CompactSchedDefaultTypeInternal() {}
53   union {  // NOLINT(misc-non-private-member-variables-in-classes)
54     FtraceEventBundle_CompactSched _instance;
55   };
56 };
57 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceEventBundle_CompactSchedDefaultTypeInternal _FtraceEventBundle_CompactSched_default_instance_;
FtraceEventBundle_FtraceError(::_pbi::ConstantInitialized)58 PROTOBUF_CONSTEXPR FtraceEventBundle_FtraceError::FtraceEventBundle_FtraceError(
59     ::_pbi::ConstantInitialized): _impl_{
60     /*decltype(_impl_._has_bits_)*/{}
61   , /*decltype(_impl_._cached_size_)*/{}
62   , /*decltype(_impl_.timestamp_)*/::uint64_t{0u}
63   , /*decltype(_impl_.status_)*/0} {}
64 struct FtraceEventBundle_FtraceErrorDefaultTypeInternal {
FtraceEventBundle_FtraceErrorDefaultTypeInternalperfetto::protos::FtraceEventBundle_FtraceErrorDefaultTypeInternal65   PROTOBUF_CONSTEXPR FtraceEventBundle_FtraceErrorDefaultTypeInternal()
66       : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceEventBundle_FtraceErrorDefaultTypeInternalperfetto::protos::FtraceEventBundle_FtraceErrorDefaultTypeInternal67   ~FtraceEventBundle_FtraceErrorDefaultTypeInternal() {}
68   union {  // NOLINT(misc-non-private-member-variables-in-classes)
69     FtraceEventBundle_FtraceError _instance;
70   };
71 };
72 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceEventBundle_FtraceErrorDefaultTypeInternal _FtraceEventBundle_FtraceError_default_instance_;
FtraceEventBundle(::_pbi::ConstantInitialized)73 PROTOBUF_CONSTEXPR FtraceEventBundle::FtraceEventBundle(
74     ::_pbi::ConstantInitialized): _impl_{
75     /*decltype(_impl_._has_bits_)*/{}
76   , /*decltype(_impl_._cached_size_)*/{}
77   , /*decltype(_impl_.event_)*/{}
78   , /*decltype(_impl_.error_)*/{}
79   , /*decltype(_impl_.compact_sched_)*/nullptr
80   , /*decltype(_impl_.cpu_)*/0u
81   , /*decltype(_impl_.lost_events_)*/false
82   , /*decltype(_impl_.ftrace_timestamp_)*/::int64_t{0}
83   , /*decltype(_impl_.boot_timestamp_)*/::int64_t{0}
84   , /*decltype(_impl_.last_read_event_timestamp_)*/::uint64_t{0u}
85   , /*decltype(_impl_.previous_bundle_end_timestamp_)*/::uint64_t{0u}
86   , /*decltype(_impl_.ftrace_clock_)*/0} {}
87 struct FtraceEventBundleDefaultTypeInternal {
FtraceEventBundleDefaultTypeInternalperfetto::protos::FtraceEventBundleDefaultTypeInternal88   PROTOBUF_CONSTEXPR FtraceEventBundleDefaultTypeInternal()
89       : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceEventBundleDefaultTypeInternalperfetto::protos::FtraceEventBundleDefaultTypeInternal90   ~FtraceEventBundleDefaultTypeInternal() {}
91   union {  // NOLINT(misc-non-private-member-variables-in-classes)
92     FtraceEventBundle _instance;
93   };
94 };
95 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceEventBundleDefaultTypeInternal _FtraceEventBundle_default_instance_;
96 }  // namespace protos
97 }  // namespace perfetto
98 namespace perfetto {
99 namespace protos {
FtraceClock_IsValid(int value)100 bool FtraceClock_IsValid(int value) {
101   switch (value) {
102     case 0:
103     case 1:
104     case 2:
105     case 3:
106     case 4:
107       return true;
108     default:
109       return false;
110   }
111 }
112 
113 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FtraceClock_strings[5] = {};
114 
115 static const char FtraceClock_names[] =
116   "FTRACE_CLOCK_GLOBAL"
117   "FTRACE_CLOCK_LOCAL"
118   "FTRACE_CLOCK_MONO_RAW"
119   "FTRACE_CLOCK_UNKNOWN"
120   "FTRACE_CLOCK_UNSPECIFIED";
121 
122 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FtraceClock_entries[] = {
123   { {FtraceClock_names + 0, 19}, 2 },
124   { {FtraceClock_names + 19, 18}, 3 },
125   { {FtraceClock_names + 37, 21}, 4 },
126   { {FtraceClock_names + 58, 20}, 1 },
127   { {FtraceClock_names + 78, 24}, 0 },
128 };
129 
130 static const int FtraceClock_entries_by_number[] = {
131   4, // 0 -> FTRACE_CLOCK_UNSPECIFIED
132   3, // 1 -> FTRACE_CLOCK_UNKNOWN
133   0, // 2 -> FTRACE_CLOCK_GLOBAL
134   1, // 3 -> FTRACE_CLOCK_LOCAL
135   2, // 4 -> FTRACE_CLOCK_MONO_RAW
136 };
137 
FtraceClock_Name(FtraceClock value)138 const std::string& FtraceClock_Name(
139     FtraceClock value) {
140   static const bool dummy =
141       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
142           FtraceClock_entries,
143           FtraceClock_entries_by_number,
144           5, FtraceClock_strings);
145   (void) dummy;
146   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
147       FtraceClock_entries,
148       FtraceClock_entries_by_number,
149       5, value);
150   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
151                      FtraceClock_strings[idx].get();
152 }
FtraceClock_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FtraceClock * value)153 bool FtraceClock_Parse(
154     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FtraceClock* value) {
155   int int_value;
156   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
157       FtraceClock_entries, 5, name, &int_value);
158   if (success) {
159     *value = static_cast<FtraceClock>(int_value);
160   }
161   return success;
162 }
163 
164 // ===================================================================
165 
166 class FtraceEventBundle_CompactSched::_Internal {
167  public:
168 };
169 
FtraceEventBundle_CompactSched(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)170 FtraceEventBundle_CompactSched::FtraceEventBundle_CompactSched(::PROTOBUF_NAMESPACE_ID::Arena* arena,
171                          bool is_message_owned)
172   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
173   SharedCtor(arena, is_message_owned);
174   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceEventBundle.CompactSched)
175 }
FtraceEventBundle_CompactSched(const FtraceEventBundle_CompactSched & from)176 FtraceEventBundle_CompactSched::FtraceEventBundle_CompactSched(const FtraceEventBundle_CompactSched& from)
177   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
178   FtraceEventBundle_CompactSched* const _this = this; (void)_this;
179   new (&_impl_) Impl_{
180       decltype(_impl_.switch_timestamp_){from._impl_.switch_timestamp_}
181     , /*decltype(_impl_._switch_timestamp_cached_byte_size_)*/{0}
182     , decltype(_impl_.switch_prev_state_){from._impl_.switch_prev_state_}
183     , /*decltype(_impl_._switch_prev_state_cached_byte_size_)*/{0}
184     , decltype(_impl_.switch_next_pid_){from._impl_.switch_next_pid_}
185     , /*decltype(_impl_._switch_next_pid_cached_byte_size_)*/{0}
186     , decltype(_impl_.switch_next_prio_){from._impl_.switch_next_prio_}
187     , /*decltype(_impl_._switch_next_prio_cached_byte_size_)*/{0}
188     , decltype(_impl_.intern_table_){from._impl_.intern_table_}
189     , decltype(_impl_.switch_next_comm_index_){from._impl_.switch_next_comm_index_}
190     , /*decltype(_impl_._switch_next_comm_index_cached_byte_size_)*/{0}
191     , decltype(_impl_.waking_timestamp_){from._impl_.waking_timestamp_}
192     , /*decltype(_impl_._waking_timestamp_cached_byte_size_)*/{0}
193     , decltype(_impl_.waking_pid_){from._impl_.waking_pid_}
194     , /*decltype(_impl_._waking_pid_cached_byte_size_)*/{0}
195     , decltype(_impl_.waking_target_cpu_){from._impl_.waking_target_cpu_}
196     , /*decltype(_impl_._waking_target_cpu_cached_byte_size_)*/{0}
197     , decltype(_impl_.waking_prio_){from._impl_.waking_prio_}
198     , /*decltype(_impl_._waking_prio_cached_byte_size_)*/{0}
199     , decltype(_impl_.waking_comm_index_){from._impl_.waking_comm_index_}
200     , /*decltype(_impl_._waking_comm_index_cached_byte_size_)*/{0}
201     , decltype(_impl_.waking_common_flags_){from._impl_.waking_common_flags_}
202     , /*decltype(_impl_._waking_common_flags_cached_byte_size_)*/{0}
203     , /*decltype(_impl_._cached_size_)*/{}};
204 
205   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
206   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceEventBundle.CompactSched)
207 }
208 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)209 inline void FtraceEventBundle_CompactSched::SharedCtor(
210     ::_pb::Arena* arena, bool is_message_owned) {
211   (void)arena;
212   (void)is_message_owned;
213   new (&_impl_) Impl_{
214       decltype(_impl_.switch_timestamp_){arena}
215     , /*decltype(_impl_._switch_timestamp_cached_byte_size_)*/{0}
216     , decltype(_impl_.switch_prev_state_){arena}
217     , /*decltype(_impl_._switch_prev_state_cached_byte_size_)*/{0}
218     , decltype(_impl_.switch_next_pid_){arena}
219     , /*decltype(_impl_._switch_next_pid_cached_byte_size_)*/{0}
220     , decltype(_impl_.switch_next_prio_){arena}
221     , /*decltype(_impl_._switch_next_prio_cached_byte_size_)*/{0}
222     , decltype(_impl_.intern_table_){arena}
223     , decltype(_impl_.switch_next_comm_index_){arena}
224     , /*decltype(_impl_._switch_next_comm_index_cached_byte_size_)*/{0}
225     , decltype(_impl_.waking_timestamp_){arena}
226     , /*decltype(_impl_._waking_timestamp_cached_byte_size_)*/{0}
227     , decltype(_impl_.waking_pid_){arena}
228     , /*decltype(_impl_._waking_pid_cached_byte_size_)*/{0}
229     , decltype(_impl_.waking_target_cpu_){arena}
230     , /*decltype(_impl_._waking_target_cpu_cached_byte_size_)*/{0}
231     , decltype(_impl_.waking_prio_){arena}
232     , /*decltype(_impl_._waking_prio_cached_byte_size_)*/{0}
233     , decltype(_impl_.waking_comm_index_){arena}
234     , /*decltype(_impl_._waking_comm_index_cached_byte_size_)*/{0}
235     , decltype(_impl_.waking_common_flags_){arena}
236     , /*decltype(_impl_._waking_common_flags_cached_byte_size_)*/{0}
237     , /*decltype(_impl_._cached_size_)*/{}
238   };
239 }
240 
~FtraceEventBundle_CompactSched()241 FtraceEventBundle_CompactSched::~FtraceEventBundle_CompactSched() {
242   // @@protoc_insertion_point(destructor:perfetto.protos.FtraceEventBundle.CompactSched)
243   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
244   (void)arena;
245     return;
246   }
247   SharedDtor();
248 }
249 
SharedDtor()250 inline void FtraceEventBundle_CompactSched::SharedDtor() {
251   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
252   _impl_.switch_timestamp_.~RepeatedField();
253   _impl_.switch_prev_state_.~RepeatedField();
254   _impl_.switch_next_pid_.~RepeatedField();
255   _impl_.switch_next_prio_.~RepeatedField();
256   _impl_.intern_table_.~RepeatedPtrField();
257   _impl_.switch_next_comm_index_.~RepeatedField();
258   _impl_.waking_timestamp_.~RepeatedField();
259   _impl_.waking_pid_.~RepeatedField();
260   _impl_.waking_target_cpu_.~RepeatedField();
261   _impl_.waking_prio_.~RepeatedField();
262   _impl_.waking_comm_index_.~RepeatedField();
263   _impl_.waking_common_flags_.~RepeatedField();
264 }
265 
SetCachedSize(int size) const266 void FtraceEventBundle_CompactSched::SetCachedSize(int size) const {
267   _impl_._cached_size_.Set(size);
268 }
269 
Clear()270 void FtraceEventBundle_CompactSched::Clear() {
271 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceEventBundle.CompactSched)
272   ::uint32_t cached_has_bits = 0;
273   // Prevent compiler warnings about cached_has_bits being unused
274   (void) cached_has_bits;
275 
276   _impl_.switch_timestamp_.Clear();
277   _impl_.switch_prev_state_.Clear();
278   _impl_.switch_next_pid_.Clear();
279   _impl_.switch_next_prio_.Clear();
280   _impl_.intern_table_.Clear();
281   _impl_.switch_next_comm_index_.Clear();
282   _impl_.waking_timestamp_.Clear();
283   _impl_.waking_pid_.Clear();
284   _impl_.waking_target_cpu_.Clear();
285   _impl_.waking_prio_.Clear();
286   _impl_.waking_comm_index_.Clear();
287   _impl_.waking_common_flags_.Clear();
288   _internal_metadata_.Clear<std::string>();
289 }
290 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)291 const char* FtraceEventBundle_CompactSched::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
292 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
293   while (!ctx->Done(&ptr)) {
294     ::uint32_t tag;
295     ptr = ::_pbi::ReadTag(ptr, &tag);
296     switch (tag >> 3) {
297       // repeated uint64 switch_timestamp = 1 [packed = true];
298       case 1:
299         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
300           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_switch_timestamp(), ptr, ctx);
301           CHK_(ptr);
302         } else if (static_cast<::uint8_t>(tag) == 8) {
303           _internal_add_switch_timestamp(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
304           CHK_(ptr);
305         } else {
306           goto handle_unusual;
307         }
308         continue;
309       // repeated int64 switch_prev_state = 2 [packed = true];
310       case 2:
311         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
312           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_switch_prev_state(), ptr, ctx);
313           CHK_(ptr);
314         } else if (static_cast<::uint8_t>(tag) == 16) {
315           _internal_add_switch_prev_state(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
316           CHK_(ptr);
317         } else {
318           goto handle_unusual;
319         }
320         continue;
321       // repeated int32 switch_next_pid = 3 [packed = true];
322       case 3:
323         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
324           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_switch_next_pid(), ptr, ctx);
325           CHK_(ptr);
326         } else if (static_cast<::uint8_t>(tag) == 24) {
327           _internal_add_switch_next_pid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
328           CHK_(ptr);
329         } else {
330           goto handle_unusual;
331         }
332         continue;
333       // repeated int32 switch_next_prio = 4 [packed = true];
334       case 4:
335         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
336           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_switch_next_prio(), ptr, ctx);
337           CHK_(ptr);
338         } else if (static_cast<::uint8_t>(tag) == 32) {
339           _internal_add_switch_next_prio(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
340           CHK_(ptr);
341         } else {
342           goto handle_unusual;
343         }
344         continue;
345       // repeated string intern_table = 5;
346       case 5:
347         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
348           ptr -= 1;
349           do {
350             ptr += 1;
351             auto str = _internal_add_intern_table();
352             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
353             CHK_(ptr);
354             if (!ctx->DataAvailable(ptr)) break;
355           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
356         } else {
357           goto handle_unusual;
358         }
359         continue;
360       // repeated uint32 switch_next_comm_index = 6 [packed = true];
361       case 6:
362         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
363           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_switch_next_comm_index(), ptr, ctx);
364           CHK_(ptr);
365         } else if (static_cast<::uint8_t>(tag) == 48) {
366           _internal_add_switch_next_comm_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
367           CHK_(ptr);
368         } else {
369           goto handle_unusual;
370         }
371         continue;
372       // repeated uint64 waking_timestamp = 7 [packed = true];
373       case 7:
374         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
375           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_waking_timestamp(), ptr, ctx);
376           CHK_(ptr);
377         } else if (static_cast<::uint8_t>(tag) == 56) {
378           _internal_add_waking_timestamp(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
379           CHK_(ptr);
380         } else {
381           goto handle_unusual;
382         }
383         continue;
384       // repeated int32 waking_pid = 8 [packed = true];
385       case 8:
386         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
387           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_waking_pid(), ptr, ctx);
388           CHK_(ptr);
389         } else if (static_cast<::uint8_t>(tag) == 64) {
390           _internal_add_waking_pid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
391           CHK_(ptr);
392         } else {
393           goto handle_unusual;
394         }
395         continue;
396       // repeated int32 waking_target_cpu = 9 [packed = true];
397       case 9:
398         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
399           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_waking_target_cpu(), ptr, ctx);
400           CHK_(ptr);
401         } else if (static_cast<::uint8_t>(tag) == 72) {
402           _internal_add_waking_target_cpu(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
403           CHK_(ptr);
404         } else {
405           goto handle_unusual;
406         }
407         continue;
408       // repeated int32 waking_prio = 10 [packed = true];
409       case 10:
410         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
411           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_waking_prio(), ptr, ctx);
412           CHK_(ptr);
413         } else if (static_cast<::uint8_t>(tag) == 80) {
414           _internal_add_waking_prio(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
415           CHK_(ptr);
416         } else {
417           goto handle_unusual;
418         }
419         continue;
420       // repeated uint32 waking_comm_index = 11 [packed = true];
421       case 11:
422         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
423           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_waking_comm_index(), ptr, ctx);
424           CHK_(ptr);
425         } else if (static_cast<::uint8_t>(tag) == 88) {
426           _internal_add_waking_comm_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
427           CHK_(ptr);
428         } else {
429           goto handle_unusual;
430         }
431         continue;
432       // repeated uint32 waking_common_flags = 12 [packed = true];
433       case 12:
434         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
435           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_waking_common_flags(), ptr, ctx);
436           CHK_(ptr);
437         } else if (static_cast<::uint8_t>(tag) == 96) {
438           _internal_add_waking_common_flags(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
439           CHK_(ptr);
440         } else {
441           goto handle_unusual;
442         }
443         continue;
444       default:
445         goto handle_unusual;
446     }  // switch
447   handle_unusual:
448     if ((tag == 0) || ((tag & 7) == 4)) {
449       CHK_(ptr);
450       ctx->SetLastTag(tag);
451       goto message_done;
452     }
453     ptr = UnknownFieldParse(
454         tag,
455         _internal_metadata_.mutable_unknown_fields<std::string>(),
456         ptr, ctx);
457     CHK_(ptr != nullptr);
458   }  // while
459 message_done:
460   return ptr;
461 failure:
462   ptr = nullptr;
463   goto message_done;
464 #undef CHK_
465 }
466 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const467 ::uint8_t* FtraceEventBundle_CompactSched::_InternalSerialize(
468     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
469   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceEventBundle.CompactSched)
470   ::uint32_t cached_has_bits = 0;
471   (void) cached_has_bits;
472 
473   // repeated uint64 switch_timestamp = 1 [packed = true];
474   {
475     int byte_size = _impl_._switch_timestamp_cached_byte_size_.load(std::memory_order_relaxed);
476     if (byte_size > 0) {
477       target = stream->WriteUInt64Packed(
478           1, _internal_switch_timestamp(), byte_size, target);
479     }
480   }
481 
482   // repeated int64 switch_prev_state = 2 [packed = true];
483   {
484     int byte_size = _impl_._switch_prev_state_cached_byte_size_.load(std::memory_order_relaxed);
485     if (byte_size > 0) {
486       target = stream->WriteInt64Packed(
487           2, _internal_switch_prev_state(), byte_size, target);
488     }
489   }
490 
491   // repeated int32 switch_next_pid = 3 [packed = true];
492   {
493     int byte_size = _impl_._switch_next_pid_cached_byte_size_.load(std::memory_order_relaxed);
494     if (byte_size > 0) {
495       target = stream->WriteInt32Packed(
496           3, _internal_switch_next_pid(), byte_size, target);
497     }
498   }
499 
500   // repeated int32 switch_next_prio = 4 [packed = true];
501   {
502     int byte_size = _impl_._switch_next_prio_cached_byte_size_.load(std::memory_order_relaxed);
503     if (byte_size > 0) {
504       target = stream->WriteInt32Packed(
505           4, _internal_switch_next_prio(), byte_size, target);
506     }
507   }
508 
509   // repeated string intern_table = 5;
510   for (int i = 0, n = this->_internal_intern_table_size(); i < n; i++) {
511     const auto& s = this->_internal_intern_table(i);
512     target = stream->WriteString(5, s, target);
513   }
514 
515   // repeated uint32 switch_next_comm_index = 6 [packed = true];
516   {
517     int byte_size = _impl_._switch_next_comm_index_cached_byte_size_.load(std::memory_order_relaxed);
518     if (byte_size > 0) {
519       target = stream->WriteUInt32Packed(
520           6, _internal_switch_next_comm_index(), byte_size, target);
521     }
522   }
523 
524   // repeated uint64 waking_timestamp = 7 [packed = true];
525   {
526     int byte_size = _impl_._waking_timestamp_cached_byte_size_.load(std::memory_order_relaxed);
527     if (byte_size > 0) {
528       target = stream->WriteUInt64Packed(
529           7, _internal_waking_timestamp(), byte_size, target);
530     }
531   }
532 
533   // repeated int32 waking_pid = 8 [packed = true];
534   {
535     int byte_size = _impl_._waking_pid_cached_byte_size_.load(std::memory_order_relaxed);
536     if (byte_size > 0) {
537       target = stream->WriteInt32Packed(
538           8, _internal_waking_pid(), byte_size, target);
539     }
540   }
541 
542   // repeated int32 waking_target_cpu = 9 [packed = true];
543   {
544     int byte_size = _impl_._waking_target_cpu_cached_byte_size_.load(std::memory_order_relaxed);
545     if (byte_size > 0) {
546       target = stream->WriteInt32Packed(
547           9, _internal_waking_target_cpu(), byte_size, target);
548     }
549   }
550 
551   // repeated int32 waking_prio = 10 [packed = true];
552   {
553     int byte_size = _impl_._waking_prio_cached_byte_size_.load(std::memory_order_relaxed);
554     if (byte_size > 0) {
555       target = stream->WriteInt32Packed(
556           10, _internal_waking_prio(), byte_size, target);
557     }
558   }
559 
560   // repeated uint32 waking_comm_index = 11 [packed = true];
561   {
562     int byte_size = _impl_._waking_comm_index_cached_byte_size_.load(std::memory_order_relaxed);
563     if (byte_size > 0) {
564       target = stream->WriteUInt32Packed(
565           11, _internal_waking_comm_index(), byte_size, target);
566     }
567   }
568 
569   // repeated uint32 waking_common_flags = 12 [packed = true];
570   {
571     int byte_size = _impl_._waking_common_flags_cached_byte_size_.load(std::memory_order_relaxed);
572     if (byte_size > 0) {
573       target = stream->WriteUInt32Packed(
574           12, _internal_waking_common_flags(), byte_size, target);
575     }
576   }
577 
578   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
579     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
580         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
581   }
582   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceEventBundle.CompactSched)
583   return target;
584 }
585 
ByteSizeLong() const586 size_t FtraceEventBundle_CompactSched::ByteSizeLong() const {
587 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceEventBundle.CompactSched)
588   size_t total_size = 0;
589 
590   ::uint32_t cached_has_bits = 0;
591   // Prevent compiler warnings about cached_has_bits being unused
592   (void) cached_has_bits;
593 
594   // repeated uint64 switch_timestamp = 1 [packed = true];
595   {
596     size_t data_size = ::_pbi::WireFormatLite::
597       UInt64Size(this->_impl_.switch_timestamp_);
598     if (data_size > 0) {
599       total_size += 1 +
600         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
601     }
602     int cached_size = ::_pbi::ToCachedSize(data_size);
603     _impl_._switch_timestamp_cached_byte_size_.store(cached_size,
604                                     std::memory_order_relaxed);
605     total_size += data_size;
606   }
607 
608   // repeated int64 switch_prev_state = 2 [packed = true];
609   {
610     size_t data_size = ::_pbi::WireFormatLite::
611       Int64Size(this->_impl_.switch_prev_state_);
612     if (data_size > 0) {
613       total_size += 1 +
614         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
615     }
616     int cached_size = ::_pbi::ToCachedSize(data_size);
617     _impl_._switch_prev_state_cached_byte_size_.store(cached_size,
618                                     std::memory_order_relaxed);
619     total_size += data_size;
620   }
621 
622   // repeated int32 switch_next_pid = 3 [packed = true];
623   {
624     size_t data_size = ::_pbi::WireFormatLite::
625       Int32Size(this->_impl_.switch_next_pid_);
626     if (data_size > 0) {
627       total_size += 1 +
628         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
629     }
630     int cached_size = ::_pbi::ToCachedSize(data_size);
631     _impl_._switch_next_pid_cached_byte_size_.store(cached_size,
632                                     std::memory_order_relaxed);
633     total_size += data_size;
634   }
635 
636   // repeated int32 switch_next_prio = 4 [packed = true];
637   {
638     size_t data_size = ::_pbi::WireFormatLite::
639       Int32Size(this->_impl_.switch_next_prio_);
640     if (data_size > 0) {
641       total_size += 1 +
642         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
643     }
644     int cached_size = ::_pbi::ToCachedSize(data_size);
645     _impl_._switch_next_prio_cached_byte_size_.store(cached_size,
646                                     std::memory_order_relaxed);
647     total_size += data_size;
648   }
649 
650   // repeated string intern_table = 5;
651   total_size += 1 *
652       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.intern_table_.size());
653   for (int i = 0, n = _impl_.intern_table_.size(); i < n; i++) {
654     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
655       _impl_.intern_table_.Get(i));
656   }
657 
658   // repeated uint32 switch_next_comm_index = 6 [packed = true];
659   {
660     size_t data_size = ::_pbi::WireFormatLite::
661       UInt32Size(this->_impl_.switch_next_comm_index_);
662     if (data_size > 0) {
663       total_size += 1 +
664         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
665     }
666     int cached_size = ::_pbi::ToCachedSize(data_size);
667     _impl_._switch_next_comm_index_cached_byte_size_.store(cached_size,
668                                     std::memory_order_relaxed);
669     total_size += data_size;
670   }
671 
672   // repeated uint64 waking_timestamp = 7 [packed = true];
673   {
674     size_t data_size = ::_pbi::WireFormatLite::
675       UInt64Size(this->_impl_.waking_timestamp_);
676     if (data_size > 0) {
677       total_size += 1 +
678         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
679     }
680     int cached_size = ::_pbi::ToCachedSize(data_size);
681     _impl_._waking_timestamp_cached_byte_size_.store(cached_size,
682                                     std::memory_order_relaxed);
683     total_size += data_size;
684   }
685 
686   // repeated int32 waking_pid = 8 [packed = true];
687   {
688     size_t data_size = ::_pbi::WireFormatLite::
689       Int32Size(this->_impl_.waking_pid_);
690     if (data_size > 0) {
691       total_size += 1 +
692         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
693     }
694     int cached_size = ::_pbi::ToCachedSize(data_size);
695     _impl_._waking_pid_cached_byte_size_.store(cached_size,
696                                     std::memory_order_relaxed);
697     total_size += data_size;
698   }
699 
700   // repeated int32 waking_target_cpu = 9 [packed = true];
701   {
702     size_t data_size = ::_pbi::WireFormatLite::
703       Int32Size(this->_impl_.waking_target_cpu_);
704     if (data_size > 0) {
705       total_size += 1 +
706         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
707     }
708     int cached_size = ::_pbi::ToCachedSize(data_size);
709     _impl_._waking_target_cpu_cached_byte_size_.store(cached_size,
710                                     std::memory_order_relaxed);
711     total_size += data_size;
712   }
713 
714   // repeated int32 waking_prio = 10 [packed = true];
715   {
716     size_t data_size = ::_pbi::WireFormatLite::
717       Int32Size(this->_impl_.waking_prio_);
718     if (data_size > 0) {
719       total_size += 1 +
720         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
721     }
722     int cached_size = ::_pbi::ToCachedSize(data_size);
723     _impl_._waking_prio_cached_byte_size_.store(cached_size,
724                                     std::memory_order_relaxed);
725     total_size += data_size;
726   }
727 
728   // repeated uint32 waking_comm_index = 11 [packed = true];
729   {
730     size_t data_size = ::_pbi::WireFormatLite::
731       UInt32Size(this->_impl_.waking_comm_index_);
732     if (data_size > 0) {
733       total_size += 1 +
734         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
735     }
736     int cached_size = ::_pbi::ToCachedSize(data_size);
737     _impl_._waking_comm_index_cached_byte_size_.store(cached_size,
738                                     std::memory_order_relaxed);
739     total_size += data_size;
740   }
741 
742   // repeated uint32 waking_common_flags = 12 [packed = true];
743   {
744     size_t data_size = ::_pbi::WireFormatLite::
745       UInt32Size(this->_impl_.waking_common_flags_);
746     if (data_size > 0) {
747       total_size += 1 +
748         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
749     }
750     int cached_size = ::_pbi::ToCachedSize(data_size);
751     _impl_._waking_common_flags_cached_byte_size_.store(cached_size,
752                                     std::memory_order_relaxed);
753     total_size += data_size;
754   }
755 
756   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
757     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
758   }
759   int cached_size = ::_pbi::ToCachedSize(total_size);
760   SetCachedSize(cached_size);
761   return total_size;
762 }
763 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)764 void FtraceEventBundle_CompactSched::CheckTypeAndMergeFrom(
765     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
766   MergeFrom(*::_pbi::DownCast<const FtraceEventBundle_CompactSched*>(
767       &from));
768 }
769 
MergeFrom(const FtraceEventBundle_CompactSched & from)770 void FtraceEventBundle_CompactSched::MergeFrom(const FtraceEventBundle_CompactSched& from) {
771   FtraceEventBundle_CompactSched* const _this = this;
772   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceEventBundle.CompactSched)
773   GOOGLE_DCHECK_NE(&from, _this);
774   ::uint32_t cached_has_bits = 0;
775   (void) cached_has_bits;
776 
777   _this->_impl_.switch_timestamp_.MergeFrom(from._impl_.switch_timestamp_);
778   _this->_impl_.switch_prev_state_.MergeFrom(from._impl_.switch_prev_state_);
779   _this->_impl_.switch_next_pid_.MergeFrom(from._impl_.switch_next_pid_);
780   _this->_impl_.switch_next_prio_.MergeFrom(from._impl_.switch_next_prio_);
781   _this->_impl_.intern_table_.MergeFrom(from._impl_.intern_table_);
782   _this->_impl_.switch_next_comm_index_.MergeFrom(from._impl_.switch_next_comm_index_);
783   _this->_impl_.waking_timestamp_.MergeFrom(from._impl_.waking_timestamp_);
784   _this->_impl_.waking_pid_.MergeFrom(from._impl_.waking_pid_);
785   _this->_impl_.waking_target_cpu_.MergeFrom(from._impl_.waking_target_cpu_);
786   _this->_impl_.waking_prio_.MergeFrom(from._impl_.waking_prio_);
787   _this->_impl_.waking_comm_index_.MergeFrom(from._impl_.waking_comm_index_);
788   _this->_impl_.waking_common_flags_.MergeFrom(from._impl_.waking_common_flags_);
789   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
790 }
791 
CopyFrom(const FtraceEventBundle_CompactSched & from)792 void FtraceEventBundle_CompactSched::CopyFrom(const FtraceEventBundle_CompactSched& from) {
793 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceEventBundle.CompactSched)
794   if (&from == this) return;
795   Clear();
796   MergeFrom(from);
797 }
798 
IsInitialized() const799 bool FtraceEventBundle_CompactSched::IsInitialized() const {
800   return true;
801 }
802 
InternalSwap(FtraceEventBundle_CompactSched * other)803 void FtraceEventBundle_CompactSched::InternalSwap(FtraceEventBundle_CompactSched* other) {
804   using std::swap;
805   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
806   _impl_.switch_timestamp_.InternalSwap(&other->_impl_.switch_timestamp_);
807   _impl_.switch_prev_state_.InternalSwap(&other->_impl_.switch_prev_state_);
808   _impl_.switch_next_pid_.InternalSwap(&other->_impl_.switch_next_pid_);
809   _impl_.switch_next_prio_.InternalSwap(&other->_impl_.switch_next_prio_);
810   _impl_.intern_table_.InternalSwap(&other->_impl_.intern_table_);
811   _impl_.switch_next_comm_index_.InternalSwap(&other->_impl_.switch_next_comm_index_);
812   _impl_.waking_timestamp_.InternalSwap(&other->_impl_.waking_timestamp_);
813   _impl_.waking_pid_.InternalSwap(&other->_impl_.waking_pid_);
814   _impl_.waking_target_cpu_.InternalSwap(&other->_impl_.waking_target_cpu_);
815   _impl_.waking_prio_.InternalSwap(&other->_impl_.waking_prio_);
816   _impl_.waking_comm_index_.InternalSwap(&other->_impl_.waking_comm_index_);
817   _impl_.waking_common_flags_.InternalSwap(&other->_impl_.waking_common_flags_);
818 }
819 
GetTypeName() const820 std::string FtraceEventBundle_CompactSched::GetTypeName() const {
821   return "perfetto.protos.FtraceEventBundle.CompactSched";
822 }
823 
824 
825 // ===================================================================
826 
827 class FtraceEventBundle_FtraceError::_Internal {
828  public:
829   using HasBits = decltype(std::declval<FtraceEventBundle_FtraceError>()._impl_._has_bits_);
set_has_timestamp(HasBits * has_bits)830   static void set_has_timestamp(HasBits* has_bits) {
831     (*has_bits)[0] |= 1u;
832   }
set_has_status(HasBits * has_bits)833   static void set_has_status(HasBits* has_bits) {
834     (*has_bits)[0] |= 2u;
835   }
836 };
837 
FtraceEventBundle_FtraceError(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)838 FtraceEventBundle_FtraceError::FtraceEventBundle_FtraceError(::PROTOBUF_NAMESPACE_ID::Arena* arena,
839                          bool is_message_owned)
840   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
841   SharedCtor(arena, is_message_owned);
842   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceEventBundle.FtraceError)
843 }
FtraceEventBundle_FtraceError(const FtraceEventBundle_FtraceError & from)844 FtraceEventBundle_FtraceError::FtraceEventBundle_FtraceError(const FtraceEventBundle_FtraceError& from)
845   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
846   FtraceEventBundle_FtraceError* const _this = this; (void)_this;
847   new (&_impl_) Impl_{
848       decltype(_impl_._has_bits_){from._impl_._has_bits_}
849     , /*decltype(_impl_._cached_size_)*/{}
850     , decltype(_impl_.timestamp_){}
851     , decltype(_impl_.status_){}};
852 
853   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
854   ::memcpy(&_impl_.timestamp_, &from._impl_.timestamp_,
855     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.status_) -
856     reinterpret_cast<char*>(&_impl_.timestamp_)) + sizeof(_impl_.status_));
857   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceEventBundle.FtraceError)
858 }
859 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)860 inline void FtraceEventBundle_FtraceError::SharedCtor(
861     ::_pb::Arena* arena, bool is_message_owned) {
862   (void)arena;
863   (void)is_message_owned;
864   new (&_impl_) Impl_{
865       decltype(_impl_._has_bits_){}
866     , /*decltype(_impl_._cached_size_)*/{}
867     , decltype(_impl_.timestamp_){::uint64_t{0u}}
868     , decltype(_impl_.status_){0}
869   };
870 }
871 
~FtraceEventBundle_FtraceError()872 FtraceEventBundle_FtraceError::~FtraceEventBundle_FtraceError() {
873   // @@protoc_insertion_point(destructor:perfetto.protos.FtraceEventBundle.FtraceError)
874   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
875   (void)arena;
876     return;
877   }
878   SharedDtor();
879 }
880 
SharedDtor()881 inline void FtraceEventBundle_FtraceError::SharedDtor() {
882   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
883 }
884 
SetCachedSize(int size) const885 void FtraceEventBundle_FtraceError::SetCachedSize(int size) const {
886   _impl_._cached_size_.Set(size);
887 }
888 
Clear()889 void FtraceEventBundle_FtraceError::Clear() {
890 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceEventBundle.FtraceError)
891   ::uint32_t cached_has_bits = 0;
892   // Prevent compiler warnings about cached_has_bits being unused
893   (void) cached_has_bits;
894 
895   cached_has_bits = _impl_._has_bits_[0];
896   if (cached_has_bits & 0x00000003u) {
897     ::memset(&_impl_.timestamp_, 0, static_cast<size_t>(
898         reinterpret_cast<char*>(&_impl_.status_) -
899         reinterpret_cast<char*>(&_impl_.timestamp_)) + sizeof(_impl_.status_));
900   }
901   _impl_._has_bits_.Clear();
902   _internal_metadata_.Clear<std::string>();
903 }
904 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)905 const char* FtraceEventBundle_FtraceError::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
906 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
907   _Internal::HasBits has_bits{};
908   while (!ctx->Done(&ptr)) {
909     ::uint32_t tag;
910     ptr = ::_pbi::ReadTag(ptr, &tag);
911     switch (tag >> 3) {
912       // optional uint64 timestamp = 1;
913       case 1:
914         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
915           _Internal::set_has_timestamp(&has_bits);
916           _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
917           CHK_(ptr);
918         } else {
919           goto handle_unusual;
920         }
921         continue;
922       // optional .perfetto.protos.FtraceParseStatus status = 2;
923       case 2:
924         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
925           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
926           CHK_(ptr);
927           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FtraceParseStatus_IsValid(val))) {
928             _internal_set_status(static_cast<::perfetto::protos::FtraceParseStatus>(val));
929           } else {
930             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
931           }
932         } else {
933           goto handle_unusual;
934         }
935         continue;
936       default:
937         goto handle_unusual;
938     }  // switch
939   handle_unusual:
940     if ((tag == 0) || ((tag & 7) == 4)) {
941       CHK_(ptr);
942       ctx->SetLastTag(tag);
943       goto message_done;
944     }
945     ptr = UnknownFieldParse(
946         tag,
947         _internal_metadata_.mutable_unknown_fields<std::string>(),
948         ptr, ctx);
949     CHK_(ptr != nullptr);
950   }  // while
951 message_done:
952   _impl_._has_bits_.Or(has_bits);
953   return ptr;
954 failure:
955   ptr = nullptr;
956   goto message_done;
957 #undef CHK_
958 }
959 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const960 ::uint8_t* FtraceEventBundle_FtraceError::_InternalSerialize(
961     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
962   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceEventBundle.FtraceError)
963   ::uint32_t cached_has_bits = 0;
964   (void) cached_has_bits;
965 
966   cached_has_bits = _impl_._has_bits_[0];
967   // optional uint64 timestamp = 1;
968   if (cached_has_bits & 0x00000001u) {
969     target = stream->EnsureSpace(target);
970     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_timestamp(), target);
971   }
972 
973   // optional .perfetto.protos.FtraceParseStatus status = 2;
974   if (cached_has_bits & 0x00000002u) {
975     target = stream->EnsureSpace(target);
976     target = ::_pbi::WireFormatLite::WriteEnumToArray(
977       2, this->_internal_status(), target);
978   }
979 
980   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
981     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
982         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
983   }
984   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceEventBundle.FtraceError)
985   return target;
986 }
987 
ByteSizeLong() const988 size_t FtraceEventBundle_FtraceError::ByteSizeLong() const {
989 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceEventBundle.FtraceError)
990   size_t total_size = 0;
991 
992   ::uint32_t cached_has_bits = 0;
993   // Prevent compiler warnings about cached_has_bits being unused
994   (void) cached_has_bits;
995 
996   cached_has_bits = _impl_._has_bits_[0];
997   if (cached_has_bits & 0x00000003u) {
998     // optional uint64 timestamp = 1;
999     if (cached_has_bits & 0x00000001u) {
1000       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_timestamp());
1001     }
1002 
1003     // optional .perfetto.protos.FtraceParseStatus status = 2;
1004     if (cached_has_bits & 0x00000002u) {
1005       total_size += 1 +
1006         ::_pbi::WireFormatLite::EnumSize(this->_internal_status());
1007     }
1008 
1009   }
1010   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1011     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1012   }
1013   int cached_size = ::_pbi::ToCachedSize(total_size);
1014   SetCachedSize(cached_size);
1015   return total_size;
1016 }
1017 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1018 void FtraceEventBundle_FtraceError::CheckTypeAndMergeFrom(
1019     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1020   MergeFrom(*::_pbi::DownCast<const FtraceEventBundle_FtraceError*>(
1021       &from));
1022 }
1023 
MergeFrom(const FtraceEventBundle_FtraceError & from)1024 void FtraceEventBundle_FtraceError::MergeFrom(const FtraceEventBundle_FtraceError& from) {
1025   FtraceEventBundle_FtraceError* const _this = this;
1026   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceEventBundle.FtraceError)
1027   GOOGLE_DCHECK_NE(&from, _this);
1028   ::uint32_t cached_has_bits = 0;
1029   (void) cached_has_bits;
1030 
1031   cached_has_bits = from._impl_._has_bits_[0];
1032   if (cached_has_bits & 0x00000003u) {
1033     if (cached_has_bits & 0x00000001u) {
1034       _this->_impl_.timestamp_ = from._impl_.timestamp_;
1035     }
1036     if (cached_has_bits & 0x00000002u) {
1037       _this->_impl_.status_ = from._impl_.status_;
1038     }
1039     _this->_impl_._has_bits_[0] |= cached_has_bits;
1040   }
1041   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1042 }
1043 
CopyFrom(const FtraceEventBundle_FtraceError & from)1044 void FtraceEventBundle_FtraceError::CopyFrom(const FtraceEventBundle_FtraceError& from) {
1045 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceEventBundle.FtraceError)
1046   if (&from == this) return;
1047   Clear();
1048   MergeFrom(from);
1049 }
1050 
IsInitialized() const1051 bool FtraceEventBundle_FtraceError::IsInitialized() const {
1052   return true;
1053 }
1054 
InternalSwap(FtraceEventBundle_FtraceError * other)1055 void FtraceEventBundle_FtraceError::InternalSwap(FtraceEventBundle_FtraceError* other) {
1056   using std::swap;
1057   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1058   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1059   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1060       PROTOBUF_FIELD_OFFSET(FtraceEventBundle_FtraceError, _impl_.status_)
1061       + sizeof(FtraceEventBundle_FtraceError::_impl_.status_)  // NOLINT
1062       - PROTOBUF_FIELD_OFFSET(FtraceEventBundle_FtraceError, _impl_.timestamp_)>(
1063           reinterpret_cast<char*>(&_impl_.timestamp_),
1064           reinterpret_cast<char*>(&other->_impl_.timestamp_));
1065 }
1066 
GetTypeName() const1067 std::string FtraceEventBundle_FtraceError::GetTypeName() const {
1068   return "perfetto.protos.FtraceEventBundle.FtraceError";
1069 }
1070 
1071 
1072 // ===================================================================
1073 
1074 class FtraceEventBundle::_Internal {
1075  public:
1076   using HasBits = decltype(std::declval<FtraceEventBundle>()._impl_._has_bits_);
set_has_cpu(HasBits * has_bits)1077   static void set_has_cpu(HasBits* has_bits) {
1078     (*has_bits)[0] |= 2u;
1079   }
set_has_lost_events(HasBits * has_bits)1080   static void set_has_lost_events(HasBits* has_bits) {
1081     (*has_bits)[0] |= 4u;
1082   }
1083   static const ::perfetto::protos::FtraceEventBundle_CompactSched& compact_sched(const FtraceEventBundle* msg);
set_has_compact_sched(HasBits * has_bits)1084   static void set_has_compact_sched(HasBits* has_bits) {
1085     (*has_bits)[0] |= 1u;
1086   }
set_has_ftrace_clock(HasBits * has_bits)1087   static void set_has_ftrace_clock(HasBits* has_bits) {
1088     (*has_bits)[0] |= 128u;
1089   }
set_has_ftrace_timestamp(HasBits * has_bits)1090   static void set_has_ftrace_timestamp(HasBits* has_bits) {
1091     (*has_bits)[0] |= 8u;
1092   }
set_has_boot_timestamp(HasBits * has_bits)1093   static void set_has_boot_timestamp(HasBits* has_bits) {
1094     (*has_bits)[0] |= 16u;
1095   }
set_has_last_read_event_timestamp(HasBits * has_bits)1096   static void set_has_last_read_event_timestamp(HasBits* has_bits) {
1097     (*has_bits)[0] |= 32u;
1098   }
set_has_previous_bundle_end_timestamp(HasBits * has_bits)1099   static void set_has_previous_bundle_end_timestamp(HasBits* has_bits) {
1100     (*has_bits)[0] |= 64u;
1101   }
1102 };
1103 
1104 const ::perfetto::protos::FtraceEventBundle_CompactSched&
compact_sched(const FtraceEventBundle * msg)1105 FtraceEventBundle::_Internal::compact_sched(const FtraceEventBundle* msg) {
1106   return *msg->_impl_.compact_sched_;
1107 }
clear_event()1108 void FtraceEventBundle::clear_event() {
1109   _impl_.event_.Clear();
1110 }
FtraceEventBundle(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1111 FtraceEventBundle::FtraceEventBundle(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1112                          bool is_message_owned)
1113   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1114   SharedCtor(arena, is_message_owned);
1115   // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceEventBundle)
1116 }
FtraceEventBundle(const FtraceEventBundle & from)1117 FtraceEventBundle::FtraceEventBundle(const FtraceEventBundle& from)
1118   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1119   FtraceEventBundle* const _this = this; (void)_this;
1120   new (&_impl_) Impl_{
1121       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1122     , /*decltype(_impl_._cached_size_)*/{}
1123     , decltype(_impl_.event_){from._impl_.event_}
1124     , decltype(_impl_.error_){from._impl_.error_}
1125     , decltype(_impl_.compact_sched_){nullptr}
1126     , decltype(_impl_.cpu_){}
1127     , decltype(_impl_.lost_events_){}
1128     , decltype(_impl_.ftrace_timestamp_){}
1129     , decltype(_impl_.boot_timestamp_){}
1130     , decltype(_impl_.last_read_event_timestamp_){}
1131     , decltype(_impl_.previous_bundle_end_timestamp_){}
1132     , decltype(_impl_.ftrace_clock_){}};
1133 
1134   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1135   if (from._internal_has_compact_sched()) {
1136     _this->_impl_.compact_sched_ = new ::perfetto::protos::FtraceEventBundle_CompactSched(*from._impl_.compact_sched_);
1137   }
1138   ::memcpy(&_impl_.cpu_, &from._impl_.cpu_,
1139     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.ftrace_clock_) -
1140     reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.ftrace_clock_));
1141   // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceEventBundle)
1142 }
1143 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1144 inline void FtraceEventBundle::SharedCtor(
1145     ::_pb::Arena* arena, bool is_message_owned) {
1146   (void)arena;
1147   (void)is_message_owned;
1148   new (&_impl_) Impl_{
1149       decltype(_impl_._has_bits_){}
1150     , /*decltype(_impl_._cached_size_)*/{}
1151     , decltype(_impl_.event_){arena}
1152     , decltype(_impl_.error_){arena}
1153     , decltype(_impl_.compact_sched_){nullptr}
1154     , decltype(_impl_.cpu_){0u}
1155     , decltype(_impl_.lost_events_){false}
1156     , decltype(_impl_.ftrace_timestamp_){::int64_t{0}}
1157     , decltype(_impl_.boot_timestamp_){::int64_t{0}}
1158     , decltype(_impl_.last_read_event_timestamp_){::uint64_t{0u}}
1159     , decltype(_impl_.previous_bundle_end_timestamp_){::uint64_t{0u}}
1160     , decltype(_impl_.ftrace_clock_){0}
1161   };
1162 }
1163 
~FtraceEventBundle()1164 FtraceEventBundle::~FtraceEventBundle() {
1165   // @@protoc_insertion_point(destructor:perfetto.protos.FtraceEventBundle)
1166   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1167   (void)arena;
1168     return;
1169   }
1170   SharedDtor();
1171 }
1172 
SharedDtor()1173 inline void FtraceEventBundle::SharedDtor() {
1174   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1175   _impl_.event_.~RepeatedPtrField();
1176   _impl_.error_.~RepeatedPtrField();
1177   if (this != internal_default_instance()) delete _impl_.compact_sched_;
1178 }
1179 
SetCachedSize(int size) const1180 void FtraceEventBundle::SetCachedSize(int size) const {
1181   _impl_._cached_size_.Set(size);
1182 }
1183 
Clear()1184 void FtraceEventBundle::Clear() {
1185 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceEventBundle)
1186   ::uint32_t cached_has_bits = 0;
1187   // Prevent compiler warnings about cached_has_bits being unused
1188   (void) cached_has_bits;
1189 
1190   _impl_.event_.Clear();
1191   _impl_.error_.Clear();
1192   cached_has_bits = _impl_._has_bits_[0];
1193   if (cached_has_bits & 0x00000001u) {
1194     GOOGLE_DCHECK(_impl_.compact_sched_ != nullptr);
1195     _impl_.compact_sched_->Clear();
1196   }
1197   if (cached_has_bits & 0x000000feu) {
1198     ::memset(&_impl_.cpu_, 0, static_cast<size_t>(
1199         reinterpret_cast<char*>(&_impl_.ftrace_clock_) -
1200         reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.ftrace_clock_));
1201   }
1202   _impl_._has_bits_.Clear();
1203   _internal_metadata_.Clear<std::string>();
1204 }
1205 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1206 const char* FtraceEventBundle::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1207 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1208   _Internal::HasBits has_bits{};
1209   while (!ctx->Done(&ptr)) {
1210     ::uint32_t tag;
1211     ptr = ::_pbi::ReadTag(ptr, &tag);
1212     switch (tag >> 3) {
1213       // optional uint32 cpu = 1;
1214       case 1:
1215         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1216           _Internal::set_has_cpu(&has_bits);
1217           _impl_.cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1218           CHK_(ptr);
1219         } else {
1220           goto handle_unusual;
1221         }
1222         continue;
1223       // repeated .perfetto.protos.FtraceEvent event = 2;
1224       case 2:
1225         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1226           ptr -= 1;
1227           do {
1228             ptr += 1;
1229             ptr = ctx->ParseMessage(_internal_add_event(), ptr);
1230             CHK_(ptr);
1231             if (!ctx->DataAvailable(ptr)) break;
1232           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1233         } else {
1234           goto handle_unusual;
1235         }
1236         continue;
1237       // optional bool lost_events = 3;
1238       case 3:
1239         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1240           _Internal::set_has_lost_events(&has_bits);
1241           _impl_.lost_events_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1242           CHK_(ptr);
1243         } else {
1244           goto handle_unusual;
1245         }
1246         continue;
1247       // optional .perfetto.protos.FtraceEventBundle.CompactSched compact_sched = 4;
1248       case 4:
1249         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1250           ptr = ctx->ParseMessage(_internal_mutable_compact_sched(), ptr);
1251           CHK_(ptr);
1252         } else {
1253           goto handle_unusual;
1254         }
1255         continue;
1256       // optional .perfetto.protos.FtraceClock ftrace_clock = 5;
1257       case 5:
1258         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1259           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1260           CHK_(ptr);
1261           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FtraceClock_IsValid(val))) {
1262             _internal_set_ftrace_clock(static_cast<::perfetto::protos::FtraceClock>(val));
1263           } else {
1264             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
1265           }
1266         } else {
1267           goto handle_unusual;
1268         }
1269         continue;
1270       // optional int64 ftrace_timestamp = 6;
1271       case 6:
1272         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1273           _Internal::set_has_ftrace_timestamp(&has_bits);
1274           _impl_.ftrace_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1275           CHK_(ptr);
1276         } else {
1277           goto handle_unusual;
1278         }
1279         continue;
1280       // optional int64 boot_timestamp = 7;
1281       case 7:
1282         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1283           _Internal::set_has_boot_timestamp(&has_bits);
1284           _impl_.boot_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1285           CHK_(ptr);
1286         } else {
1287           goto handle_unusual;
1288         }
1289         continue;
1290       // repeated .perfetto.protos.FtraceEventBundle.FtraceError error = 8;
1291       case 8:
1292         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
1293           ptr -= 1;
1294           do {
1295             ptr += 1;
1296             ptr = ctx->ParseMessage(_internal_add_error(), ptr);
1297             CHK_(ptr);
1298             if (!ctx->DataAvailable(ptr)) break;
1299           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
1300         } else {
1301           goto handle_unusual;
1302         }
1303         continue;
1304       // optional uint64 last_read_event_timestamp = 9;
1305       case 9:
1306         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1307           _Internal::set_has_last_read_event_timestamp(&has_bits);
1308           _impl_.last_read_event_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1309           CHK_(ptr);
1310         } else {
1311           goto handle_unusual;
1312         }
1313         continue;
1314       // optional uint64 previous_bundle_end_timestamp = 10;
1315       case 10:
1316         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
1317           _Internal::set_has_previous_bundle_end_timestamp(&has_bits);
1318           _impl_.previous_bundle_end_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1319           CHK_(ptr);
1320         } else {
1321           goto handle_unusual;
1322         }
1323         continue;
1324       default:
1325         goto handle_unusual;
1326     }  // switch
1327   handle_unusual:
1328     if ((tag == 0) || ((tag & 7) == 4)) {
1329       CHK_(ptr);
1330       ctx->SetLastTag(tag);
1331       goto message_done;
1332     }
1333     ptr = UnknownFieldParse(
1334         tag,
1335         _internal_metadata_.mutable_unknown_fields<std::string>(),
1336         ptr, ctx);
1337     CHK_(ptr != nullptr);
1338   }  // while
1339 message_done:
1340   _impl_._has_bits_.Or(has_bits);
1341   return ptr;
1342 failure:
1343   ptr = nullptr;
1344   goto message_done;
1345 #undef CHK_
1346 }
1347 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1348 ::uint8_t* FtraceEventBundle::_InternalSerialize(
1349     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1350   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceEventBundle)
1351   ::uint32_t cached_has_bits = 0;
1352   (void) cached_has_bits;
1353 
1354   cached_has_bits = _impl_._has_bits_[0];
1355   // optional uint32 cpu = 1;
1356   if (cached_has_bits & 0x00000002u) {
1357     target = stream->EnsureSpace(target);
1358     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cpu(), target);
1359   }
1360 
1361   // repeated .perfetto.protos.FtraceEvent event = 2;
1362   for (unsigned i = 0,
1363       n = static_cast<unsigned>(this->_internal_event_size()); i < n; i++) {
1364     const auto& repfield = this->_internal_event(i);
1365     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1366         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
1367   }
1368 
1369   // optional bool lost_events = 3;
1370   if (cached_has_bits & 0x00000004u) {
1371     target = stream->EnsureSpace(target);
1372     target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_lost_events(), target);
1373   }
1374 
1375   // optional .perfetto.protos.FtraceEventBundle.CompactSched compact_sched = 4;
1376   if (cached_has_bits & 0x00000001u) {
1377     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1378       InternalWriteMessage(4, _Internal::compact_sched(this),
1379         _Internal::compact_sched(this).GetCachedSize(), target, stream);
1380   }
1381 
1382   // optional .perfetto.protos.FtraceClock ftrace_clock = 5;
1383   if (cached_has_bits & 0x00000080u) {
1384     target = stream->EnsureSpace(target);
1385     target = ::_pbi::WireFormatLite::WriteEnumToArray(
1386       5, this->_internal_ftrace_clock(), target);
1387   }
1388 
1389   // optional int64 ftrace_timestamp = 6;
1390   if (cached_has_bits & 0x00000008u) {
1391     target = stream->EnsureSpace(target);
1392     target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_ftrace_timestamp(), target);
1393   }
1394 
1395   // optional int64 boot_timestamp = 7;
1396   if (cached_has_bits & 0x00000010u) {
1397     target = stream->EnsureSpace(target);
1398     target = ::_pbi::WireFormatLite::WriteInt64ToArray(7, this->_internal_boot_timestamp(), target);
1399   }
1400 
1401   // repeated .perfetto.protos.FtraceEventBundle.FtraceError error = 8;
1402   for (unsigned i = 0,
1403       n = static_cast<unsigned>(this->_internal_error_size()); i < n; i++) {
1404     const auto& repfield = this->_internal_error(i);
1405     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1406         InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream);
1407   }
1408 
1409   // optional uint64 last_read_event_timestamp = 9;
1410   if (cached_has_bits & 0x00000020u) {
1411     target = stream->EnsureSpace(target);
1412     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(9, this->_internal_last_read_event_timestamp(), target);
1413   }
1414 
1415   // optional uint64 previous_bundle_end_timestamp = 10;
1416   if (cached_has_bits & 0x00000040u) {
1417     target = stream->EnsureSpace(target);
1418     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(10, this->_internal_previous_bundle_end_timestamp(), target);
1419   }
1420 
1421   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1422     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1423         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1424   }
1425   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceEventBundle)
1426   return target;
1427 }
1428 
ByteSizeLong() const1429 size_t FtraceEventBundle::ByteSizeLong() const {
1430 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceEventBundle)
1431   size_t total_size = 0;
1432 
1433   ::uint32_t cached_has_bits = 0;
1434   // Prevent compiler warnings about cached_has_bits being unused
1435   (void) cached_has_bits;
1436 
1437   // repeated .perfetto.protos.FtraceEvent event = 2;
1438   total_size += 1UL * this->_internal_event_size();
1439   for (const auto& msg : this->_impl_.event_) {
1440     total_size +=
1441       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1442   }
1443 
1444   // repeated .perfetto.protos.FtraceEventBundle.FtraceError error = 8;
1445   total_size += 1UL * this->_internal_error_size();
1446   for (const auto& msg : this->_impl_.error_) {
1447     total_size +=
1448       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1449   }
1450 
1451   cached_has_bits = _impl_._has_bits_[0];
1452   if (cached_has_bits & 0x000000ffu) {
1453     // optional .perfetto.protos.FtraceEventBundle.CompactSched compact_sched = 4;
1454     if (cached_has_bits & 0x00000001u) {
1455       total_size += 1 +
1456         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1457           *_impl_.compact_sched_);
1458     }
1459 
1460     // optional uint32 cpu = 1;
1461     if (cached_has_bits & 0x00000002u) {
1462       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpu());
1463     }
1464 
1465     // optional bool lost_events = 3;
1466     if (cached_has_bits & 0x00000004u) {
1467       total_size += 1 + 1;
1468     }
1469 
1470     // optional int64 ftrace_timestamp = 6;
1471     if (cached_has_bits & 0x00000008u) {
1472       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_ftrace_timestamp());
1473     }
1474 
1475     // optional int64 boot_timestamp = 7;
1476     if (cached_has_bits & 0x00000010u) {
1477       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_boot_timestamp());
1478     }
1479 
1480     // optional uint64 last_read_event_timestamp = 9;
1481     if (cached_has_bits & 0x00000020u) {
1482       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_last_read_event_timestamp());
1483     }
1484 
1485     // optional uint64 previous_bundle_end_timestamp = 10;
1486     if (cached_has_bits & 0x00000040u) {
1487       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_previous_bundle_end_timestamp());
1488     }
1489 
1490     // optional .perfetto.protos.FtraceClock ftrace_clock = 5;
1491     if (cached_has_bits & 0x00000080u) {
1492       total_size += 1 +
1493         ::_pbi::WireFormatLite::EnumSize(this->_internal_ftrace_clock());
1494     }
1495 
1496   }
1497   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1498     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1499   }
1500   int cached_size = ::_pbi::ToCachedSize(total_size);
1501   SetCachedSize(cached_size);
1502   return total_size;
1503 }
1504 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1505 void FtraceEventBundle::CheckTypeAndMergeFrom(
1506     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1507   MergeFrom(*::_pbi::DownCast<const FtraceEventBundle*>(
1508       &from));
1509 }
1510 
MergeFrom(const FtraceEventBundle & from)1511 void FtraceEventBundle::MergeFrom(const FtraceEventBundle& from) {
1512   FtraceEventBundle* const _this = this;
1513   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceEventBundle)
1514   GOOGLE_DCHECK_NE(&from, _this);
1515   ::uint32_t cached_has_bits = 0;
1516   (void) cached_has_bits;
1517 
1518   _this->_impl_.event_.MergeFrom(from._impl_.event_);
1519   _this->_impl_.error_.MergeFrom(from._impl_.error_);
1520   cached_has_bits = from._impl_._has_bits_[0];
1521   if (cached_has_bits & 0x000000ffu) {
1522     if (cached_has_bits & 0x00000001u) {
1523       _this->_internal_mutable_compact_sched()->::perfetto::protos::FtraceEventBundle_CompactSched::MergeFrom(
1524           from._internal_compact_sched());
1525     }
1526     if (cached_has_bits & 0x00000002u) {
1527       _this->_impl_.cpu_ = from._impl_.cpu_;
1528     }
1529     if (cached_has_bits & 0x00000004u) {
1530       _this->_impl_.lost_events_ = from._impl_.lost_events_;
1531     }
1532     if (cached_has_bits & 0x00000008u) {
1533       _this->_impl_.ftrace_timestamp_ = from._impl_.ftrace_timestamp_;
1534     }
1535     if (cached_has_bits & 0x00000010u) {
1536       _this->_impl_.boot_timestamp_ = from._impl_.boot_timestamp_;
1537     }
1538     if (cached_has_bits & 0x00000020u) {
1539       _this->_impl_.last_read_event_timestamp_ = from._impl_.last_read_event_timestamp_;
1540     }
1541     if (cached_has_bits & 0x00000040u) {
1542       _this->_impl_.previous_bundle_end_timestamp_ = from._impl_.previous_bundle_end_timestamp_;
1543     }
1544     if (cached_has_bits & 0x00000080u) {
1545       _this->_impl_.ftrace_clock_ = from._impl_.ftrace_clock_;
1546     }
1547     _this->_impl_._has_bits_[0] |= cached_has_bits;
1548   }
1549   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1550 }
1551 
CopyFrom(const FtraceEventBundle & from)1552 void FtraceEventBundle::CopyFrom(const FtraceEventBundle& from) {
1553 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceEventBundle)
1554   if (&from == this) return;
1555   Clear();
1556   MergeFrom(from);
1557 }
1558 
IsInitialized() const1559 bool FtraceEventBundle::IsInitialized() const {
1560   return true;
1561 }
1562 
InternalSwap(FtraceEventBundle * other)1563 void FtraceEventBundle::InternalSwap(FtraceEventBundle* other) {
1564   using std::swap;
1565   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1566   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1567   _impl_.event_.InternalSwap(&other->_impl_.event_);
1568   _impl_.error_.InternalSwap(&other->_impl_.error_);
1569   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1570       PROTOBUF_FIELD_OFFSET(FtraceEventBundle, _impl_.ftrace_clock_)
1571       + sizeof(FtraceEventBundle::_impl_.ftrace_clock_)  // NOLINT
1572       - PROTOBUF_FIELD_OFFSET(FtraceEventBundle, _impl_.compact_sched_)>(
1573           reinterpret_cast<char*>(&_impl_.compact_sched_),
1574           reinterpret_cast<char*>(&other->_impl_.compact_sched_));
1575 }
1576 
GetTypeName() const1577 std::string FtraceEventBundle::GetTypeName() const {
1578   return "perfetto.protos.FtraceEventBundle";
1579 }
1580 
1581 
1582 // @@protoc_insertion_point(namespace_scope)
1583 }  // namespace protos
1584 }  // namespace perfetto
1585 PROTOBUF_NAMESPACE_OPEN
1586 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceEventBundle_CompactSched*
CreateMaybeMessage(Arena * arena)1587 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceEventBundle_CompactSched >(Arena* arena) {
1588   return Arena::CreateMessageInternal< ::perfetto::protos::FtraceEventBundle_CompactSched >(arena);
1589 }
1590 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceEventBundle_FtraceError*
CreateMaybeMessage(Arena * arena)1591 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceEventBundle_FtraceError >(Arena* arena) {
1592   return Arena::CreateMessageInternal< ::perfetto::protos::FtraceEventBundle_FtraceError >(arena);
1593 }
1594 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceEventBundle*
CreateMaybeMessage(Arena * arena)1595 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceEventBundle >(Arena* arena) {
1596   return Arena::CreateMessageInternal< ::perfetto::protos::FtraceEventBundle >(arena);
1597 }
1598 PROTOBUF_NAMESPACE_CLOSE
1599 
1600 // @@protoc_insertion_point(global_scope)
1601 #include <google/protobuf/port_undef.inc>
1602