1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/cpuhp.proto
3
4 #include "protos/perfetto/trace/ftrace/cpuhp.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 {
CpuhpExitFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR CpuhpExitFtraceEvent::CpuhpExitFtraceEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.cpu_)*/0u
28 , /*decltype(_impl_.idx_)*/0
29 , /*decltype(_impl_.ret_)*/0
30 , /*decltype(_impl_.state_)*/0} {}
31 struct CpuhpExitFtraceEventDefaultTypeInternal {
CpuhpExitFtraceEventDefaultTypeInternalperfetto::protos::CpuhpExitFtraceEventDefaultTypeInternal32 PROTOBUF_CONSTEXPR CpuhpExitFtraceEventDefaultTypeInternal()
33 : _instance(::_pbi::ConstantInitialized{}) {}
~CpuhpExitFtraceEventDefaultTypeInternalperfetto::protos::CpuhpExitFtraceEventDefaultTypeInternal34 ~CpuhpExitFtraceEventDefaultTypeInternal() {}
35 union { // NOLINT(misc-non-private-member-variables-in-classes)
36 CpuhpExitFtraceEvent _instance;
37 };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CpuhpExitFtraceEventDefaultTypeInternal _CpuhpExitFtraceEvent_default_instance_;
CpuhpMultiEnterFtraceEvent(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR CpuhpMultiEnterFtraceEvent::CpuhpMultiEnterFtraceEvent(
41 ::_pbi::ConstantInitialized): _impl_{
42 /*decltype(_impl_._has_bits_)*/{}
43 , /*decltype(_impl_._cached_size_)*/{}
44 , /*decltype(_impl_.fun_)*/::uint64_t{0u}
45 , /*decltype(_impl_.cpu_)*/0u
46 , /*decltype(_impl_.idx_)*/0
47 , /*decltype(_impl_.target_)*/0} {}
48 struct CpuhpMultiEnterFtraceEventDefaultTypeInternal {
CpuhpMultiEnterFtraceEventDefaultTypeInternalperfetto::protos::CpuhpMultiEnterFtraceEventDefaultTypeInternal49 PROTOBUF_CONSTEXPR CpuhpMultiEnterFtraceEventDefaultTypeInternal()
50 : _instance(::_pbi::ConstantInitialized{}) {}
~CpuhpMultiEnterFtraceEventDefaultTypeInternalperfetto::protos::CpuhpMultiEnterFtraceEventDefaultTypeInternal51 ~CpuhpMultiEnterFtraceEventDefaultTypeInternal() {}
52 union { // NOLINT(misc-non-private-member-variables-in-classes)
53 CpuhpMultiEnterFtraceEvent _instance;
54 };
55 };
56 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CpuhpMultiEnterFtraceEventDefaultTypeInternal _CpuhpMultiEnterFtraceEvent_default_instance_;
CpuhpEnterFtraceEvent(::_pbi::ConstantInitialized)57 PROTOBUF_CONSTEXPR CpuhpEnterFtraceEvent::CpuhpEnterFtraceEvent(
58 ::_pbi::ConstantInitialized): _impl_{
59 /*decltype(_impl_._has_bits_)*/{}
60 , /*decltype(_impl_._cached_size_)*/{}
61 , /*decltype(_impl_.fun_)*/::uint64_t{0u}
62 , /*decltype(_impl_.cpu_)*/0u
63 , /*decltype(_impl_.idx_)*/0
64 , /*decltype(_impl_.target_)*/0} {}
65 struct CpuhpEnterFtraceEventDefaultTypeInternal {
CpuhpEnterFtraceEventDefaultTypeInternalperfetto::protos::CpuhpEnterFtraceEventDefaultTypeInternal66 PROTOBUF_CONSTEXPR CpuhpEnterFtraceEventDefaultTypeInternal()
67 : _instance(::_pbi::ConstantInitialized{}) {}
~CpuhpEnterFtraceEventDefaultTypeInternalperfetto::protos::CpuhpEnterFtraceEventDefaultTypeInternal68 ~CpuhpEnterFtraceEventDefaultTypeInternal() {}
69 union { // NOLINT(misc-non-private-member-variables-in-classes)
70 CpuhpEnterFtraceEvent _instance;
71 };
72 };
73 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CpuhpEnterFtraceEventDefaultTypeInternal _CpuhpEnterFtraceEvent_default_instance_;
CpuhpLatencyFtraceEvent(::_pbi::ConstantInitialized)74 PROTOBUF_CONSTEXPR CpuhpLatencyFtraceEvent::CpuhpLatencyFtraceEvent(
75 ::_pbi::ConstantInitialized): _impl_{
76 /*decltype(_impl_._has_bits_)*/{}
77 , /*decltype(_impl_._cached_size_)*/{}
78 , /*decltype(_impl_.cpu_)*/0u
79 , /*decltype(_impl_.ret_)*/0
80 , /*decltype(_impl_.time_)*/::uint64_t{0u}
81 , /*decltype(_impl_.state_)*/0u} {}
82 struct CpuhpLatencyFtraceEventDefaultTypeInternal {
CpuhpLatencyFtraceEventDefaultTypeInternalperfetto::protos::CpuhpLatencyFtraceEventDefaultTypeInternal83 PROTOBUF_CONSTEXPR CpuhpLatencyFtraceEventDefaultTypeInternal()
84 : _instance(::_pbi::ConstantInitialized{}) {}
~CpuhpLatencyFtraceEventDefaultTypeInternalperfetto::protos::CpuhpLatencyFtraceEventDefaultTypeInternal85 ~CpuhpLatencyFtraceEventDefaultTypeInternal() {}
86 union { // NOLINT(misc-non-private-member-variables-in-classes)
87 CpuhpLatencyFtraceEvent _instance;
88 };
89 };
90 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CpuhpLatencyFtraceEventDefaultTypeInternal _CpuhpLatencyFtraceEvent_default_instance_;
CpuhpPauseFtraceEvent(::_pbi::ConstantInitialized)91 PROTOBUF_CONSTEXPR CpuhpPauseFtraceEvent::CpuhpPauseFtraceEvent(
92 ::_pbi::ConstantInitialized): _impl_{
93 /*decltype(_impl_._has_bits_)*/{}
94 , /*decltype(_impl_._cached_size_)*/{}
95 , /*decltype(_impl_.active_cpus_)*/0u
96 , /*decltype(_impl_.cpus_)*/0u
97 , /*decltype(_impl_.pause_)*/0u
98 , /*decltype(_impl_.time_)*/0u} {}
99 struct CpuhpPauseFtraceEventDefaultTypeInternal {
CpuhpPauseFtraceEventDefaultTypeInternalperfetto::protos::CpuhpPauseFtraceEventDefaultTypeInternal100 PROTOBUF_CONSTEXPR CpuhpPauseFtraceEventDefaultTypeInternal()
101 : _instance(::_pbi::ConstantInitialized{}) {}
~CpuhpPauseFtraceEventDefaultTypeInternalperfetto::protos::CpuhpPauseFtraceEventDefaultTypeInternal102 ~CpuhpPauseFtraceEventDefaultTypeInternal() {}
103 union { // NOLINT(misc-non-private-member-variables-in-classes)
104 CpuhpPauseFtraceEvent _instance;
105 };
106 };
107 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CpuhpPauseFtraceEventDefaultTypeInternal _CpuhpPauseFtraceEvent_default_instance_;
108 } // namespace protos
109 } // namespace perfetto
110 namespace perfetto {
111 namespace protos {
112
113 // ===================================================================
114
115 class CpuhpExitFtraceEvent::_Internal {
116 public:
117 using HasBits = decltype(std::declval<CpuhpExitFtraceEvent>()._impl_._has_bits_);
set_has_cpu(HasBits * has_bits)118 static void set_has_cpu(HasBits* has_bits) {
119 (*has_bits)[0] |= 1u;
120 }
set_has_idx(HasBits * has_bits)121 static void set_has_idx(HasBits* has_bits) {
122 (*has_bits)[0] |= 2u;
123 }
set_has_ret(HasBits * has_bits)124 static void set_has_ret(HasBits* has_bits) {
125 (*has_bits)[0] |= 4u;
126 }
set_has_state(HasBits * has_bits)127 static void set_has_state(HasBits* has_bits) {
128 (*has_bits)[0] |= 8u;
129 }
130 };
131
CpuhpExitFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)132 CpuhpExitFtraceEvent::CpuhpExitFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
133 bool is_message_owned)
134 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
135 SharedCtor(arena, is_message_owned);
136 // @@protoc_insertion_point(arena_constructor:perfetto.protos.CpuhpExitFtraceEvent)
137 }
CpuhpExitFtraceEvent(const CpuhpExitFtraceEvent & from)138 CpuhpExitFtraceEvent::CpuhpExitFtraceEvent(const CpuhpExitFtraceEvent& from)
139 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
140 CpuhpExitFtraceEvent* const _this = this; (void)_this;
141 new (&_impl_) Impl_{
142 decltype(_impl_._has_bits_){from._impl_._has_bits_}
143 , /*decltype(_impl_._cached_size_)*/{}
144 , decltype(_impl_.cpu_){}
145 , decltype(_impl_.idx_){}
146 , decltype(_impl_.ret_){}
147 , decltype(_impl_.state_){}};
148
149 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
150 ::memcpy(&_impl_.cpu_, &from._impl_.cpu_,
151 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.state_) -
152 reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.state_));
153 // @@protoc_insertion_point(copy_constructor:perfetto.protos.CpuhpExitFtraceEvent)
154 }
155
SharedCtor(::_pb::Arena * arena,bool is_message_owned)156 inline void CpuhpExitFtraceEvent::SharedCtor(
157 ::_pb::Arena* arena, bool is_message_owned) {
158 (void)arena;
159 (void)is_message_owned;
160 new (&_impl_) Impl_{
161 decltype(_impl_._has_bits_){}
162 , /*decltype(_impl_._cached_size_)*/{}
163 , decltype(_impl_.cpu_){0u}
164 , decltype(_impl_.idx_){0}
165 , decltype(_impl_.ret_){0}
166 , decltype(_impl_.state_){0}
167 };
168 }
169
~CpuhpExitFtraceEvent()170 CpuhpExitFtraceEvent::~CpuhpExitFtraceEvent() {
171 // @@protoc_insertion_point(destructor:perfetto.protos.CpuhpExitFtraceEvent)
172 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
173 (void)arena;
174 return;
175 }
176 SharedDtor();
177 }
178
SharedDtor()179 inline void CpuhpExitFtraceEvent::SharedDtor() {
180 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
181 }
182
SetCachedSize(int size) const183 void CpuhpExitFtraceEvent::SetCachedSize(int size) const {
184 _impl_._cached_size_.Set(size);
185 }
186
Clear()187 void CpuhpExitFtraceEvent::Clear() {
188 // @@protoc_insertion_point(message_clear_start:perfetto.protos.CpuhpExitFtraceEvent)
189 ::uint32_t cached_has_bits = 0;
190 // Prevent compiler warnings about cached_has_bits being unused
191 (void) cached_has_bits;
192
193 cached_has_bits = _impl_._has_bits_[0];
194 if (cached_has_bits & 0x0000000fu) {
195 ::memset(&_impl_.cpu_, 0, static_cast<size_t>(
196 reinterpret_cast<char*>(&_impl_.state_) -
197 reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.state_));
198 }
199 _impl_._has_bits_.Clear();
200 _internal_metadata_.Clear<std::string>();
201 }
202
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)203 const char* CpuhpExitFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
204 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
205 _Internal::HasBits has_bits{};
206 while (!ctx->Done(&ptr)) {
207 ::uint32_t tag;
208 ptr = ::_pbi::ReadTag(ptr, &tag);
209 switch (tag >> 3) {
210 // optional uint32 cpu = 1;
211 case 1:
212 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
213 _Internal::set_has_cpu(&has_bits);
214 _impl_.cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
215 CHK_(ptr);
216 } else {
217 goto handle_unusual;
218 }
219 continue;
220 // optional int32 idx = 2;
221 case 2:
222 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
223 _Internal::set_has_idx(&has_bits);
224 _impl_.idx_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
225 CHK_(ptr);
226 } else {
227 goto handle_unusual;
228 }
229 continue;
230 // optional int32 ret = 3;
231 case 3:
232 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
233 _Internal::set_has_ret(&has_bits);
234 _impl_.ret_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
235 CHK_(ptr);
236 } else {
237 goto handle_unusual;
238 }
239 continue;
240 // optional int32 state = 4;
241 case 4:
242 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
243 _Internal::set_has_state(&has_bits);
244 _impl_.state_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
245 CHK_(ptr);
246 } else {
247 goto handle_unusual;
248 }
249 continue;
250 default:
251 goto handle_unusual;
252 } // switch
253 handle_unusual:
254 if ((tag == 0) || ((tag & 7) == 4)) {
255 CHK_(ptr);
256 ctx->SetLastTag(tag);
257 goto message_done;
258 }
259 ptr = UnknownFieldParse(
260 tag,
261 _internal_metadata_.mutable_unknown_fields<std::string>(),
262 ptr, ctx);
263 CHK_(ptr != nullptr);
264 } // while
265 message_done:
266 _impl_._has_bits_.Or(has_bits);
267 return ptr;
268 failure:
269 ptr = nullptr;
270 goto message_done;
271 #undef CHK_
272 }
273
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const274 ::uint8_t* CpuhpExitFtraceEvent::_InternalSerialize(
275 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
276 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.CpuhpExitFtraceEvent)
277 ::uint32_t cached_has_bits = 0;
278 (void) cached_has_bits;
279
280 cached_has_bits = _impl_._has_bits_[0];
281 // optional uint32 cpu = 1;
282 if (cached_has_bits & 0x00000001u) {
283 target = stream->EnsureSpace(target);
284 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cpu(), target);
285 }
286
287 // optional int32 idx = 2;
288 if (cached_has_bits & 0x00000002u) {
289 target = stream->EnsureSpace(target);
290 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_idx(), target);
291 }
292
293 // optional int32 ret = 3;
294 if (cached_has_bits & 0x00000004u) {
295 target = stream->EnsureSpace(target);
296 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_ret(), target);
297 }
298
299 // optional int32 state = 4;
300 if (cached_has_bits & 0x00000008u) {
301 target = stream->EnsureSpace(target);
302 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_state(), target);
303 }
304
305 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
306 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
307 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
308 }
309 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.CpuhpExitFtraceEvent)
310 return target;
311 }
312
ByteSizeLong() const313 size_t CpuhpExitFtraceEvent::ByteSizeLong() const {
314 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.CpuhpExitFtraceEvent)
315 size_t total_size = 0;
316
317 ::uint32_t cached_has_bits = 0;
318 // Prevent compiler warnings about cached_has_bits being unused
319 (void) cached_has_bits;
320
321 cached_has_bits = _impl_._has_bits_[0];
322 if (cached_has_bits & 0x0000000fu) {
323 // optional uint32 cpu = 1;
324 if (cached_has_bits & 0x00000001u) {
325 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpu());
326 }
327
328 // optional int32 idx = 2;
329 if (cached_has_bits & 0x00000002u) {
330 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_idx());
331 }
332
333 // optional int32 ret = 3;
334 if (cached_has_bits & 0x00000004u) {
335 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_ret());
336 }
337
338 // optional int32 state = 4;
339 if (cached_has_bits & 0x00000008u) {
340 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_state());
341 }
342
343 }
344 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
345 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
346 }
347 int cached_size = ::_pbi::ToCachedSize(total_size);
348 SetCachedSize(cached_size);
349 return total_size;
350 }
351
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)352 void CpuhpExitFtraceEvent::CheckTypeAndMergeFrom(
353 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
354 MergeFrom(*::_pbi::DownCast<const CpuhpExitFtraceEvent*>(
355 &from));
356 }
357
MergeFrom(const CpuhpExitFtraceEvent & from)358 void CpuhpExitFtraceEvent::MergeFrom(const CpuhpExitFtraceEvent& from) {
359 CpuhpExitFtraceEvent* const _this = this;
360 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.CpuhpExitFtraceEvent)
361 GOOGLE_DCHECK_NE(&from, _this);
362 ::uint32_t cached_has_bits = 0;
363 (void) cached_has_bits;
364
365 cached_has_bits = from._impl_._has_bits_[0];
366 if (cached_has_bits & 0x0000000fu) {
367 if (cached_has_bits & 0x00000001u) {
368 _this->_impl_.cpu_ = from._impl_.cpu_;
369 }
370 if (cached_has_bits & 0x00000002u) {
371 _this->_impl_.idx_ = from._impl_.idx_;
372 }
373 if (cached_has_bits & 0x00000004u) {
374 _this->_impl_.ret_ = from._impl_.ret_;
375 }
376 if (cached_has_bits & 0x00000008u) {
377 _this->_impl_.state_ = from._impl_.state_;
378 }
379 _this->_impl_._has_bits_[0] |= cached_has_bits;
380 }
381 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
382 }
383
CopyFrom(const CpuhpExitFtraceEvent & from)384 void CpuhpExitFtraceEvent::CopyFrom(const CpuhpExitFtraceEvent& from) {
385 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.CpuhpExitFtraceEvent)
386 if (&from == this) return;
387 Clear();
388 MergeFrom(from);
389 }
390
IsInitialized() const391 bool CpuhpExitFtraceEvent::IsInitialized() const {
392 return true;
393 }
394
InternalSwap(CpuhpExitFtraceEvent * other)395 void CpuhpExitFtraceEvent::InternalSwap(CpuhpExitFtraceEvent* other) {
396 using std::swap;
397 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
398 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
399 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
400 PROTOBUF_FIELD_OFFSET(CpuhpExitFtraceEvent, _impl_.state_)
401 + sizeof(CpuhpExitFtraceEvent::_impl_.state_) // NOLINT
402 - PROTOBUF_FIELD_OFFSET(CpuhpExitFtraceEvent, _impl_.cpu_)>(
403 reinterpret_cast<char*>(&_impl_.cpu_),
404 reinterpret_cast<char*>(&other->_impl_.cpu_));
405 }
406
GetTypeName() const407 std::string CpuhpExitFtraceEvent::GetTypeName() const {
408 return "perfetto.protos.CpuhpExitFtraceEvent";
409 }
410
411
412 // ===================================================================
413
414 class CpuhpMultiEnterFtraceEvent::_Internal {
415 public:
416 using HasBits = decltype(std::declval<CpuhpMultiEnterFtraceEvent>()._impl_._has_bits_);
set_has_cpu(HasBits * has_bits)417 static void set_has_cpu(HasBits* has_bits) {
418 (*has_bits)[0] |= 2u;
419 }
set_has_fun(HasBits * has_bits)420 static void set_has_fun(HasBits* has_bits) {
421 (*has_bits)[0] |= 1u;
422 }
set_has_idx(HasBits * has_bits)423 static void set_has_idx(HasBits* has_bits) {
424 (*has_bits)[0] |= 4u;
425 }
set_has_target(HasBits * has_bits)426 static void set_has_target(HasBits* has_bits) {
427 (*has_bits)[0] |= 8u;
428 }
429 };
430
CpuhpMultiEnterFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)431 CpuhpMultiEnterFtraceEvent::CpuhpMultiEnterFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
432 bool is_message_owned)
433 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
434 SharedCtor(arena, is_message_owned);
435 // @@protoc_insertion_point(arena_constructor:perfetto.protos.CpuhpMultiEnterFtraceEvent)
436 }
CpuhpMultiEnterFtraceEvent(const CpuhpMultiEnterFtraceEvent & from)437 CpuhpMultiEnterFtraceEvent::CpuhpMultiEnterFtraceEvent(const CpuhpMultiEnterFtraceEvent& from)
438 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
439 CpuhpMultiEnterFtraceEvent* const _this = this; (void)_this;
440 new (&_impl_) Impl_{
441 decltype(_impl_._has_bits_){from._impl_._has_bits_}
442 , /*decltype(_impl_._cached_size_)*/{}
443 , decltype(_impl_.fun_){}
444 , decltype(_impl_.cpu_){}
445 , decltype(_impl_.idx_){}
446 , decltype(_impl_.target_){}};
447
448 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
449 ::memcpy(&_impl_.fun_, &from._impl_.fun_,
450 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.target_) -
451 reinterpret_cast<char*>(&_impl_.fun_)) + sizeof(_impl_.target_));
452 // @@protoc_insertion_point(copy_constructor:perfetto.protos.CpuhpMultiEnterFtraceEvent)
453 }
454
SharedCtor(::_pb::Arena * arena,bool is_message_owned)455 inline void CpuhpMultiEnterFtraceEvent::SharedCtor(
456 ::_pb::Arena* arena, bool is_message_owned) {
457 (void)arena;
458 (void)is_message_owned;
459 new (&_impl_) Impl_{
460 decltype(_impl_._has_bits_){}
461 , /*decltype(_impl_._cached_size_)*/{}
462 , decltype(_impl_.fun_){::uint64_t{0u}}
463 , decltype(_impl_.cpu_){0u}
464 , decltype(_impl_.idx_){0}
465 , decltype(_impl_.target_){0}
466 };
467 }
468
~CpuhpMultiEnterFtraceEvent()469 CpuhpMultiEnterFtraceEvent::~CpuhpMultiEnterFtraceEvent() {
470 // @@protoc_insertion_point(destructor:perfetto.protos.CpuhpMultiEnterFtraceEvent)
471 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
472 (void)arena;
473 return;
474 }
475 SharedDtor();
476 }
477
SharedDtor()478 inline void CpuhpMultiEnterFtraceEvent::SharedDtor() {
479 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
480 }
481
SetCachedSize(int size) const482 void CpuhpMultiEnterFtraceEvent::SetCachedSize(int size) const {
483 _impl_._cached_size_.Set(size);
484 }
485
Clear()486 void CpuhpMultiEnterFtraceEvent::Clear() {
487 // @@protoc_insertion_point(message_clear_start:perfetto.protos.CpuhpMultiEnterFtraceEvent)
488 ::uint32_t cached_has_bits = 0;
489 // Prevent compiler warnings about cached_has_bits being unused
490 (void) cached_has_bits;
491
492 cached_has_bits = _impl_._has_bits_[0];
493 if (cached_has_bits & 0x0000000fu) {
494 ::memset(&_impl_.fun_, 0, static_cast<size_t>(
495 reinterpret_cast<char*>(&_impl_.target_) -
496 reinterpret_cast<char*>(&_impl_.fun_)) + sizeof(_impl_.target_));
497 }
498 _impl_._has_bits_.Clear();
499 _internal_metadata_.Clear<std::string>();
500 }
501
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)502 const char* CpuhpMultiEnterFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
503 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
504 _Internal::HasBits has_bits{};
505 while (!ctx->Done(&ptr)) {
506 ::uint32_t tag;
507 ptr = ::_pbi::ReadTag(ptr, &tag);
508 switch (tag >> 3) {
509 // optional uint32 cpu = 1;
510 case 1:
511 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
512 _Internal::set_has_cpu(&has_bits);
513 _impl_.cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
514 CHK_(ptr);
515 } else {
516 goto handle_unusual;
517 }
518 continue;
519 // optional uint64 fun = 2;
520 case 2:
521 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
522 _Internal::set_has_fun(&has_bits);
523 _impl_.fun_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
524 CHK_(ptr);
525 } else {
526 goto handle_unusual;
527 }
528 continue;
529 // optional int32 idx = 3;
530 case 3:
531 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
532 _Internal::set_has_idx(&has_bits);
533 _impl_.idx_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
534 CHK_(ptr);
535 } else {
536 goto handle_unusual;
537 }
538 continue;
539 // optional int32 target = 4;
540 case 4:
541 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
542 _Internal::set_has_target(&has_bits);
543 _impl_.target_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
544 CHK_(ptr);
545 } else {
546 goto handle_unusual;
547 }
548 continue;
549 default:
550 goto handle_unusual;
551 } // switch
552 handle_unusual:
553 if ((tag == 0) || ((tag & 7) == 4)) {
554 CHK_(ptr);
555 ctx->SetLastTag(tag);
556 goto message_done;
557 }
558 ptr = UnknownFieldParse(
559 tag,
560 _internal_metadata_.mutable_unknown_fields<std::string>(),
561 ptr, ctx);
562 CHK_(ptr != nullptr);
563 } // while
564 message_done:
565 _impl_._has_bits_.Or(has_bits);
566 return ptr;
567 failure:
568 ptr = nullptr;
569 goto message_done;
570 #undef CHK_
571 }
572
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const573 ::uint8_t* CpuhpMultiEnterFtraceEvent::_InternalSerialize(
574 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
575 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.CpuhpMultiEnterFtraceEvent)
576 ::uint32_t cached_has_bits = 0;
577 (void) cached_has_bits;
578
579 cached_has_bits = _impl_._has_bits_[0];
580 // optional uint32 cpu = 1;
581 if (cached_has_bits & 0x00000002u) {
582 target = stream->EnsureSpace(target);
583 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cpu(), target);
584 }
585
586 // optional uint64 fun = 2;
587 if (cached_has_bits & 0x00000001u) {
588 target = stream->EnsureSpace(target);
589 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_fun(), target);
590 }
591
592 // optional int32 idx = 3;
593 if (cached_has_bits & 0x00000004u) {
594 target = stream->EnsureSpace(target);
595 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_idx(), target);
596 }
597
598 // optional int32 target = 4;
599 if (cached_has_bits & 0x00000008u) {
600 target = stream->EnsureSpace(target);
601 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_target(), target);
602 }
603
604 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
605 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
606 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
607 }
608 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.CpuhpMultiEnterFtraceEvent)
609 return target;
610 }
611
ByteSizeLong() const612 size_t CpuhpMultiEnterFtraceEvent::ByteSizeLong() const {
613 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.CpuhpMultiEnterFtraceEvent)
614 size_t total_size = 0;
615
616 ::uint32_t cached_has_bits = 0;
617 // Prevent compiler warnings about cached_has_bits being unused
618 (void) cached_has_bits;
619
620 cached_has_bits = _impl_._has_bits_[0];
621 if (cached_has_bits & 0x0000000fu) {
622 // optional uint64 fun = 2;
623 if (cached_has_bits & 0x00000001u) {
624 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_fun());
625 }
626
627 // optional uint32 cpu = 1;
628 if (cached_has_bits & 0x00000002u) {
629 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpu());
630 }
631
632 // optional int32 idx = 3;
633 if (cached_has_bits & 0x00000004u) {
634 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_idx());
635 }
636
637 // optional int32 target = 4;
638 if (cached_has_bits & 0x00000008u) {
639 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_target());
640 }
641
642 }
643 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
644 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
645 }
646 int cached_size = ::_pbi::ToCachedSize(total_size);
647 SetCachedSize(cached_size);
648 return total_size;
649 }
650
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)651 void CpuhpMultiEnterFtraceEvent::CheckTypeAndMergeFrom(
652 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
653 MergeFrom(*::_pbi::DownCast<const CpuhpMultiEnterFtraceEvent*>(
654 &from));
655 }
656
MergeFrom(const CpuhpMultiEnterFtraceEvent & from)657 void CpuhpMultiEnterFtraceEvent::MergeFrom(const CpuhpMultiEnterFtraceEvent& from) {
658 CpuhpMultiEnterFtraceEvent* const _this = this;
659 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.CpuhpMultiEnterFtraceEvent)
660 GOOGLE_DCHECK_NE(&from, _this);
661 ::uint32_t cached_has_bits = 0;
662 (void) cached_has_bits;
663
664 cached_has_bits = from._impl_._has_bits_[0];
665 if (cached_has_bits & 0x0000000fu) {
666 if (cached_has_bits & 0x00000001u) {
667 _this->_impl_.fun_ = from._impl_.fun_;
668 }
669 if (cached_has_bits & 0x00000002u) {
670 _this->_impl_.cpu_ = from._impl_.cpu_;
671 }
672 if (cached_has_bits & 0x00000004u) {
673 _this->_impl_.idx_ = from._impl_.idx_;
674 }
675 if (cached_has_bits & 0x00000008u) {
676 _this->_impl_.target_ = from._impl_.target_;
677 }
678 _this->_impl_._has_bits_[0] |= cached_has_bits;
679 }
680 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
681 }
682
CopyFrom(const CpuhpMultiEnterFtraceEvent & from)683 void CpuhpMultiEnterFtraceEvent::CopyFrom(const CpuhpMultiEnterFtraceEvent& from) {
684 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.CpuhpMultiEnterFtraceEvent)
685 if (&from == this) return;
686 Clear();
687 MergeFrom(from);
688 }
689
IsInitialized() const690 bool CpuhpMultiEnterFtraceEvent::IsInitialized() const {
691 return true;
692 }
693
InternalSwap(CpuhpMultiEnterFtraceEvent * other)694 void CpuhpMultiEnterFtraceEvent::InternalSwap(CpuhpMultiEnterFtraceEvent* other) {
695 using std::swap;
696 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
697 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
698 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
699 PROTOBUF_FIELD_OFFSET(CpuhpMultiEnterFtraceEvent, _impl_.target_)
700 + sizeof(CpuhpMultiEnterFtraceEvent::_impl_.target_) // NOLINT
701 - PROTOBUF_FIELD_OFFSET(CpuhpMultiEnterFtraceEvent, _impl_.fun_)>(
702 reinterpret_cast<char*>(&_impl_.fun_),
703 reinterpret_cast<char*>(&other->_impl_.fun_));
704 }
705
GetTypeName() const706 std::string CpuhpMultiEnterFtraceEvent::GetTypeName() const {
707 return "perfetto.protos.CpuhpMultiEnterFtraceEvent";
708 }
709
710
711 // ===================================================================
712
713 class CpuhpEnterFtraceEvent::_Internal {
714 public:
715 using HasBits = decltype(std::declval<CpuhpEnterFtraceEvent>()._impl_._has_bits_);
set_has_cpu(HasBits * has_bits)716 static void set_has_cpu(HasBits* has_bits) {
717 (*has_bits)[0] |= 2u;
718 }
set_has_fun(HasBits * has_bits)719 static void set_has_fun(HasBits* has_bits) {
720 (*has_bits)[0] |= 1u;
721 }
set_has_idx(HasBits * has_bits)722 static void set_has_idx(HasBits* has_bits) {
723 (*has_bits)[0] |= 4u;
724 }
set_has_target(HasBits * has_bits)725 static void set_has_target(HasBits* has_bits) {
726 (*has_bits)[0] |= 8u;
727 }
728 };
729
CpuhpEnterFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)730 CpuhpEnterFtraceEvent::CpuhpEnterFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
731 bool is_message_owned)
732 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
733 SharedCtor(arena, is_message_owned);
734 // @@protoc_insertion_point(arena_constructor:perfetto.protos.CpuhpEnterFtraceEvent)
735 }
CpuhpEnterFtraceEvent(const CpuhpEnterFtraceEvent & from)736 CpuhpEnterFtraceEvent::CpuhpEnterFtraceEvent(const CpuhpEnterFtraceEvent& from)
737 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
738 CpuhpEnterFtraceEvent* const _this = this; (void)_this;
739 new (&_impl_) Impl_{
740 decltype(_impl_._has_bits_){from._impl_._has_bits_}
741 , /*decltype(_impl_._cached_size_)*/{}
742 , decltype(_impl_.fun_){}
743 , decltype(_impl_.cpu_){}
744 , decltype(_impl_.idx_){}
745 , decltype(_impl_.target_){}};
746
747 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
748 ::memcpy(&_impl_.fun_, &from._impl_.fun_,
749 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.target_) -
750 reinterpret_cast<char*>(&_impl_.fun_)) + sizeof(_impl_.target_));
751 // @@protoc_insertion_point(copy_constructor:perfetto.protos.CpuhpEnterFtraceEvent)
752 }
753
SharedCtor(::_pb::Arena * arena,bool is_message_owned)754 inline void CpuhpEnterFtraceEvent::SharedCtor(
755 ::_pb::Arena* arena, bool is_message_owned) {
756 (void)arena;
757 (void)is_message_owned;
758 new (&_impl_) Impl_{
759 decltype(_impl_._has_bits_){}
760 , /*decltype(_impl_._cached_size_)*/{}
761 , decltype(_impl_.fun_){::uint64_t{0u}}
762 , decltype(_impl_.cpu_){0u}
763 , decltype(_impl_.idx_){0}
764 , decltype(_impl_.target_){0}
765 };
766 }
767
~CpuhpEnterFtraceEvent()768 CpuhpEnterFtraceEvent::~CpuhpEnterFtraceEvent() {
769 // @@protoc_insertion_point(destructor:perfetto.protos.CpuhpEnterFtraceEvent)
770 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
771 (void)arena;
772 return;
773 }
774 SharedDtor();
775 }
776
SharedDtor()777 inline void CpuhpEnterFtraceEvent::SharedDtor() {
778 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
779 }
780
SetCachedSize(int size) const781 void CpuhpEnterFtraceEvent::SetCachedSize(int size) const {
782 _impl_._cached_size_.Set(size);
783 }
784
Clear()785 void CpuhpEnterFtraceEvent::Clear() {
786 // @@protoc_insertion_point(message_clear_start:perfetto.protos.CpuhpEnterFtraceEvent)
787 ::uint32_t cached_has_bits = 0;
788 // Prevent compiler warnings about cached_has_bits being unused
789 (void) cached_has_bits;
790
791 cached_has_bits = _impl_._has_bits_[0];
792 if (cached_has_bits & 0x0000000fu) {
793 ::memset(&_impl_.fun_, 0, static_cast<size_t>(
794 reinterpret_cast<char*>(&_impl_.target_) -
795 reinterpret_cast<char*>(&_impl_.fun_)) + sizeof(_impl_.target_));
796 }
797 _impl_._has_bits_.Clear();
798 _internal_metadata_.Clear<std::string>();
799 }
800
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)801 const char* CpuhpEnterFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
802 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
803 _Internal::HasBits has_bits{};
804 while (!ctx->Done(&ptr)) {
805 ::uint32_t tag;
806 ptr = ::_pbi::ReadTag(ptr, &tag);
807 switch (tag >> 3) {
808 // optional uint32 cpu = 1;
809 case 1:
810 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
811 _Internal::set_has_cpu(&has_bits);
812 _impl_.cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
813 CHK_(ptr);
814 } else {
815 goto handle_unusual;
816 }
817 continue;
818 // optional uint64 fun = 2;
819 case 2:
820 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
821 _Internal::set_has_fun(&has_bits);
822 _impl_.fun_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
823 CHK_(ptr);
824 } else {
825 goto handle_unusual;
826 }
827 continue;
828 // optional int32 idx = 3;
829 case 3:
830 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
831 _Internal::set_has_idx(&has_bits);
832 _impl_.idx_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
833 CHK_(ptr);
834 } else {
835 goto handle_unusual;
836 }
837 continue;
838 // optional int32 target = 4;
839 case 4:
840 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
841 _Internal::set_has_target(&has_bits);
842 _impl_.target_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
843 CHK_(ptr);
844 } else {
845 goto handle_unusual;
846 }
847 continue;
848 default:
849 goto handle_unusual;
850 } // switch
851 handle_unusual:
852 if ((tag == 0) || ((tag & 7) == 4)) {
853 CHK_(ptr);
854 ctx->SetLastTag(tag);
855 goto message_done;
856 }
857 ptr = UnknownFieldParse(
858 tag,
859 _internal_metadata_.mutable_unknown_fields<std::string>(),
860 ptr, ctx);
861 CHK_(ptr != nullptr);
862 } // while
863 message_done:
864 _impl_._has_bits_.Or(has_bits);
865 return ptr;
866 failure:
867 ptr = nullptr;
868 goto message_done;
869 #undef CHK_
870 }
871
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const872 ::uint8_t* CpuhpEnterFtraceEvent::_InternalSerialize(
873 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
874 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.CpuhpEnterFtraceEvent)
875 ::uint32_t cached_has_bits = 0;
876 (void) cached_has_bits;
877
878 cached_has_bits = _impl_._has_bits_[0];
879 // optional uint32 cpu = 1;
880 if (cached_has_bits & 0x00000002u) {
881 target = stream->EnsureSpace(target);
882 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cpu(), target);
883 }
884
885 // optional uint64 fun = 2;
886 if (cached_has_bits & 0x00000001u) {
887 target = stream->EnsureSpace(target);
888 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_fun(), target);
889 }
890
891 // optional int32 idx = 3;
892 if (cached_has_bits & 0x00000004u) {
893 target = stream->EnsureSpace(target);
894 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_idx(), target);
895 }
896
897 // optional int32 target = 4;
898 if (cached_has_bits & 0x00000008u) {
899 target = stream->EnsureSpace(target);
900 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_target(), target);
901 }
902
903 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
904 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
905 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
906 }
907 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.CpuhpEnterFtraceEvent)
908 return target;
909 }
910
ByteSizeLong() const911 size_t CpuhpEnterFtraceEvent::ByteSizeLong() const {
912 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.CpuhpEnterFtraceEvent)
913 size_t total_size = 0;
914
915 ::uint32_t cached_has_bits = 0;
916 // Prevent compiler warnings about cached_has_bits being unused
917 (void) cached_has_bits;
918
919 cached_has_bits = _impl_._has_bits_[0];
920 if (cached_has_bits & 0x0000000fu) {
921 // optional uint64 fun = 2;
922 if (cached_has_bits & 0x00000001u) {
923 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_fun());
924 }
925
926 // optional uint32 cpu = 1;
927 if (cached_has_bits & 0x00000002u) {
928 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpu());
929 }
930
931 // optional int32 idx = 3;
932 if (cached_has_bits & 0x00000004u) {
933 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_idx());
934 }
935
936 // optional int32 target = 4;
937 if (cached_has_bits & 0x00000008u) {
938 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_target());
939 }
940
941 }
942 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
943 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
944 }
945 int cached_size = ::_pbi::ToCachedSize(total_size);
946 SetCachedSize(cached_size);
947 return total_size;
948 }
949
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)950 void CpuhpEnterFtraceEvent::CheckTypeAndMergeFrom(
951 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
952 MergeFrom(*::_pbi::DownCast<const CpuhpEnterFtraceEvent*>(
953 &from));
954 }
955
MergeFrom(const CpuhpEnterFtraceEvent & from)956 void CpuhpEnterFtraceEvent::MergeFrom(const CpuhpEnterFtraceEvent& from) {
957 CpuhpEnterFtraceEvent* const _this = this;
958 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.CpuhpEnterFtraceEvent)
959 GOOGLE_DCHECK_NE(&from, _this);
960 ::uint32_t cached_has_bits = 0;
961 (void) cached_has_bits;
962
963 cached_has_bits = from._impl_._has_bits_[0];
964 if (cached_has_bits & 0x0000000fu) {
965 if (cached_has_bits & 0x00000001u) {
966 _this->_impl_.fun_ = from._impl_.fun_;
967 }
968 if (cached_has_bits & 0x00000002u) {
969 _this->_impl_.cpu_ = from._impl_.cpu_;
970 }
971 if (cached_has_bits & 0x00000004u) {
972 _this->_impl_.idx_ = from._impl_.idx_;
973 }
974 if (cached_has_bits & 0x00000008u) {
975 _this->_impl_.target_ = from._impl_.target_;
976 }
977 _this->_impl_._has_bits_[0] |= cached_has_bits;
978 }
979 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
980 }
981
CopyFrom(const CpuhpEnterFtraceEvent & from)982 void CpuhpEnterFtraceEvent::CopyFrom(const CpuhpEnterFtraceEvent& from) {
983 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.CpuhpEnterFtraceEvent)
984 if (&from == this) return;
985 Clear();
986 MergeFrom(from);
987 }
988
IsInitialized() const989 bool CpuhpEnterFtraceEvent::IsInitialized() const {
990 return true;
991 }
992
InternalSwap(CpuhpEnterFtraceEvent * other)993 void CpuhpEnterFtraceEvent::InternalSwap(CpuhpEnterFtraceEvent* other) {
994 using std::swap;
995 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
996 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
997 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
998 PROTOBUF_FIELD_OFFSET(CpuhpEnterFtraceEvent, _impl_.target_)
999 + sizeof(CpuhpEnterFtraceEvent::_impl_.target_) // NOLINT
1000 - PROTOBUF_FIELD_OFFSET(CpuhpEnterFtraceEvent, _impl_.fun_)>(
1001 reinterpret_cast<char*>(&_impl_.fun_),
1002 reinterpret_cast<char*>(&other->_impl_.fun_));
1003 }
1004
GetTypeName() const1005 std::string CpuhpEnterFtraceEvent::GetTypeName() const {
1006 return "perfetto.protos.CpuhpEnterFtraceEvent";
1007 }
1008
1009
1010 // ===================================================================
1011
1012 class CpuhpLatencyFtraceEvent::_Internal {
1013 public:
1014 using HasBits = decltype(std::declval<CpuhpLatencyFtraceEvent>()._impl_._has_bits_);
set_has_cpu(HasBits * has_bits)1015 static void set_has_cpu(HasBits* has_bits) {
1016 (*has_bits)[0] |= 1u;
1017 }
set_has_ret(HasBits * has_bits)1018 static void set_has_ret(HasBits* has_bits) {
1019 (*has_bits)[0] |= 2u;
1020 }
set_has_state(HasBits * has_bits)1021 static void set_has_state(HasBits* has_bits) {
1022 (*has_bits)[0] |= 8u;
1023 }
set_has_time(HasBits * has_bits)1024 static void set_has_time(HasBits* has_bits) {
1025 (*has_bits)[0] |= 4u;
1026 }
1027 };
1028
CpuhpLatencyFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1029 CpuhpLatencyFtraceEvent::CpuhpLatencyFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1030 bool is_message_owned)
1031 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1032 SharedCtor(arena, is_message_owned);
1033 // @@protoc_insertion_point(arena_constructor:perfetto.protos.CpuhpLatencyFtraceEvent)
1034 }
CpuhpLatencyFtraceEvent(const CpuhpLatencyFtraceEvent & from)1035 CpuhpLatencyFtraceEvent::CpuhpLatencyFtraceEvent(const CpuhpLatencyFtraceEvent& from)
1036 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1037 CpuhpLatencyFtraceEvent* const _this = this; (void)_this;
1038 new (&_impl_) Impl_{
1039 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1040 , /*decltype(_impl_._cached_size_)*/{}
1041 , decltype(_impl_.cpu_){}
1042 , decltype(_impl_.ret_){}
1043 , decltype(_impl_.time_){}
1044 , decltype(_impl_.state_){}};
1045
1046 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1047 ::memcpy(&_impl_.cpu_, &from._impl_.cpu_,
1048 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.state_) -
1049 reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.state_));
1050 // @@protoc_insertion_point(copy_constructor:perfetto.protos.CpuhpLatencyFtraceEvent)
1051 }
1052
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1053 inline void CpuhpLatencyFtraceEvent::SharedCtor(
1054 ::_pb::Arena* arena, bool is_message_owned) {
1055 (void)arena;
1056 (void)is_message_owned;
1057 new (&_impl_) Impl_{
1058 decltype(_impl_._has_bits_){}
1059 , /*decltype(_impl_._cached_size_)*/{}
1060 , decltype(_impl_.cpu_){0u}
1061 , decltype(_impl_.ret_){0}
1062 , decltype(_impl_.time_){::uint64_t{0u}}
1063 , decltype(_impl_.state_){0u}
1064 };
1065 }
1066
~CpuhpLatencyFtraceEvent()1067 CpuhpLatencyFtraceEvent::~CpuhpLatencyFtraceEvent() {
1068 // @@protoc_insertion_point(destructor:perfetto.protos.CpuhpLatencyFtraceEvent)
1069 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1070 (void)arena;
1071 return;
1072 }
1073 SharedDtor();
1074 }
1075
SharedDtor()1076 inline void CpuhpLatencyFtraceEvent::SharedDtor() {
1077 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1078 }
1079
SetCachedSize(int size) const1080 void CpuhpLatencyFtraceEvent::SetCachedSize(int size) const {
1081 _impl_._cached_size_.Set(size);
1082 }
1083
Clear()1084 void CpuhpLatencyFtraceEvent::Clear() {
1085 // @@protoc_insertion_point(message_clear_start:perfetto.protos.CpuhpLatencyFtraceEvent)
1086 ::uint32_t cached_has_bits = 0;
1087 // Prevent compiler warnings about cached_has_bits being unused
1088 (void) cached_has_bits;
1089
1090 cached_has_bits = _impl_._has_bits_[0];
1091 if (cached_has_bits & 0x0000000fu) {
1092 ::memset(&_impl_.cpu_, 0, static_cast<size_t>(
1093 reinterpret_cast<char*>(&_impl_.state_) -
1094 reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.state_));
1095 }
1096 _impl_._has_bits_.Clear();
1097 _internal_metadata_.Clear<std::string>();
1098 }
1099
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1100 const char* CpuhpLatencyFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1101 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1102 _Internal::HasBits has_bits{};
1103 while (!ctx->Done(&ptr)) {
1104 ::uint32_t tag;
1105 ptr = ::_pbi::ReadTag(ptr, &tag);
1106 switch (tag >> 3) {
1107 // optional uint32 cpu = 1;
1108 case 1:
1109 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1110 _Internal::set_has_cpu(&has_bits);
1111 _impl_.cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1112 CHK_(ptr);
1113 } else {
1114 goto handle_unusual;
1115 }
1116 continue;
1117 // optional int32 ret = 2;
1118 case 2:
1119 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1120 _Internal::set_has_ret(&has_bits);
1121 _impl_.ret_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1122 CHK_(ptr);
1123 } else {
1124 goto handle_unusual;
1125 }
1126 continue;
1127 // optional uint32 state = 3;
1128 case 3:
1129 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1130 _Internal::set_has_state(&has_bits);
1131 _impl_.state_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1132 CHK_(ptr);
1133 } else {
1134 goto handle_unusual;
1135 }
1136 continue;
1137 // optional uint64 time = 4;
1138 case 4:
1139 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1140 _Internal::set_has_time(&has_bits);
1141 _impl_.time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1142 CHK_(ptr);
1143 } else {
1144 goto handle_unusual;
1145 }
1146 continue;
1147 default:
1148 goto handle_unusual;
1149 } // switch
1150 handle_unusual:
1151 if ((tag == 0) || ((tag & 7) == 4)) {
1152 CHK_(ptr);
1153 ctx->SetLastTag(tag);
1154 goto message_done;
1155 }
1156 ptr = UnknownFieldParse(
1157 tag,
1158 _internal_metadata_.mutable_unknown_fields<std::string>(),
1159 ptr, ctx);
1160 CHK_(ptr != nullptr);
1161 } // while
1162 message_done:
1163 _impl_._has_bits_.Or(has_bits);
1164 return ptr;
1165 failure:
1166 ptr = nullptr;
1167 goto message_done;
1168 #undef CHK_
1169 }
1170
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1171 ::uint8_t* CpuhpLatencyFtraceEvent::_InternalSerialize(
1172 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1173 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.CpuhpLatencyFtraceEvent)
1174 ::uint32_t cached_has_bits = 0;
1175 (void) cached_has_bits;
1176
1177 cached_has_bits = _impl_._has_bits_[0];
1178 // optional uint32 cpu = 1;
1179 if (cached_has_bits & 0x00000001u) {
1180 target = stream->EnsureSpace(target);
1181 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cpu(), target);
1182 }
1183
1184 // optional int32 ret = 2;
1185 if (cached_has_bits & 0x00000002u) {
1186 target = stream->EnsureSpace(target);
1187 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_ret(), target);
1188 }
1189
1190 // optional uint32 state = 3;
1191 if (cached_has_bits & 0x00000008u) {
1192 target = stream->EnsureSpace(target);
1193 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_state(), target);
1194 }
1195
1196 // optional uint64 time = 4;
1197 if (cached_has_bits & 0x00000004u) {
1198 target = stream->EnsureSpace(target);
1199 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_time(), target);
1200 }
1201
1202 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1203 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1204 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1205 }
1206 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.CpuhpLatencyFtraceEvent)
1207 return target;
1208 }
1209
ByteSizeLong() const1210 size_t CpuhpLatencyFtraceEvent::ByteSizeLong() const {
1211 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.CpuhpLatencyFtraceEvent)
1212 size_t total_size = 0;
1213
1214 ::uint32_t cached_has_bits = 0;
1215 // Prevent compiler warnings about cached_has_bits being unused
1216 (void) cached_has_bits;
1217
1218 cached_has_bits = _impl_._has_bits_[0];
1219 if (cached_has_bits & 0x0000000fu) {
1220 // optional uint32 cpu = 1;
1221 if (cached_has_bits & 0x00000001u) {
1222 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpu());
1223 }
1224
1225 // optional int32 ret = 2;
1226 if (cached_has_bits & 0x00000002u) {
1227 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_ret());
1228 }
1229
1230 // optional uint64 time = 4;
1231 if (cached_has_bits & 0x00000004u) {
1232 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_time());
1233 }
1234
1235 // optional uint32 state = 3;
1236 if (cached_has_bits & 0x00000008u) {
1237 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_state());
1238 }
1239
1240 }
1241 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1242 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1243 }
1244 int cached_size = ::_pbi::ToCachedSize(total_size);
1245 SetCachedSize(cached_size);
1246 return total_size;
1247 }
1248
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1249 void CpuhpLatencyFtraceEvent::CheckTypeAndMergeFrom(
1250 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1251 MergeFrom(*::_pbi::DownCast<const CpuhpLatencyFtraceEvent*>(
1252 &from));
1253 }
1254
MergeFrom(const CpuhpLatencyFtraceEvent & from)1255 void CpuhpLatencyFtraceEvent::MergeFrom(const CpuhpLatencyFtraceEvent& from) {
1256 CpuhpLatencyFtraceEvent* const _this = this;
1257 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.CpuhpLatencyFtraceEvent)
1258 GOOGLE_DCHECK_NE(&from, _this);
1259 ::uint32_t cached_has_bits = 0;
1260 (void) cached_has_bits;
1261
1262 cached_has_bits = from._impl_._has_bits_[0];
1263 if (cached_has_bits & 0x0000000fu) {
1264 if (cached_has_bits & 0x00000001u) {
1265 _this->_impl_.cpu_ = from._impl_.cpu_;
1266 }
1267 if (cached_has_bits & 0x00000002u) {
1268 _this->_impl_.ret_ = from._impl_.ret_;
1269 }
1270 if (cached_has_bits & 0x00000004u) {
1271 _this->_impl_.time_ = from._impl_.time_;
1272 }
1273 if (cached_has_bits & 0x00000008u) {
1274 _this->_impl_.state_ = from._impl_.state_;
1275 }
1276 _this->_impl_._has_bits_[0] |= cached_has_bits;
1277 }
1278 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1279 }
1280
CopyFrom(const CpuhpLatencyFtraceEvent & from)1281 void CpuhpLatencyFtraceEvent::CopyFrom(const CpuhpLatencyFtraceEvent& from) {
1282 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.CpuhpLatencyFtraceEvent)
1283 if (&from == this) return;
1284 Clear();
1285 MergeFrom(from);
1286 }
1287
IsInitialized() const1288 bool CpuhpLatencyFtraceEvent::IsInitialized() const {
1289 return true;
1290 }
1291
InternalSwap(CpuhpLatencyFtraceEvent * other)1292 void CpuhpLatencyFtraceEvent::InternalSwap(CpuhpLatencyFtraceEvent* other) {
1293 using std::swap;
1294 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1295 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1296 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1297 PROTOBUF_FIELD_OFFSET(CpuhpLatencyFtraceEvent, _impl_.state_)
1298 + sizeof(CpuhpLatencyFtraceEvent::_impl_.state_) // NOLINT
1299 - PROTOBUF_FIELD_OFFSET(CpuhpLatencyFtraceEvent, _impl_.cpu_)>(
1300 reinterpret_cast<char*>(&_impl_.cpu_),
1301 reinterpret_cast<char*>(&other->_impl_.cpu_));
1302 }
1303
GetTypeName() const1304 std::string CpuhpLatencyFtraceEvent::GetTypeName() const {
1305 return "perfetto.protos.CpuhpLatencyFtraceEvent";
1306 }
1307
1308
1309 // ===================================================================
1310
1311 class CpuhpPauseFtraceEvent::_Internal {
1312 public:
1313 using HasBits = decltype(std::declval<CpuhpPauseFtraceEvent>()._impl_._has_bits_);
set_has_active_cpus(HasBits * has_bits)1314 static void set_has_active_cpus(HasBits* has_bits) {
1315 (*has_bits)[0] |= 1u;
1316 }
set_has_cpus(HasBits * has_bits)1317 static void set_has_cpus(HasBits* has_bits) {
1318 (*has_bits)[0] |= 2u;
1319 }
set_has_pause(HasBits * has_bits)1320 static void set_has_pause(HasBits* has_bits) {
1321 (*has_bits)[0] |= 4u;
1322 }
set_has_time(HasBits * has_bits)1323 static void set_has_time(HasBits* has_bits) {
1324 (*has_bits)[0] |= 8u;
1325 }
1326 };
1327
CpuhpPauseFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1328 CpuhpPauseFtraceEvent::CpuhpPauseFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1329 bool is_message_owned)
1330 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1331 SharedCtor(arena, is_message_owned);
1332 // @@protoc_insertion_point(arena_constructor:perfetto.protos.CpuhpPauseFtraceEvent)
1333 }
CpuhpPauseFtraceEvent(const CpuhpPauseFtraceEvent & from)1334 CpuhpPauseFtraceEvent::CpuhpPauseFtraceEvent(const CpuhpPauseFtraceEvent& from)
1335 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1336 CpuhpPauseFtraceEvent* const _this = this; (void)_this;
1337 new (&_impl_) Impl_{
1338 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1339 , /*decltype(_impl_._cached_size_)*/{}
1340 , decltype(_impl_.active_cpus_){}
1341 , decltype(_impl_.cpus_){}
1342 , decltype(_impl_.pause_){}
1343 , decltype(_impl_.time_){}};
1344
1345 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1346 ::memcpy(&_impl_.active_cpus_, &from._impl_.active_cpus_,
1347 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.time_) -
1348 reinterpret_cast<char*>(&_impl_.active_cpus_)) + sizeof(_impl_.time_));
1349 // @@protoc_insertion_point(copy_constructor:perfetto.protos.CpuhpPauseFtraceEvent)
1350 }
1351
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1352 inline void CpuhpPauseFtraceEvent::SharedCtor(
1353 ::_pb::Arena* arena, bool is_message_owned) {
1354 (void)arena;
1355 (void)is_message_owned;
1356 new (&_impl_) Impl_{
1357 decltype(_impl_._has_bits_){}
1358 , /*decltype(_impl_._cached_size_)*/{}
1359 , decltype(_impl_.active_cpus_){0u}
1360 , decltype(_impl_.cpus_){0u}
1361 , decltype(_impl_.pause_){0u}
1362 , decltype(_impl_.time_){0u}
1363 };
1364 }
1365
~CpuhpPauseFtraceEvent()1366 CpuhpPauseFtraceEvent::~CpuhpPauseFtraceEvent() {
1367 // @@protoc_insertion_point(destructor:perfetto.protos.CpuhpPauseFtraceEvent)
1368 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1369 (void)arena;
1370 return;
1371 }
1372 SharedDtor();
1373 }
1374
SharedDtor()1375 inline void CpuhpPauseFtraceEvent::SharedDtor() {
1376 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1377 }
1378
SetCachedSize(int size) const1379 void CpuhpPauseFtraceEvent::SetCachedSize(int size) const {
1380 _impl_._cached_size_.Set(size);
1381 }
1382
Clear()1383 void CpuhpPauseFtraceEvent::Clear() {
1384 // @@protoc_insertion_point(message_clear_start:perfetto.protos.CpuhpPauseFtraceEvent)
1385 ::uint32_t cached_has_bits = 0;
1386 // Prevent compiler warnings about cached_has_bits being unused
1387 (void) cached_has_bits;
1388
1389 cached_has_bits = _impl_._has_bits_[0];
1390 if (cached_has_bits & 0x0000000fu) {
1391 ::memset(&_impl_.active_cpus_, 0, static_cast<size_t>(
1392 reinterpret_cast<char*>(&_impl_.time_) -
1393 reinterpret_cast<char*>(&_impl_.active_cpus_)) + sizeof(_impl_.time_));
1394 }
1395 _impl_._has_bits_.Clear();
1396 _internal_metadata_.Clear<std::string>();
1397 }
1398
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1399 const char* CpuhpPauseFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1400 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1401 _Internal::HasBits has_bits{};
1402 while (!ctx->Done(&ptr)) {
1403 ::uint32_t tag;
1404 ptr = ::_pbi::ReadTag(ptr, &tag);
1405 switch (tag >> 3) {
1406 // optional uint32 active_cpus = 1;
1407 case 1:
1408 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1409 _Internal::set_has_active_cpus(&has_bits);
1410 _impl_.active_cpus_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1411 CHK_(ptr);
1412 } else {
1413 goto handle_unusual;
1414 }
1415 continue;
1416 // optional uint32 cpus = 2;
1417 case 2:
1418 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1419 _Internal::set_has_cpus(&has_bits);
1420 _impl_.cpus_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1421 CHK_(ptr);
1422 } else {
1423 goto handle_unusual;
1424 }
1425 continue;
1426 // optional uint32 pause = 3;
1427 case 3:
1428 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1429 _Internal::set_has_pause(&has_bits);
1430 _impl_.pause_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1431 CHK_(ptr);
1432 } else {
1433 goto handle_unusual;
1434 }
1435 continue;
1436 // optional uint32 time = 4;
1437 case 4:
1438 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1439 _Internal::set_has_time(&has_bits);
1440 _impl_.time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1441 CHK_(ptr);
1442 } else {
1443 goto handle_unusual;
1444 }
1445 continue;
1446 default:
1447 goto handle_unusual;
1448 } // switch
1449 handle_unusual:
1450 if ((tag == 0) || ((tag & 7) == 4)) {
1451 CHK_(ptr);
1452 ctx->SetLastTag(tag);
1453 goto message_done;
1454 }
1455 ptr = UnknownFieldParse(
1456 tag,
1457 _internal_metadata_.mutable_unknown_fields<std::string>(),
1458 ptr, ctx);
1459 CHK_(ptr != nullptr);
1460 } // while
1461 message_done:
1462 _impl_._has_bits_.Or(has_bits);
1463 return ptr;
1464 failure:
1465 ptr = nullptr;
1466 goto message_done;
1467 #undef CHK_
1468 }
1469
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1470 ::uint8_t* CpuhpPauseFtraceEvent::_InternalSerialize(
1471 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1472 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.CpuhpPauseFtraceEvent)
1473 ::uint32_t cached_has_bits = 0;
1474 (void) cached_has_bits;
1475
1476 cached_has_bits = _impl_._has_bits_[0];
1477 // optional uint32 active_cpus = 1;
1478 if (cached_has_bits & 0x00000001u) {
1479 target = stream->EnsureSpace(target);
1480 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_active_cpus(), target);
1481 }
1482
1483 // optional uint32 cpus = 2;
1484 if (cached_has_bits & 0x00000002u) {
1485 target = stream->EnsureSpace(target);
1486 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_cpus(), target);
1487 }
1488
1489 // optional uint32 pause = 3;
1490 if (cached_has_bits & 0x00000004u) {
1491 target = stream->EnsureSpace(target);
1492 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_pause(), target);
1493 }
1494
1495 // optional uint32 time = 4;
1496 if (cached_has_bits & 0x00000008u) {
1497 target = stream->EnsureSpace(target);
1498 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_time(), target);
1499 }
1500
1501 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1502 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1503 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1504 }
1505 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.CpuhpPauseFtraceEvent)
1506 return target;
1507 }
1508
ByteSizeLong() const1509 size_t CpuhpPauseFtraceEvent::ByteSizeLong() const {
1510 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.CpuhpPauseFtraceEvent)
1511 size_t total_size = 0;
1512
1513 ::uint32_t cached_has_bits = 0;
1514 // Prevent compiler warnings about cached_has_bits being unused
1515 (void) cached_has_bits;
1516
1517 cached_has_bits = _impl_._has_bits_[0];
1518 if (cached_has_bits & 0x0000000fu) {
1519 // optional uint32 active_cpus = 1;
1520 if (cached_has_bits & 0x00000001u) {
1521 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_active_cpus());
1522 }
1523
1524 // optional uint32 cpus = 2;
1525 if (cached_has_bits & 0x00000002u) {
1526 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpus());
1527 }
1528
1529 // optional uint32 pause = 3;
1530 if (cached_has_bits & 0x00000004u) {
1531 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pause());
1532 }
1533
1534 // optional uint32 time = 4;
1535 if (cached_has_bits & 0x00000008u) {
1536 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_time());
1537 }
1538
1539 }
1540 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1541 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1542 }
1543 int cached_size = ::_pbi::ToCachedSize(total_size);
1544 SetCachedSize(cached_size);
1545 return total_size;
1546 }
1547
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1548 void CpuhpPauseFtraceEvent::CheckTypeAndMergeFrom(
1549 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1550 MergeFrom(*::_pbi::DownCast<const CpuhpPauseFtraceEvent*>(
1551 &from));
1552 }
1553
MergeFrom(const CpuhpPauseFtraceEvent & from)1554 void CpuhpPauseFtraceEvent::MergeFrom(const CpuhpPauseFtraceEvent& from) {
1555 CpuhpPauseFtraceEvent* const _this = this;
1556 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.CpuhpPauseFtraceEvent)
1557 GOOGLE_DCHECK_NE(&from, _this);
1558 ::uint32_t cached_has_bits = 0;
1559 (void) cached_has_bits;
1560
1561 cached_has_bits = from._impl_._has_bits_[0];
1562 if (cached_has_bits & 0x0000000fu) {
1563 if (cached_has_bits & 0x00000001u) {
1564 _this->_impl_.active_cpus_ = from._impl_.active_cpus_;
1565 }
1566 if (cached_has_bits & 0x00000002u) {
1567 _this->_impl_.cpus_ = from._impl_.cpus_;
1568 }
1569 if (cached_has_bits & 0x00000004u) {
1570 _this->_impl_.pause_ = from._impl_.pause_;
1571 }
1572 if (cached_has_bits & 0x00000008u) {
1573 _this->_impl_.time_ = from._impl_.time_;
1574 }
1575 _this->_impl_._has_bits_[0] |= cached_has_bits;
1576 }
1577 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1578 }
1579
CopyFrom(const CpuhpPauseFtraceEvent & from)1580 void CpuhpPauseFtraceEvent::CopyFrom(const CpuhpPauseFtraceEvent& from) {
1581 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.CpuhpPauseFtraceEvent)
1582 if (&from == this) return;
1583 Clear();
1584 MergeFrom(from);
1585 }
1586
IsInitialized() const1587 bool CpuhpPauseFtraceEvent::IsInitialized() const {
1588 return true;
1589 }
1590
InternalSwap(CpuhpPauseFtraceEvent * other)1591 void CpuhpPauseFtraceEvent::InternalSwap(CpuhpPauseFtraceEvent* other) {
1592 using std::swap;
1593 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1594 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1595 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1596 PROTOBUF_FIELD_OFFSET(CpuhpPauseFtraceEvent, _impl_.time_)
1597 + sizeof(CpuhpPauseFtraceEvent::_impl_.time_) // NOLINT
1598 - PROTOBUF_FIELD_OFFSET(CpuhpPauseFtraceEvent, _impl_.active_cpus_)>(
1599 reinterpret_cast<char*>(&_impl_.active_cpus_),
1600 reinterpret_cast<char*>(&other->_impl_.active_cpus_));
1601 }
1602
GetTypeName() const1603 std::string CpuhpPauseFtraceEvent::GetTypeName() const {
1604 return "perfetto.protos.CpuhpPauseFtraceEvent";
1605 }
1606
1607
1608 // @@protoc_insertion_point(namespace_scope)
1609 } // namespace protos
1610 } // namespace perfetto
1611 PROTOBUF_NAMESPACE_OPEN
1612 template<> PROTOBUF_NOINLINE ::perfetto::protos::CpuhpExitFtraceEvent*
CreateMaybeMessage(Arena * arena)1613 Arena::CreateMaybeMessage< ::perfetto::protos::CpuhpExitFtraceEvent >(Arena* arena) {
1614 return Arena::CreateMessageInternal< ::perfetto::protos::CpuhpExitFtraceEvent >(arena);
1615 }
1616 template<> PROTOBUF_NOINLINE ::perfetto::protos::CpuhpMultiEnterFtraceEvent*
CreateMaybeMessage(Arena * arena)1617 Arena::CreateMaybeMessage< ::perfetto::protos::CpuhpMultiEnterFtraceEvent >(Arena* arena) {
1618 return Arena::CreateMessageInternal< ::perfetto::protos::CpuhpMultiEnterFtraceEvent >(arena);
1619 }
1620 template<> PROTOBUF_NOINLINE ::perfetto::protos::CpuhpEnterFtraceEvent*
CreateMaybeMessage(Arena * arena)1621 Arena::CreateMaybeMessage< ::perfetto::protos::CpuhpEnterFtraceEvent >(Arena* arena) {
1622 return Arena::CreateMessageInternal< ::perfetto::protos::CpuhpEnterFtraceEvent >(arena);
1623 }
1624 template<> PROTOBUF_NOINLINE ::perfetto::protos::CpuhpLatencyFtraceEvent*
CreateMaybeMessage(Arena * arena)1625 Arena::CreateMaybeMessage< ::perfetto::protos::CpuhpLatencyFtraceEvent >(Arena* arena) {
1626 return Arena::CreateMessageInternal< ::perfetto::protos::CpuhpLatencyFtraceEvent >(arena);
1627 }
1628 template<> PROTOBUF_NOINLINE ::perfetto::protos::CpuhpPauseFtraceEvent*
CreateMaybeMessage(Arena * arena)1629 Arena::CreateMaybeMessage< ::perfetto::protos::CpuhpPauseFtraceEvent >(Arena* arena) {
1630 return Arena::CreateMessageInternal< ::perfetto::protos::CpuhpPauseFtraceEvent >(arena);
1631 }
1632 PROTOBUF_NAMESPACE_CLOSE
1633
1634 // @@protoc_insertion_point(global_scope)
1635 #include <google/protobuf/port_undef.inc>
1636