1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/skb.proto
3
4 #include "protos/perfetto/trace/ftrace/skb.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 {
KfreeSkbFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR KfreeSkbFtraceEvent::KfreeSkbFtraceEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.location_)*/::uint64_t{0u}
28 , /*decltype(_impl_.skbaddr_)*/::uint64_t{0u}
29 , /*decltype(_impl_.protocol_)*/0u} {}
30 struct KfreeSkbFtraceEventDefaultTypeInternal {
KfreeSkbFtraceEventDefaultTypeInternalperfetto::protos::KfreeSkbFtraceEventDefaultTypeInternal31 PROTOBUF_CONSTEXPR KfreeSkbFtraceEventDefaultTypeInternal()
32 : _instance(::_pbi::ConstantInitialized{}) {}
~KfreeSkbFtraceEventDefaultTypeInternalperfetto::protos::KfreeSkbFtraceEventDefaultTypeInternal33 ~KfreeSkbFtraceEventDefaultTypeInternal() {}
34 union { // NOLINT(misc-non-private-member-variables-in-classes)
35 KfreeSkbFtraceEvent _instance;
36 };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KfreeSkbFtraceEventDefaultTypeInternal _KfreeSkbFtraceEvent_default_instance_;
39 } // namespace protos
40 } // namespace perfetto
41 namespace perfetto {
42 namespace protos {
43
44 // ===================================================================
45
46 class KfreeSkbFtraceEvent::_Internal {
47 public:
48 using HasBits = decltype(std::declval<KfreeSkbFtraceEvent>()._impl_._has_bits_);
set_has_location(HasBits * has_bits)49 static void set_has_location(HasBits* has_bits) {
50 (*has_bits)[0] |= 1u;
51 }
set_has_protocol(HasBits * has_bits)52 static void set_has_protocol(HasBits* has_bits) {
53 (*has_bits)[0] |= 4u;
54 }
set_has_skbaddr(HasBits * has_bits)55 static void set_has_skbaddr(HasBits* has_bits) {
56 (*has_bits)[0] |= 2u;
57 }
58 };
59
KfreeSkbFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)60 KfreeSkbFtraceEvent::KfreeSkbFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
61 bool is_message_owned)
62 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
63 SharedCtor(arena, is_message_owned);
64 // @@protoc_insertion_point(arena_constructor:perfetto.protos.KfreeSkbFtraceEvent)
65 }
KfreeSkbFtraceEvent(const KfreeSkbFtraceEvent & from)66 KfreeSkbFtraceEvent::KfreeSkbFtraceEvent(const KfreeSkbFtraceEvent& from)
67 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
68 KfreeSkbFtraceEvent* const _this = this; (void)_this;
69 new (&_impl_) Impl_{
70 decltype(_impl_._has_bits_){from._impl_._has_bits_}
71 , /*decltype(_impl_._cached_size_)*/{}
72 , decltype(_impl_.location_){}
73 , decltype(_impl_.skbaddr_){}
74 , decltype(_impl_.protocol_){}};
75
76 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
77 ::memcpy(&_impl_.location_, &from._impl_.location_,
78 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.protocol_) -
79 reinterpret_cast<char*>(&_impl_.location_)) + sizeof(_impl_.protocol_));
80 // @@protoc_insertion_point(copy_constructor:perfetto.protos.KfreeSkbFtraceEvent)
81 }
82
SharedCtor(::_pb::Arena * arena,bool is_message_owned)83 inline void KfreeSkbFtraceEvent::SharedCtor(
84 ::_pb::Arena* arena, bool is_message_owned) {
85 (void)arena;
86 (void)is_message_owned;
87 new (&_impl_) Impl_{
88 decltype(_impl_._has_bits_){}
89 , /*decltype(_impl_._cached_size_)*/{}
90 , decltype(_impl_.location_){::uint64_t{0u}}
91 , decltype(_impl_.skbaddr_){::uint64_t{0u}}
92 , decltype(_impl_.protocol_){0u}
93 };
94 }
95
~KfreeSkbFtraceEvent()96 KfreeSkbFtraceEvent::~KfreeSkbFtraceEvent() {
97 // @@protoc_insertion_point(destructor:perfetto.protos.KfreeSkbFtraceEvent)
98 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
99 (void)arena;
100 return;
101 }
102 SharedDtor();
103 }
104
SharedDtor()105 inline void KfreeSkbFtraceEvent::SharedDtor() {
106 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
107 }
108
SetCachedSize(int size) const109 void KfreeSkbFtraceEvent::SetCachedSize(int size) const {
110 _impl_._cached_size_.Set(size);
111 }
112
Clear()113 void KfreeSkbFtraceEvent::Clear() {
114 // @@protoc_insertion_point(message_clear_start:perfetto.protos.KfreeSkbFtraceEvent)
115 ::uint32_t cached_has_bits = 0;
116 // Prevent compiler warnings about cached_has_bits being unused
117 (void) cached_has_bits;
118
119 cached_has_bits = _impl_._has_bits_[0];
120 if (cached_has_bits & 0x00000007u) {
121 ::memset(&_impl_.location_, 0, static_cast<size_t>(
122 reinterpret_cast<char*>(&_impl_.protocol_) -
123 reinterpret_cast<char*>(&_impl_.location_)) + sizeof(_impl_.protocol_));
124 }
125 _impl_._has_bits_.Clear();
126 _internal_metadata_.Clear<std::string>();
127 }
128
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)129 const char* KfreeSkbFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
130 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
131 _Internal::HasBits has_bits{};
132 while (!ctx->Done(&ptr)) {
133 ::uint32_t tag;
134 ptr = ::_pbi::ReadTag(ptr, &tag);
135 switch (tag >> 3) {
136 // optional uint64 location = 1;
137 case 1:
138 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
139 _Internal::set_has_location(&has_bits);
140 _impl_.location_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
141 CHK_(ptr);
142 } else {
143 goto handle_unusual;
144 }
145 continue;
146 // optional uint32 protocol = 2;
147 case 2:
148 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
149 _Internal::set_has_protocol(&has_bits);
150 _impl_.protocol_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
151 CHK_(ptr);
152 } else {
153 goto handle_unusual;
154 }
155 continue;
156 // optional uint64 skbaddr = 3;
157 case 3:
158 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
159 _Internal::set_has_skbaddr(&has_bits);
160 _impl_.skbaddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
161 CHK_(ptr);
162 } else {
163 goto handle_unusual;
164 }
165 continue;
166 default:
167 goto handle_unusual;
168 } // switch
169 handle_unusual:
170 if ((tag == 0) || ((tag & 7) == 4)) {
171 CHK_(ptr);
172 ctx->SetLastTag(tag);
173 goto message_done;
174 }
175 ptr = UnknownFieldParse(
176 tag,
177 _internal_metadata_.mutable_unknown_fields<std::string>(),
178 ptr, ctx);
179 CHK_(ptr != nullptr);
180 } // while
181 message_done:
182 _impl_._has_bits_.Or(has_bits);
183 return ptr;
184 failure:
185 ptr = nullptr;
186 goto message_done;
187 #undef CHK_
188 }
189
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const190 ::uint8_t* KfreeSkbFtraceEvent::_InternalSerialize(
191 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
192 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.KfreeSkbFtraceEvent)
193 ::uint32_t cached_has_bits = 0;
194 (void) cached_has_bits;
195
196 cached_has_bits = _impl_._has_bits_[0];
197 // optional uint64 location = 1;
198 if (cached_has_bits & 0x00000001u) {
199 target = stream->EnsureSpace(target);
200 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_location(), target);
201 }
202
203 // optional uint32 protocol = 2;
204 if (cached_has_bits & 0x00000004u) {
205 target = stream->EnsureSpace(target);
206 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_protocol(), target);
207 }
208
209 // optional uint64 skbaddr = 3;
210 if (cached_has_bits & 0x00000002u) {
211 target = stream->EnsureSpace(target);
212 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_skbaddr(), target);
213 }
214
215 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
216 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
217 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
218 }
219 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.KfreeSkbFtraceEvent)
220 return target;
221 }
222
ByteSizeLong() const223 size_t KfreeSkbFtraceEvent::ByteSizeLong() const {
224 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.KfreeSkbFtraceEvent)
225 size_t total_size = 0;
226
227 ::uint32_t cached_has_bits = 0;
228 // Prevent compiler warnings about cached_has_bits being unused
229 (void) cached_has_bits;
230
231 cached_has_bits = _impl_._has_bits_[0];
232 if (cached_has_bits & 0x00000007u) {
233 // optional uint64 location = 1;
234 if (cached_has_bits & 0x00000001u) {
235 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_location());
236 }
237
238 // optional uint64 skbaddr = 3;
239 if (cached_has_bits & 0x00000002u) {
240 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_skbaddr());
241 }
242
243 // optional uint32 protocol = 2;
244 if (cached_has_bits & 0x00000004u) {
245 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_protocol());
246 }
247
248 }
249 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
250 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
251 }
252 int cached_size = ::_pbi::ToCachedSize(total_size);
253 SetCachedSize(cached_size);
254 return total_size;
255 }
256
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)257 void KfreeSkbFtraceEvent::CheckTypeAndMergeFrom(
258 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
259 MergeFrom(*::_pbi::DownCast<const KfreeSkbFtraceEvent*>(
260 &from));
261 }
262
MergeFrom(const KfreeSkbFtraceEvent & from)263 void KfreeSkbFtraceEvent::MergeFrom(const KfreeSkbFtraceEvent& from) {
264 KfreeSkbFtraceEvent* const _this = this;
265 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.KfreeSkbFtraceEvent)
266 GOOGLE_DCHECK_NE(&from, _this);
267 ::uint32_t cached_has_bits = 0;
268 (void) cached_has_bits;
269
270 cached_has_bits = from._impl_._has_bits_[0];
271 if (cached_has_bits & 0x00000007u) {
272 if (cached_has_bits & 0x00000001u) {
273 _this->_impl_.location_ = from._impl_.location_;
274 }
275 if (cached_has_bits & 0x00000002u) {
276 _this->_impl_.skbaddr_ = from._impl_.skbaddr_;
277 }
278 if (cached_has_bits & 0x00000004u) {
279 _this->_impl_.protocol_ = from._impl_.protocol_;
280 }
281 _this->_impl_._has_bits_[0] |= cached_has_bits;
282 }
283 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
284 }
285
CopyFrom(const KfreeSkbFtraceEvent & from)286 void KfreeSkbFtraceEvent::CopyFrom(const KfreeSkbFtraceEvent& from) {
287 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.KfreeSkbFtraceEvent)
288 if (&from == this) return;
289 Clear();
290 MergeFrom(from);
291 }
292
IsInitialized() const293 bool KfreeSkbFtraceEvent::IsInitialized() const {
294 return true;
295 }
296
InternalSwap(KfreeSkbFtraceEvent * other)297 void KfreeSkbFtraceEvent::InternalSwap(KfreeSkbFtraceEvent* other) {
298 using std::swap;
299 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
300 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
301 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
302 PROTOBUF_FIELD_OFFSET(KfreeSkbFtraceEvent, _impl_.protocol_)
303 + sizeof(KfreeSkbFtraceEvent::_impl_.protocol_) // NOLINT
304 - PROTOBUF_FIELD_OFFSET(KfreeSkbFtraceEvent, _impl_.location_)>(
305 reinterpret_cast<char*>(&_impl_.location_),
306 reinterpret_cast<char*>(&other->_impl_.location_));
307 }
308
GetTypeName() const309 std::string KfreeSkbFtraceEvent::GetTypeName() const {
310 return "perfetto.protos.KfreeSkbFtraceEvent";
311 }
312
313
314 // @@protoc_insertion_point(namespace_scope)
315 } // namespace protos
316 } // namespace perfetto
317 PROTOBUF_NAMESPACE_OPEN
318 template<> PROTOBUF_NOINLINE ::perfetto::protos::KfreeSkbFtraceEvent*
CreateMaybeMessage(Arena * arena)319 Arena::CreateMaybeMessage< ::perfetto::protos::KfreeSkbFtraceEvent >(Arena* arena) {
320 return Arena::CreateMessageInternal< ::perfetto::protos::KfreeSkbFtraceEvent >(arena);
321 }
322 PROTOBUF_NAMESPACE_CLOSE
323
324 // @@protoc_insertion_point(global_scope)
325 #include <google/protobuf/port_undef.inc>
326