1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/ufs.proto
3
4 #include "protos/perfetto/trace/ftrace/ufs.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 {
UfshcdCommandFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR UfshcdCommandFtraceEvent::UfshcdCommandFtraceEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.dev_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.str_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29 , /*decltype(_impl_.doorbell_)*/0u
30 , /*decltype(_impl_.intr_)*/0u
31 , /*decltype(_impl_.lba_)*/::uint64_t{0u}
32 , /*decltype(_impl_.opcode_)*/0u
33 , /*decltype(_impl_.tag_)*/0u
34 , /*decltype(_impl_.transfer_len_)*/0
35 , /*decltype(_impl_.group_id_)*/0u
36 , /*decltype(_impl_.str_t_)*/0u} {}
37 struct UfshcdCommandFtraceEventDefaultTypeInternal {
UfshcdCommandFtraceEventDefaultTypeInternalperfetto::protos::UfshcdCommandFtraceEventDefaultTypeInternal38 PROTOBUF_CONSTEXPR UfshcdCommandFtraceEventDefaultTypeInternal()
39 : _instance(::_pbi::ConstantInitialized{}) {}
~UfshcdCommandFtraceEventDefaultTypeInternalperfetto::protos::UfshcdCommandFtraceEventDefaultTypeInternal40 ~UfshcdCommandFtraceEventDefaultTypeInternal() {}
41 union { // NOLINT(misc-non-private-member-variables-in-classes)
42 UfshcdCommandFtraceEvent _instance;
43 };
44 };
45 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UfshcdCommandFtraceEventDefaultTypeInternal _UfshcdCommandFtraceEvent_default_instance_;
UfshcdClkGatingFtraceEvent(::_pbi::ConstantInitialized)46 PROTOBUF_CONSTEXPR UfshcdClkGatingFtraceEvent::UfshcdClkGatingFtraceEvent(
47 ::_pbi::ConstantInitialized): _impl_{
48 /*decltype(_impl_._has_bits_)*/{}
49 , /*decltype(_impl_._cached_size_)*/{}
50 , /*decltype(_impl_.dev_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
51 , /*decltype(_impl_.state_)*/0} {}
52 struct UfshcdClkGatingFtraceEventDefaultTypeInternal {
UfshcdClkGatingFtraceEventDefaultTypeInternalperfetto::protos::UfshcdClkGatingFtraceEventDefaultTypeInternal53 PROTOBUF_CONSTEXPR UfshcdClkGatingFtraceEventDefaultTypeInternal()
54 : _instance(::_pbi::ConstantInitialized{}) {}
~UfshcdClkGatingFtraceEventDefaultTypeInternalperfetto::protos::UfshcdClkGatingFtraceEventDefaultTypeInternal55 ~UfshcdClkGatingFtraceEventDefaultTypeInternal() {}
56 union { // NOLINT(misc-non-private-member-variables-in-classes)
57 UfshcdClkGatingFtraceEvent _instance;
58 };
59 };
60 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UfshcdClkGatingFtraceEventDefaultTypeInternal _UfshcdClkGatingFtraceEvent_default_instance_;
61 } // namespace protos
62 } // namespace perfetto
63 namespace perfetto {
64 namespace protos {
65
66 // ===================================================================
67
68 class UfshcdCommandFtraceEvent::_Internal {
69 public:
70 using HasBits = decltype(std::declval<UfshcdCommandFtraceEvent>()._impl_._has_bits_);
set_has_dev_name(HasBits * has_bits)71 static void set_has_dev_name(HasBits* has_bits) {
72 (*has_bits)[0] |= 1u;
73 }
set_has_doorbell(HasBits * has_bits)74 static void set_has_doorbell(HasBits* has_bits) {
75 (*has_bits)[0] |= 4u;
76 }
set_has_intr(HasBits * has_bits)77 static void set_has_intr(HasBits* has_bits) {
78 (*has_bits)[0] |= 8u;
79 }
set_has_lba(HasBits * has_bits)80 static void set_has_lba(HasBits* has_bits) {
81 (*has_bits)[0] |= 16u;
82 }
set_has_opcode(HasBits * has_bits)83 static void set_has_opcode(HasBits* has_bits) {
84 (*has_bits)[0] |= 32u;
85 }
set_has_str(HasBits * has_bits)86 static void set_has_str(HasBits* has_bits) {
87 (*has_bits)[0] |= 2u;
88 }
set_has_tag(HasBits * has_bits)89 static void set_has_tag(HasBits* has_bits) {
90 (*has_bits)[0] |= 64u;
91 }
set_has_transfer_len(HasBits * has_bits)92 static void set_has_transfer_len(HasBits* has_bits) {
93 (*has_bits)[0] |= 128u;
94 }
set_has_group_id(HasBits * has_bits)95 static void set_has_group_id(HasBits* has_bits) {
96 (*has_bits)[0] |= 256u;
97 }
set_has_str_t(HasBits * has_bits)98 static void set_has_str_t(HasBits* has_bits) {
99 (*has_bits)[0] |= 512u;
100 }
101 };
102
UfshcdCommandFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)103 UfshcdCommandFtraceEvent::UfshcdCommandFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
104 bool is_message_owned)
105 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
106 SharedCtor(arena, is_message_owned);
107 // @@protoc_insertion_point(arena_constructor:perfetto.protos.UfshcdCommandFtraceEvent)
108 }
UfshcdCommandFtraceEvent(const UfshcdCommandFtraceEvent & from)109 UfshcdCommandFtraceEvent::UfshcdCommandFtraceEvent(const UfshcdCommandFtraceEvent& from)
110 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
111 UfshcdCommandFtraceEvent* const _this = this; (void)_this;
112 new (&_impl_) Impl_{
113 decltype(_impl_._has_bits_){from._impl_._has_bits_}
114 , /*decltype(_impl_._cached_size_)*/{}
115 , decltype(_impl_.dev_name_){}
116 , decltype(_impl_.str_){}
117 , decltype(_impl_.doorbell_){}
118 , decltype(_impl_.intr_){}
119 , decltype(_impl_.lba_){}
120 , decltype(_impl_.opcode_){}
121 , decltype(_impl_.tag_){}
122 , decltype(_impl_.transfer_len_){}
123 , decltype(_impl_.group_id_){}
124 , decltype(_impl_.str_t_){}};
125
126 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
127 _impl_.dev_name_.InitDefault();
128 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
129 _impl_.dev_name_.Set("", GetArenaForAllocation());
130 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
131 if (from._internal_has_dev_name()) {
132 _this->_impl_.dev_name_.Set(from._internal_dev_name(),
133 _this->GetArenaForAllocation());
134 }
135 _impl_.str_.InitDefault();
136 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
137 _impl_.str_.Set("", GetArenaForAllocation());
138 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
139 if (from._internal_has_str()) {
140 _this->_impl_.str_.Set(from._internal_str(),
141 _this->GetArenaForAllocation());
142 }
143 ::memcpy(&_impl_.doorbell_, &from._impl_.doorbell_,
144 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.str_t_) -
145 reinterpret_cast<char*>(&_impl_.doorbell_)) + sizeof(_impl_.str_t_));
146 // @@protoc_insertion_point(copy_constructor:perfetto.protos.UfshcdCommandFtraceEvent)
147 }
148
SharedCtor(::_pb::Arena * arena,bool is_message_owned)149 inline void UfshcdCommandFtraceEvent::SharedCtor(
150 ::_pb::Arena* arena, bool is_message_owned) {
151 (void)arena;
152 (void)is_message_owned;
153 new (&_impl_) Impl_{
154 decltype(_impl_._has_bits_){}
155 , /*decltype(_impl_._cached_size_)*/{}
156 , decltype(_impl_.dev_name_){}
157 , decltype(_impl_.str_){}
158 , decltype(_impl_.doorbell_){0u}
159 , decltype(_impl_.intr_){0u}
160 , decltype(_impl_.lba_){::uint64_t{0u}}
161 , decltype(_impl_.opcode_){0u}
162 , decltype(_impl_.tag_){0u}
163 , decltype(_impl_.transfer_len_){0}
164 , decltype(_impl_.group_id_){0u}
165 , decltype(_impl_.str_t_){0u}
166 };
167 _impl_.dev_name_.InitDefault();
168 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
169 _impl_.dev_name_.Set("", GetArenaForAllocation());
170 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
171 _impl_.str_.InitDefault();
172 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
173 _impl_.str_.Set("", GetArenaForAllocation());
174 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
175 }
176
~UfshcdCommandFtraceEvent()177 UfshcdCommandFtraceEvent::~UfshcdCommandFtraceEvent() {
178 // @@protoc_insertion_point(destructor:perfetto.protos.UfshcdCommandFtraceEvent)
179 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
180 (void)arena;
181 return;
182 }
183 SharedDtor();
184 }
185
SharedDtor()186 inline void UfshcdCommandFtraceEvent::SharedDtor() {
187 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
188 _impl_.dev_name_.Destroy();
189 _impl_.str_.Destroy();
190 }
191
SetCachedSize(int size) const192 void UfshcdCommandFtraceEvent::SetCachedSize(int size) const {
193 _impl_._cached_size_.Set(size);
194 }
195
Clear()196 void UfshcdCommandFtraceEvent::Clear() {
197 // @@protoc_insertion_point(message_clear_start:perfetto.protos.UfshcdCommandFtraceEvent)
198 ::uint32_t cached_has_bits = 0;
199 // Prevent compiler warnings about cached_has_bits being unused
200 (void) cached_has_bits;
201
202 cached_has_bits = _impl_._has_bits_[0];
203 if (cached_has_bits & 0x00000003u) {
204 if (cached_has_bits & 0x00000001u) {
205 _impl_.dev_name_.ClearNonDefaultToEmpty();
206 }
207 if (cached_has_bits & 0x00000002u) {
208 _impl_.str_.ClearNonDefaultToEmpty();
209 }
210 }
211 if (cached_has_bits & 0x000000fcu) {
212 ::memset(&_impl_.doorbell_, 0, static_cast<size_t>(
213 reinterpret_cast<char*>(&_impl_.transfer_len_) -
214 reinterpret_cast<char*>(&_impl_.doorbell_)) + sizeof(_impl_.transfer_len_));
215 }
216 if (cached_has_bits & 0x00000300u) {
217 ::memset(&_impl_.group_id_, 0, static_cast<size_t>(
218 reinterpret_cast<char*>(&_impl_.str_t_) -
219 reinterpret_cast<char*>(&_impl_.group_id_)) + sizeof(_impl_.str_t_));
220 }
221 _impl_._has_bits_.Clear();
222 _internal_metadata_.Clear<std::string>();
223 }
224
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)225 const char* UfshcdCommandFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
226 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
227 _Internal::HasBits has_bits{};
228 while (!ctx->Done(&ptr)) {
229 ::uint32_t tag;
230 ptr = ::_pbi::ReadTag(ptr, &tag);
231 switch (tag >> 3) {
232 // optional string dev_name = 1;
233 case 1:
234 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
235 auto str = _internal_mutable_dev_name();
236 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
237 CHK_(ptr);
238 } else {
239 goto handle_unusual;
240 }
241 continue;
242 // optional uint32 doorbell = 2;
243 case 2:
244 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
245 _Internal::set_has_doorbell(&has_bits);
246 _impl_.doorbell_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
247 CHK_(ptr);
248 } else {
249 goto handle_unusual;
250 }
251 continue;
252 // optional uint32 intr = 3;
253 case 3:
254 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
255 _Internal::set_has_intr(&has_bits);
256 _impl_.intr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
257 CHK_(ptr);
258 } else {
259 goto handle_unusual;
260 }
261 continue;
262 // optional uint64 lba = 4;
263 case 4:
264 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
265 _Internal::set_has_lba(&has_bits);
266 _impl_.lba_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
267 CHK_(ptr);
268 } else {
269 goto handle_unusual;
270 }
271 continue;
272 // optional uint32 opcode = 5;
273 case 5:
274 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
275 _Internal::set_has_opcode(&has_bits);
276 _impl_.opcode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
277 CHK_(ptr);
278 } else {
279 goto handle_unusual;
280 }
281 continue;
282 // optional string str = 6;
283 case 6:
284 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
285 auto str = _internal_mutable_str();
286 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
287 CHK_(ptr);
288 } else {
289 goto handle_unusual;
290 }
291 continue;
292 // optional uint32 tag = 7;
293 case 7:
294 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
295 _Internal::set_has_tag(&has_bits);
296 _impl_.tag_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
297 CHK_(ptr);
298 } else {
299 goto handle_unusual;
300 }
301 continue;
302 // optional int32 transfer_len = 8;
303 case 8:
304 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
305 _Internal::set_has_transfer_len(&has_bits);
306 _impl_.transfer_len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
307 CHK_(ptr);
308 } else {
309 goto handle_unusual;
310 }
311 continue;
312 // optional uint32 group_id = 9;
313 case 9:
314 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
315 _Internal::set_has_group_id(&has_bits);
316 _impl_.group_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
317 CHK_(ptr);
318 } else {
319 goto handle_unusual;
320 }
321 continue;
322 // optional uint32 str_t = 10;
323 case 10:
324 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
325 _Internal::set_has_str_t(&has_bits);
326 _impl_.str_t_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
327 CHK_(ptr);
328 } else {
329 goto handle_unusual;
330 }
331 continue;
332 default:
333 goto handle_unusual;
334 } // switch
335 handle_unusual:
336 if ((tag == 0) || ((tag & 7) == 4)) {
337 CHK_(ptr);
338 ctx->SetLastTag(tag);
339 goto message_done;
340 }
341 ptr = UnknownFieldParse(
342 tag,
343 _internal_metadata_.mutable_unknown_fields<std::string>(),
344 ptr, ctx);
345 CHK_(ptr != nullptr);
346 } // while
347 message_done:
348 _impl_._has_bits_.Or(has_bits);
349 return ptr;
350 failure:
351 ptr = nullptr;
352 goto message_done;
353 #undef CHK_
354 }
355
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const356 ::uint8_t* UfshcdCommandFtraceEvent::_InternalSerialize(
357 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
358 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.UfshcdCommandFtraceEvent)
359 ::uint32_t cached_has_bits = 0;
360 (void) cached_has_bits;
361
362 cached_has_bits = _impl_._has_bits_[0];
363 // optional string dev_name = 1;
364 if (cached_has_bits & 0x00000001u) {
365 target = stream->WriteStringMaybeAliased(
366 1, this->_internal_dev_name(), target);
367 }
368
369 // optional uint32 doorbell = 2;
370 if (cached_has_bits & 0x00000004u) {
371 target = stream->EnsureSpace(target);
372 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_doorbell(), target);
373 }
374
375 // optional uint32 intr = 3;
376 if (cached_has_bits & 0x00000008u) {
377 target = stream->EnsureSpace(target);
378 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_intr(), target);
379 }
380
381 // optional uint64 lba = 4;
382 if (cached_has_bits & 0x00000010u) {
383 target = stream->EnsureSpace(target);
384 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_lba(), target);
385 }
386
387 // optional uint32 opcode = 5;
388 if (cached_has_bits & 0x00000020u) {
389 target = stream->EnsureSpace(target);
390 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_opcode(), target);
391 }
392
393 // optional string str = 6;
394 if (cached_has_bits & 0x00000002u) {
395 target = stream->WriteStringMaybeAliased(
396 6, this->_internal_str(), target);
397 }
398
399 // optional uint32 tag = 7;
400 if (cached_has_bits & 0x00000040u) {
401 target = stream->EnsureSpace(target);
402 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_tag(), target);
403 }
404
405 // optional int32 transfer_len = 8;
406 if (cached_has_bits & 0x00000080u) {
407 target = stream->EnsureSpace(target);
408 target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_transfer_len(), target);
409 }
410
411 // optional uint32 group_id = 9;
412 if (cached_has_bits & 0x00000100u) {
413 target = stream->EnsureSpace(target);
414 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_group_id(), target);
415 }
416
417 // optional uint32 str_t = 10;
418 if (cached_has_bits & 0x00000200u) {
419 target = stream->EnsureSpace(target);
420 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_str_t(), target);
421 }
422
423 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
424 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
425 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
426 }
427 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.UfshcdCommandFtraceEvent)
428 return target;
429 }
430
ByteSizeLong() const431 size_t UfshcdCommandFtraceEvent::ByteSizeLong() const {
432 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.UfshcdCommandFtraceEvent)
433 size_t total_size = 0;
434
435 ::uint32_t cached_has_bits = 0;
436 // Prevent compiler warnings about cached_has_bits being unused
437 (void) cached_has_bits;
438
439 cached_has_bits = _impl_._has_bits_[0];
440 if (cached_has_bits & 0x000000ffu) {
441 // optional string dev_name = 1;
442 if (cached_has_bits & 0x00000001u) {
443 total_size += 1 +
444 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
445 this->_internal_dev_name());
446 }
447
448 // optional string str = 6;
449 if (cached_has_bits & 0x00000002u) {
450 total_size += 1 +
451 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
452 this->_internal_str());
453 }
454
455 // optional uint32 doorbell = 2;
456 if (cached_has_bits & 0x00000004u) {
457 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_doorbell());
458 }
459
460 // optional uint32 intr = 3;
461 if (cached_has_bits & 0x00000008u) {
462 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_intr());
463 }
464
465 // optional uint64 lba = 4;
466 if (cached_has_bits & 0x00000010u) {
467 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_lba());
468 }
469
470 // optional uint32 opcode = 5;
471 if (cached_has_bits & 0x00000020u) {
472 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_opcode());
473 }
474
475 // optional uint32 tag = 7;
476 if (cached_has_bits & 0x00000040u) {
477 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_tag());
478 }
479
480 // optional int32 transfer_len = 8;
481 if (cached_has_bits & 0x00000080u) {
482 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_transfer_len());
483 }
484
485 }
486 if (cached_has_bits & 0x00000300u) {
487 // optional uint32 group_id = 9;
488 if (cached_has_bits & 0x00000100u) {
489 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_group_id());
490 }
491
492 // optional uint32 str_t = 10;
493 if (cached_has_bits & 0x00000200u) {
494 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_str_t());
495 }
496
497 }
498 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
499 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
500 }
501 int cached_size = ::_pbi::ToCachedSize(total_size);
502 SetCachedSize(cached_size);
503 return total_size;
504 }
505
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)506 void UfshcdCommandFtraceEvent::CheckTypeAndMergeFrom(
507 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
508 MergeFrom(*::_pbi::DownCast<const UfshcdCommandFtraceEvent*>(
509 &from));
510 }
511
MergeFrom(const UfshcdCommandFtraceEvent & from)512 void UfshcdCommandFtraceEvent::MergeFrom(const UfshcdCommandFtraceEvent& from) {
513 UfshcdCommandFtraceEvent* const _this = this;
514 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.UfshcdCommandFtraceEvent)
515 GOOGLE_DCHECK_NE(&from, _this);
516 ::uint32_t cached_has_bits = 0;
517 (void) cached_has_bits;
518
519 cached_has_bits = from._impl_._has_bits_[0];
520 if (cached_has_bits & 0x000000ffu) {
521 if (cached_has_bits & 0x00000001u) {
522 _this->_internal_set_dev_name(from._internal_dev_name());
523 }
524 if (cached_has_bits & 0x00000002u) {
525 _this->_internal_set_str(from._internal_str());
526 }
527 if (cached_has_bits & 0x00000004u) {
528 _this->_impl_.doorbell_ = from._impl_.doorbell_;
529 }
530 if (cached_has_bits & 0x00000008u) {
531 _this->_impl_.intr_ = from._impl_.intr_;
532 }
533 if (cached_has_bits & 0x00000010u) {
534 _this->_impl_.lba_ = from._impl_.lba_;
535 }
536 if (cached_has_bits & 0x00000020u) {
537 _this->_impl_.opcode_ = from._impl_.opcode_;
538 }
539 if (cached_has_bits & 0x00000040u) {
540 _this->_impl_.tag_ = from._impl_.tag_;
541 }
542 if (cached_has_bits & 0x00000080u) {
543 _this->_impl_.transfer_len_ = from._impl_.transfer_len_;
544 }
545 _this->_impl_._has_bits_[0] |= cached_has_bits;
546 }
547 if (cached_has_bits & 0x00000300u) {
548 if (cached_has_bits & 0x00000100u) {
549 _this->_impl_.group_id_ = from._impl_.group_id_;
550 }
551 if (cached_has_bits & 0x00000200u) {
552 _this->_impl_.str_t_ = from._impl_.str_t_;
553 }
554 _this->_impl_._has_bits_[0] |= cached_has_bits;
555 }
556 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
557 }
558
CopyFrom(const UfshcdCommandFtraceEvent & from)559 void UfshcdCommandFtraceEvent::CopyFrom(const UfshcdCommandFtraceEvent& from) {
560 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.UfshcdCommandFtraceEvent)
561 if (&from == this) return;
562 Clear();
563 MergeFrom(from);
564 }
565
IsInitialized() const566 bool UfshcdCommandFtraceEvent::IsInitialized() const {
567 return true;
568 }
569
InternalSwap(UfshcdCommandFtraceEvent * other)570 void UfshcdCommandFtraceEvent::InternalSwap(UfshcdCommandFtraceEvent* other) {
571 using std::swap;
572 auto* lhs_arena = GetArenaForAllocation();
573 auto* rhs_arena = other->GetArenaForAllocation();
574 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
575 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
576 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
577 &_impl_.dev_name_, lhs_arena,
578 &other->_impl_.dev_name_, rhs_arena
579 );
580 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
581 &_impl_.str_, lhs_arena,
582 &other->_impl_.str_, rhs_arena
583 );
584 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
585 PROTOBUF_FIELD_OFFSET(UfshcdCommandFtraceEvent, _impl_.str_t_)
586 + sizeof(UfshcdCommandFtraceEvent::_impl_.str_t_) // NOLINT
587 - PROTOBUF_FIELD_OFFSET(UfshcdCommandFtraceEvent, _impl_.doorbell_)>(
588 reinterpret_cast<char*>(&_impl_.doorbell_),
589 reinterpret_cast<char*>(&other->_impl_.doorbell_));
590 }
591
GetTypeName() const592 std::string UfshcdCommandFtraceEvent::GetTypeName() const {
593 return "perfetto.protos.UfshcdCommandFtraceEvent";
594 }
595
596
597 // ===================================================================
598
599 class UfshcdClkGatingFtraceEvent::_Internal {
600 public:
601 using HasBits = decltype(std::declval<UfshcdClkGatingFtraceEvent>()._impl_._has_bits_);
set_has_dev_name(HasBits * has_bits)602 static void set_has_dev_name(HasBits* has_bits) {
603 (*has_bits)[0] |= 1u;
604 }
set_has_state(HasBits * has_bits)605 static void set_has_state(HasBits* has_bits) {
606 (*has_bits)[0] |= 2u;
607 }
608 };
609
UfshcdClkGatingFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)610 UfshcdClkGatingFtraceEvent::UfshcdClkGatingFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
611 bool is_message_owned)
612 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
613 SharedCtor(arena, is_message_owned);
614 // @@protoc_insertion_point(arena_constructor:perfetto.protos.UfshcdClkGatingFtraceEvent)
615 }
UfshcdClkGatingFtraceEvent(const UfshcdClkGatingFtraceEvent & from)616 UfshcdClkGatingFtraceEvent::UfshcdClkGatingFtraceEvent(const UfshcdClkGatingFtraceEvent& from)
617 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
618 UfshcdClkGatingFtraceEvent* const _this = this; (void)_this;
619 new (&_impl_) Impl_{
620 decltype(_impl_._has_bits_){from._impl_._has_bits_}
621 , /*decltype(_impl_._cached_size_)*/{}
622 , decltype(_impl_.dev_name_){}
623 , decltype(_impl_.state_){}};
624
625 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
626 _impl_.dev_name_.InitDefault();
627 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
628 _impl_.dev_name_.Set("", GetArenaForAllocation());
629 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
630 if (from._internal_has_dev_name()) {
631 _this->_impl_.dev_name_.Set(from._internal_dev_name(),
632 _this->GetArenaForAllocation());
633 }
634 _this->_impl_.state_ = from._impl_.state_;
635 // @@protoc_insertion_point(copy_constructor:perfetto.protos.UfshcdClkGatingFtraceEvent)
636 }
637
SharedCtor(::_pb::Arena * arena,bool is_message_owned)638 inline void UfshcdClkGatingFtraceEvent::SharedCtor(
639 ::_pb::Arena* arena, bool is_message_owned) {
640 (void)arena;
641 (void)is_message_owned;
642 new (&_impl_) Impl_{
643 decltype(_impl_._has_bits_){}
644 , /*decltype(_impl_._cached_size_)*/{}
645 , decltype(_impl_.dev_name_){}
646 , decltype(_impl_.state_){0}
647 };
648 _impl_.dev_name_.InitDefault();
649 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
650 _impl_.dev_name_.Set("", GetArenaForAllocation());
651 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
652 }
653
~UfshcdClkGatingFtraceEvent()654 UfshcdClkGatingFtraceEvent::~UfshcdClkGatingFtraceEvent() {
655 // @@protoc_insertion_point(destructor:perfetto.protos.UfshcdClkGatingFtraceEvent)
656 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
657 (void)arena;
658 return;
659 }
660 SharedDtor();
661 }
662
SharedDtor()663 inline void UfshcdClkGatingFtraceEvent::SharedDtor() {
664 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
665 _impl_.dev_name_.Destroy();
666 }
667
SetCachedSize(int size) const668 void UfshcdClkGatingFtraceEvent::SetCachedSize(int size) const {
669 _impl_._cached_size_.Set(size);
670 }
671
Clear()672 void UfshcdClkGatingFtraceEvent::Clear() {
673 // @@protoc_insertion_point(message_clear_start:perfetto.protos.UfshcdClkGatingFtraceEvent)
674 ::uint32_t cached_has_bits = 0;
675 // Prevent compiler warnings about cached_has_bits being unused
676 (void) cached_has_bits;
677
678 cached_has_bits = _impl_._has_bits_[0];
679 if (cached_has_bits & 0x00000001u) {
680 _impl_.dev_name_.ClearNonDefaultToEmpty();
681 }
682 _impl_.state_ = 0;
683 _impl_._has_bits_.Clear();
684 _internal_metadata_.Clear<std::string>();
685 }
686
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)687 const char* UfshcdClkGatingFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
688 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
689 _Internal::HasBits has_bits{};
690 while (!ctx->Done(&ptr)) {
691 ::uint32_t tag;
692 ptr = ::_pbi::ReadTag(ptr, &tag);
693 switch (tag >> 3) {
694 // optional string dev_name = 1;
695 case 1:
696 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
697 auto str = _internal_mutable_dev_name();
698 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
699 CHK_(ptr);
700 } else {
701 goto handle_unusual;
702 }
703 continue;
704 // optional int32 state = 2;
705 case 2:
706 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
707 _Internal::set_has_state(&has_bits);
708 _impl_.state_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
709 CHK_(ptr);
710 } else {
711 goto handle_unusual;
712 }
713 continue;
714 default:
715 goto handle_unusual;
716 } // switch
717 handle_unusual:
718 if ((tag == 0) || ((tag & 7) == 4)) {
719 CHK_(ptr);
720 ctx->SetLastTag(tag);
721 goto message_done;
722 }
723 ptr = UnknownFieldParse(
724 tag,
725 _internal_metadata_.mutable_unknown_fields<std::string>(),
726 ptr, ctx);
727 CHK_(ptr != nullptr);
728 } // while
729 message_done:
730 _impl_._has_bits_.Or(has_bits);
731 return ptr;
732 failure:
733 ptr = nullptr;
734 goto message_done;
735 #undef CHK_
736 }
737
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const738 ::uint8_t* UfshcdClkGatingFtraceEvent::_InternalSerialize(
739 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
740 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.UfshcdClkGatingFtraceEvent)
741 ::uint32_t cached_has_bits = 0;
742 (void) cached_has_bits;
743
744 cached_has_bits = _impl_._has_bits_[0];
745 // optional string dev_name = 1;
746 if (cached_has_bits & 0x00000001u) {
747 target = stream->WriteStringMaybeAliased(
748 1, this->_internal_dev_name(), target);
749 }
750
751 // optional int32 state = 2;
752 if (cached_has_bits & 0x00000002u) {
753 target = stream->EnsureSpace(target);
754 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_state(), target);
755 }
756
757 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
758 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
759 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
760 }
761 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.UfshcdClkGatingFtraceEvent)
762 return target;
763 }
764
ByteSizeLong() const765 size_t UfshcdClkGatingFtraceEvent::ByteSizeLong() const {
766 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.UfshcdClkGatingFtraceEvent)
767 size_t total_size = 0;
768
769 ::uint32_t cached_has_bits = 0;
770 // Prevent compiler warnings about cached_has_bits being unused
771 (void) cached_has_bits;
772
773 cached_has_bits = _impl_._has_bits_[0];
774 if (cached_has_bits & 0x00000003u) {
775 // optional string dev_name = 1;
776 if (cached_has_bits & 0x00000001u) {
777 total_size += 1 +
778 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
779 this->_internal_dev_name());
780 }
781
782 // optional int32 state = 2;
783 if (cached_has_bits & 0x00000002u) {
784 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_state());
785 }
786
787 }
788 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
789 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
790 }
791 int cached_size = ::_pbi::ToCachedSize(total_size);
792 SetCachedSize(cached_size);
793 return total_size;
794 }
795
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)796 void UfshcdClkGatingFtraceEvent::CheckTypeAndMergeFrom(
797 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
798 MergeFrom(*::_pbi::DownCast<const UfshcdClkGatingFtraceEvent*>(
799 &from));
800 }
801
MergeFrom(const UfshcdClkGatingFtraceEvent & from)802 void UfshcdClkGatingFtraceEvent::MergeFrom(const UfshcdClkGatingFtraceEvent& from) {
803 UfshcdClkGatingFtraceEvent* const _this = this;
804 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.UfshcdClkGatingFtraceEvent)
805 GOOGLE_DCHECK_NE(&from, _this);
806 ::uint32_t cached_has_bits = 0;
807 (void) cached_has_bits;
808
809 cached_has_bits = from._impl_._has_bits_[0];
810 if (cached_has_bits & 0x00000003u) {
811 if (cached_has_bits & 0x00000001u) {
812 _this->_internal_set_dev_name(from._internal_dev_name());
813 }
814 if (cached_has_bits & 0x00000002u) {
815 _this->_impl_.state_ = from._impl_.state_;
816 }
817 _this->_impl_._has_bits_[0] |= cached_has_bits;
818 }
819 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
820 }
821
CopyFrom(const UfshcdClkGatingFtraceEvent & from)822 void UfshcdClkGatingFtraceEvent::CopyFrom(const UfshcdClkGatingFtraceEvent& from) {
823 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.UfshcdClkGatingFtraceEvent)
824 if (&from == this) return;
825 Clear();
826 MergeFrom(from);
827 }
828
IsInitialized() const829 bool UfshcdClkGatingFtraceEvent::IsInitialized() const {
830 return true;
831 }
832
InternalSwap(UfshcdClkGatingFtraceEvent * other)833 void UfshcdClkGatingFtraceEvent::InternalSwap(UfshcdClkGatingFtraceEvent* other) {
834 using std::swap;
835 auto* lhs_arena = GetArenaForAllocation();
836 auto* rhs_arena = other->GetArenaForAllocation();
837 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
838 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
839 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
840 &_impl_.dev_name_, lhs_arena,
841 &other->_impl_.dev_name_, rhs_arena
842 );
843 swap(_impl_.state_, other->_impl_.state_);
844 }
845
GetTypeName() const846 std::string UfshcdClkGatingFtraceEvent::GetTypeName() const {
847 return "perfetto.protos.UfshcdClkGatingFtraceEvent";
848 }
849
850
851 // @@protoc_insertion_point(namespace_scope)
852 } // namespace protos
853 } // namespace perfetto
854 PROTOBUF_NAMESPACE_OPEN
855 template<> PROTOBUF_NOINLINE ::perfetto::protos::UfshcdCommandFtraceEvent*
CreateMaybeMessage(Arena * arena)856 Arena::CreateMaybeMessage< ::perfetto::protos::UfshcdCommandFtraceEvent >(Arena* arena) {
857 return Arena::CreateMessageInternal< ::perfetto::protos::UfshcdCommandFtraceEvent >(arena);
858 }
859 template<> PROTOBUF_NOINLINE ::perfetto::protos::UfshcdClkGatingFtraceEvent*
CreateMaybeMessage(Arena * arena)860 Arena::CreateMaybeMessage< ::perfetto::protos::UfshcdClkGatingFtraceEvent >(Arena* arena) {
861 return Arena::CreateMessageInternal< ::perfetto::protos::UfshcdClkGatingFtraceEvent >(arena);
862 }
863 PROTOBUF_NAMESPACE_CLOSE
864
865 // @@protoc_insertion_point(global_scope)
866 #include <google/protobuf/port_undef.inc>
867