1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/filemap.proto
3
4 #include "protos/perfetto/trace/ftrace/filemap.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 {
MmFilemapAddToPageCacheFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR MmFilemapAddToPageCacheFtraceEvent::MmFilemapAddToPageCacheFtraceEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.pfn_)*/::uint64_t{0u}
28 , /*decltype(_impl_.i_ino_)*/::uint64_t{0u}
29 , /*decltype(_impl_.index_)*/::uint64_t{0u}
30 , /*decltype(_impl_.s_dev_)*/::uint64_t{0u}
31 , /*decltype(_impl_.page_)*/::uint64_t{0u}} {}
32 struct MmFilemapAddToPageCacheFtraceEventDefaultTypeInternal {
MmFilemapAddToPageCacheFtraceEventDefaultTypeInternalperfetto::protos::MmFilemapAddToPageCacheFtraceEventDefaultTypeInternal33 PROTOBUF_CONSTEXPR MmFilemapAddToPageCacheFtraceEventDefaultTypeInternal()
34 : _instance(::_pbi::ConstantInitialized{}) {}
~MmFilemapAddToPageCacheFtraceEventDefaultTypeInternalperfetto::protos::MmFilemapAddToPageCacheFtraceEventDefaultTypeInternal35 ~MmFilemapAddToPageCacheFtraceEventDefaultTypeInternal() {}
36 union { // NOLINT(misc-non-private-member-variables-in-classes)
37 MmFilemapAddToPageCacheFtraceEvent _instance;
38 };
39 };
40 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MmFilemapAddToPageCacheFtraceEventDefaultTypeInternal _MmFilemapAddToPageCacheFtraceEvent_default_instance_;
MmFilemapDeleteFromPageCacheFtraceEvent(::_pbi::ConstantInitialized)41 PROTOBUF_CONSTEXPR MmFilemapDeleteFromPageCacheFtraceEvent::MmFilemapDeleteFromPageCacheFtraceEvent(
42 ::_pbi::ConstantInitialized): _impl_{
43 /*decltype(_impl_._has_bits_)*/{}
44 , /*decltype(_impl_._cached_size_)*/{}
45 , /*decltype(_impl_.pfn_)*/::uint64_t{0u}
46 , /*decltype(_impl_.i_ino_)*/::uint64_t{0u}
47 , /*decltype(_impl_.index_)*/::uint64_t{0u}
48 , /*decltype(_impl_.s_dev_)*/::uint64_t{0u}
49 , /*decltype(_impl_.page_)*/::uint64_t{0u}} {}
50 struct MmFilemapDeleteFromPageCacheFtraceEventDefaultTypeInternal {
MmFilemapDeleteFromPageCacheFtraceEventDefaultTypeInternalperfetto::protos::MmFilemapDeleteFromPageCacheFtraceEventDefaultTypeInternal51 PROTOBUF_CONSTEXPR MmFilemapDeleteFromPageCacheFtraceEventDefaultTypeInternal()
52 : _instance(::_pbi::ConstantInitialized{}) {}
~MmFilemapDeleteFromPageCacheFtraceEventDefaultTypeInternalperfetto::protos::MmFilemapDeleteFromPageCacheFtraceEventDefaultTypeInternal53 ~MmFilemapDeleteFromPageCacheFtraceEventDefaultTypeInternal() {}
54 union { // NOLINT(misc-non-private-member-variables-in-classes)
55 MmFilemapDeleteFromPageCacheFtraceEvent _instance;
56 };
57 };
58 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MmFilemapDeleteFromPageCacheFtraceEventDefaultTypeInternal _MmFilemapDeleteFromPageCacheFtraceEvent_default_instance_;
59 } // namespace protos
60 } // namespace perfetto
61 namespace perfetto {
62 namespace protos {
63
64 // ===================================================================
65
66 class MmFilemapAddToPageCacheFtraceEvent::_Internal {
67 public:
68 using HasBits = decltype(std::declval<MmFilemapAddToPageCacheFtraceEvent>()._impl_._has_bits_);
set_has_pfn(HasBits * has_bits)69 static void set_has_pfn(HasBits* has_bits) {
70 (*has_bits)[0] |= 1u;
71 }
set_has_i_ino(HasBits * has_bits)72 static void set_has_i_ino(HasBits* has_bits) {
73 (*has_bits)[0] |= 2u;
74 }
set_has_index(HasBits * has_bits)75 static void set_has_index(HasBits* has_bits) {
76 (*has_bits)[0] |= 4u;
77 }
set_has_s_dev(HasBits * has_bits)78 static void set_has_s_dev(HasBits* has_bits) {
79 (*has_bits)[0] |= 8u;
80 }
set_has_page(HasBits * has_bits)81 static void set_has_page(HasBits* has_bits) {
82 (*has_bits)[0] |= 16u;
83 }
84 };
85
MmFilemapAddToPageCacheFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)86 MmFilemapAddToPageCacheFtraceEvent::MmFilemapAddToPageCacheFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
87 bool is_message_owned)
88 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
89 SharedCtor(arena, is_message_owned);
90 // @@protoc_insertion_point(arena_constructor:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
91 }
MmFilemapAddToPageCacheFtraceEvent(const MmFilemapAddToPageCacheFtraceEvent & from)92 MmFilemapAddToPageCacheFtraceEvent::MmFilemapAddToPageCacheFtraceEvent(const MmFilemapAddToPageCacheFtraceEvent& from)
93 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
94 MmFilemapAddToPageCacheFtraceEvent* const _this = this; (void)_this;
95 new (&_impl_) Impl_{
96 decltype(_impl_._has_bits_){from._impl_._has_bits_}
97 , /*decltype(_impl_._cached_size_)*/{}
98 , decltype(_impl_.pfn_){}
99 , decltype(_impl_.i_ino_){}
100 , decltype(_impl_.index_){}
101 , decltype(_impl_.s_dev_){}
102 , decltype(_impl_.page_){}};
103
104 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
105 ::memcpy(&_impl_.pfn_, &from._impl_.pfn_,
106 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.page_) -
107 reinterpret_cast<char*>(&_impl_.pfn_)) + sizeof(_impl_.page_));
108 // @@protoc_insertion_point(copy_constructor:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
109 }
110
SharedCtor(::_pb::Arena * arena,bool is_message_owned)111 inline void MmFilemapAddToPageCacheFtraceEvent::SharedCtor(
112 ::_pb::Arena* arena, bool is_message_owned) {
113 (void)arena;
114 (void)is_message_owned;
115 new (&_impl_) Impl_{
116 decltype(_impl_._has_bits_){}
117 , /*decltype(_impl_._cached_size_)*/{}
118 , decltype(_impl_.pfn_){::uint64_t{0u}}
119 , decltype(_impl_.i_ino_){::uint64_t{0u}}
120 , decltype(_impl_.index_){::uint64_t{0u}}
121 , decltype(_impl_.s_dev_){::uint64_t{0u}}
122 , decltype(_impl_.page_){::uint64_t{0u}}
123 };
124 }
125
~MmFilemapAddToPageCacheFtraceEvent()126 MmFilemapAddToPageCacheFtraceEvent::~MmFilemapAddToPageCacheFtraceEvent() {
127 // @@protoc_insertion_point(destructor:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
128 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
129 (void)arena;
130 return;
131 }
132 SharedDtor();
133 }
134
SharedDtor()135 inline void MmFilemapAddToPageCacheFtraceEvent::SharedDtor() {
136 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
137 }
138
SetCachedSize(int size) const139 void MmFilemapAddToPageCacheFtraceEvent::SetCachedSize(int size) const {
140 _impl_._cached_size_.Set(size);
141 }
142
Clear()143 void MmFilemapAddToPageCacheFtraceEvent::Clear() {
144 // @@protoc_insertion_point(message_clear_start:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
145 ::uint32_t cached_has_bits = 0;
146 // Prevent compiler warnings about cached_has_bits being unused
147 (void) cached_has_bits;
148
149 cached_has_bits = _impl_._has_bits_[0];
150 if (cached_has_bits & 0x0000001fu) {
151 ::memset(&_impl_.pfn_, 0, static_cast<size_t>(
152 reinterpret_cast<char*>(&_impl_.page_) -
153 reinterpret_cast<char*>(&_impl_.pfn_)) + sizeof(_impl_.page_));
154 }
155 _impl_._has_bits_.Clear();
156 _internal_metadata_.Clear<std::string>();
157 }
158
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)159 const char* MmFilemapAddToPageCacheFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
160 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
161 _Internal::HasBits has_bits{};
162 while (!ctx->Done(&ptr)) {
163 ::uint32_t tag;
164 ptr = ::_pbi::ReadTag(ptr, &tag);
165 switch (tag >> 3) {
166 // optional uint64 pfn = 1;
167 case 1:
168 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
169 _Internal::set_has_pfn(&has_bits);
170 _impl_.pfn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
171 CHK_(ptr);
172 } else {
173 goto handle_unusual;
174 }
175 continue;
176 // optional uint64 i_ino = 2;
177 case 2:
178 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
179 _Internal::set_has_i_ino(&has_bits);
180 _impl_.i_ino_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
181 CHK_(ptr);
182 } else {
183 goto handle_unusual;
184 }
185 continue;
186 // optional uint64 index = 3;
187 case 3:
188 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
189 _Internal::set_has_index(&has_bits);
190 _impl_.index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
191 CHK_(ptr);
192 } else {
193 goto handle_unusual;
194 }
195 continue;
196 // optional uint64 s_dev = 4;
197 case 4:
198 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
199 _Internal::set_has_s_dev(&has_bits);
200 _impl_.s_dev_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
201 CHK_(ptr);
202 } else {
203 goto handle_unusual;
204 }
205 continue;
206 // optional uint64 page = 5;
207 case 5:
208 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
209 _Internal::set_has_page(&has_bits);
210 _impl_.page_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
211 CHK_(ptr);
212 } else {
213 goto handle_unusual;
214 }
215 continue;
216 default:
217 goto handle_unusual;
218 } // switch
219 handle_unusual:
220 if ((tag == 0) || ((tag & 7) == 4)) {
221 CHK_(ptr);
222 ctx->SetLastTag(tag);
223 goto message_done;
224 }
225 ptr = UnknownFieldParse(
226 tag,
227 _internal_metadata_.mutable_unknown_fields<std::string>(),
228 ptr, ctx);
229 CHK_(ptr != nullptr);
230 } // while
231 message_done:
232 _impl_._has_bits_.Or(has_bits);
233 return ptr;
234 failure:
235 ptr = nullptr;
236 goto message_done;
237 #undef CHK_
238 }
239
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const240 ::uint8_t* MmFilemapAddToPageCacheFtraceEvent::_InternalSerialize(
241 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
242 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
243 ::uint32_t cached_has_bits = 0;
244 (void) cached_has_bits;
245
246 cached_has_bits = _impl_._has_bits_[0];
247 // optional uint64 pfn = 1;
248 if (cached_has_bits & 0x00000001u) {
249 target = stream->EnsureSpace(target);
250 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_pfn(), target);
251 }
252
253 // optional uint64 i_ino = 2;
254 if (cached_has_bits & 0x00000002u) {
255 target = stream->EnsureSpace(target);
256 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_i_ino(), target);
257 }
258
259 // optional uint64 index = 3;
260 if (cached_has_bits & 0x00000004u) {
261 target = stream->EnsureSpace(target);
262 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_index(), target);
263 }
264
265 // optional uint64 s_dev = 4;
266 if (cached_has_bits & 0x00000008u) {
267 target = stream->EnsureSpace(target);
268 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_s_dev(), target);
269 }
270
271 // optional uint64 page = 5;
272 if (cached_has_bits & 0x00000010u) {
273 target = stream->EnsureSpace(target);
274 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_page(), target);
275 }
276
277 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
278 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
279 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
280 }
281 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
282 return target;
283 }
284
ByteSizeLong() const285 size_t MmFilemapAddToPageCacheFtraceEvent::ByteSizeLong() const {
286 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
287 size_t total_size = 0;
288
289 ::uint32_t cached_has_bits = 0;
290 // Prevent compiler warnings about cached_has_bits being unused
291 (void) cached_has_bits;
292
293 cached_has_bits = _impl_._has_bits_[0];
294 if (cached_has_bits & 0x0000001fu) {
295 // optional uint64 pfn = 1;
296 if (cached_has_bits & 0x00000001u) {
297 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_pfn());
298 }
299
300 // optional uint64 i_ino = 2;
301 if (cached_has_bits & 0x00000002u) {
302 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_i_ino());
303 }
304
305 // optional uint64 index = 3;
306 if (cached_has_bits & 0x00000004u) {
307 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_index());
308 }
309
310 // optional uint64 s_dev = 4;
311 if (cached_has_bits & 0x00000008u) {
312 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_s_dev());
313 }
314
315 // optional uint64 page = 5;
316 if (cached_has_bits & 0x00000010u) {
317 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_page());
318 }
319
320 }
321 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
322 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
323 }
324 int cached_size = ::_pbi::ToCachedSize(total_size);
325 SetCachedSize(cached_size);
326 return total_size;
327 }
328
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)329 void MmFilemapAddToPageCacheFtraceEvent::CheckTypeAndMergeFrom(
330 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
331 MergeFrom(*::_pbi::DownCast<const MmFilemapAddToPageCacheFtraceEvent*>(
332 &from));
333 }
334
MergeFrom(const MmFilemapAddToPageCacheFtraceEvent & from)335 void MmFilemapAddToPageCacheFtraceEvent::MergeFrom(const MmFilemapAddToPageCacheFtraceEvent& from) {
336 MmFilemapAddToPageCacheFtraceEvent* const _this = this;
337 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
338 GOOGLE_DCHECK_NE(&from, _this);
339 ::uint32_t cached_has_bits = 0;
340 (void) cached_has_bits;
341
342 cached_has_bits = from._impl_._has_bits_[0];
343 if (cached_has_bits & 0x0000001fu) {
344 if (cached_has_bits & 0x00000001u) {
345 _this->_impl_.pfn_ = from._impl_.pfn_;
346 }
347 if (cached_has_bits & 0x00000002u) {
348 _this->_impl_.i_ino_ = from._impl_.i_ino_;
349 }
350 if (cached_has_bits & 0x00000004u) {
351 _this->_impl_.index_ = from._impl_.index_;
352 }
353 if (cached_has_bits & 0x00000008u) {
354 _this->_impl_.s_dev_ = from._impl_.s_dev_;
355 }
356 if (cached_has_bits & 0x00000010u) {
357 _this->_impl_.page_ = from._impl_.page_;
358 }
359 _this->_impl_._has_bits_[0] |= cached_has_bits;
360 }
361 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
362 }
363
CopyFrom(const MmFilemapAddToPageCacheFtraceEvent & from)364 void MmFilemapAddToPageCacheFtraceEvent::CopyFrom(const MmFilemapAddToPageCacheFtraceEvent& from) {
365 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
366 if (&from == this) return;
367 Clear();
368 MergeFrom(from);
369 }
370
IsInitialized() const371 bool MmFilemapAddToPageCacheFtraceEvent::IsInitialized() const {
372 return true;
373 }
374
InternalSwap(MmFilemapAddToPageCacheFtraceEvent * other)375 void MmFilemapAddToPageCacheFtraceEvent::InternalSwap(MmFilemapAddToPageCacheFtraceEvent* other) {
376 using std::swap;
377 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
378 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
379 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
380 PROTOBUF_FIELD_OFFSET(MmFilemapAddToPageCacheFtraceEvent, _impl_.page_)
381 + sizeof(MmFilemapAddToPageCacheFtraceEvent::_impl_.page_) // NOLINT
382 - PROTOBUF_FIELD_OFFSET(MmFilemapAddToPageCacheFtraceEvent, _impl_.pfn_)>(
383 reinterpret_cast<char*>(&_impl_.pfn_),
384 reinterpret_cast<char*>(&other->_impl_.pfn_));
385 }
386
GetTypeName() const387 std::string MmFilemapAddToPageCacheFtraceEvent::GetTypeName() const {
388 return "perfetto.protos.MmFilemapAddToPageCacheFtraceEvent";
389 }
390
391
392 // ===================================================================
393
394 class MmFilemapDeleteFromPageCacheFtraceEvent::_Internal {
395 public:
396 using HasBits = decltype(std::declval<MmFilemapDeleteFromPageCacheFtraceEvent>()._impl_._has_bits_);
set_has_pfn(HasBits * has_bits)397 static void set_has_pfn(HasBits* has_bits) {
398 (*has_bits)[0] |= 1u;
399 }
set_has_i_ino(HasBits * has_bits)400 static void set_has_i_ino(HasBits* has_bits) {
401 (*has_bits)[0] |= 2u;
402 }
set_has_index(HasBits * has_bits)403 static void set_has_index(HasBits* has_bits) {
404 (*has_bits)[0] |= 4u;
405 }
set_has_s_dev(HasBits * has_bits)406 static void set_has_s_dev(HasBits* has_bits) {
407 (*has_bits)[0] |= 8u;
408 }
set_has_page(HasBits * has_bits)409 static void set_has_page(HasBits* has_bits) {
410 (*has_bits)[0] |= 16u;
411 }
412 };
413
MmFilemapDeleteFromPageCacheFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)414 MmFilemapDeleteFromPageCacheFtraceEvent::MmFilemapDeleteFromPageCacheFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
415 bool is_message_owned)
416 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
417 SharedCtor(arena, is_message_owned);
418 // @@protoc_insertion_point(arena_constructor:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
419 }
MmFilemapDeleteFromPageCacheFtraceEvent(const MmFilemapDeleteFromPageCacheFtraceEvent & from)420 MmFilemapDeleteFromPageCacheFtraceEvent::MmFilemapDeleteFromPageCacheFtraceEvent(const MmFilemapDeleteFromPageCacheFtraceEvent& from)
421 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
422 MmFilemapDeleteFromPageCacheFtraceEvent* const _this = this; (void)_this;
423 new (&_impl_) Impl_{
424 decltype(_impl_._has_bits_){from._impl_._has_bits_}
425 , /*decltype(_impl_._cached_size_)*/{}
426 , decltype(_impl_.pfn_){}
427 , decltype(_impl_.i_ino_){}
428 , decltype(_impl_.index_){}
429 , decltype(_impl_.s_dev_){}
430 , decltype(_impl_.page_){}};
431
432 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
433 ::memcpy(&_impl_.pfn_, &from._impl_.pfn_,
434 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.page_) -
435 reinterpret_cast<char*>(&_impl_.pfn_)) + sizeof(_impl_.page_));
436 // @@protoc_insertion_point(copy_constructor:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
437 }
438
SharedCtor(::_pb::Arena * arena,bool is_message_owned)439 inline void MmFilemapDeleteFromPageCacheFtraceEvent::SharedCtor(
440 ::_pb::Arena* arena, bool is_message_owned) {
441 (void)arena;
442 (void)is_message_owned;
443 new (&_impl_) Impl_{
444 decltype(_impl_._has_bits_){}
445 , /*decltype(_impl_._cached_size_)*/{}
446 , decltype(_impl_.pfn_){::uint64_t{0u}}
447 , decltype(_impl_.i_ino_){::uint64_t{0u}}
448 , decltype(_impl_.index_){::uint64_t{0u}}
449 , decltype(_impl_.s_dev_){::uint64_t{0u}}
450 , decltype(_impl_.page_){::uint64_t{0u}}
451 };
452 }
453
~MmFilemapDeleteFromPageCacheFtraceEvent()454 MmFilemapDeleteFromPageCacheFtraceEvent::~MmFilemapDeleteFromPageCacheFtraceEvent() {
455 // @@protoc_insertion_point(destructor:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
456 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
457 (void)arena;
458 return;
459 }
460 SharedDtor();
461 }
462
SharedDtor()463 inline void MmFilemapDeleteFromPageCacheFtraceEvent::SharedDtor() {
464 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
465 }
466
SetCachedSize(int size) const467 void MmFilemapDeleteFromPageCacheFtraceEvent::SetCachedSize(int size) const {
468 _impl_._cached_size_.Set(size);
469 }
470
Clear()471 void MmFilemapDeleteFromPageCacheFtraceEvent::Clear() {
472 // @@protoc_insertion_point(message_clear_start:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
473 ::uint32_t cached_has_bits = 0;
474 // Prevent compiler warnings about cached_has_bits being unused
475 (void) cached_has_bits;
476
477 cached_has_bits = _impl_._has_bits_[0];
478 if (cached_has_bits & 0x0000001fu) {
479 ::memset(&_impl_.pfn_, 0, static_cast<size_t>(
480 reinterpret_cast<char*>(&_impl_.page_) -
481 reinterpret_cast<char*>(&_impl_.pfn_)) + sizeof(_impl_.page_));
482 }
483 _impl_._has_bits_.Clear();
484 _internal_metadata_.Clear<std::string>();
485 }
486
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)487 const char* MmFilemapDeleteFromPageCacheFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
488 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
489 _Internal::HasBits has_bits{};
490 while (!ctx->Done(&ptr)) {
491 ::uint32_t tag;
492 ptr = ::_pbi::ReadTag(ptr, &tag);
493 switch (tag >> 3) {
494 // optional uint64 pfn = 1;
495 case 1:
496 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
497 _Internal::set_has_pfn(&has_bits);
498 _impl_.pfn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
499 CHK_(ptr);
500 } else {
501 goto handle_unusual;
502 }
503 continue;
504 // optional uint64 i_ino = 2;
505 case 2:
506 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
507 _Internal::set_has_i_ino(&has_bits);
508 _impl_.i_ino_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
509 CHK_(ptr);
510 } else {
511 goto handle_unusual;
512 }
513 continue;
514 // optional uint64 index = 3;
515 case 3:
516 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
517 _Internal::set_has_index(&has_bits);
518 _impl_.index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
519 CHK_(ptr);
520 } else {
521 goto handle_unusual;
522 }
523 continue;
524 // optional uint64 s_dev = 4;
525 case 4:
526 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
527 _Internal::set_has_s_dev(&has_bits);
528 _impl_.s_dev_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
529 CHK_(ptr);
530 } else {
531 goto handle_unusual;
532 }
533 continue;
534 // optional uint64 page = 5;
535 case 5:
536 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
537 _Internal::set_has_page(&has_bits);
538 _impl_.page_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
539 CHK_(ptr);
540 } else {
541 goto handle_unusual;
542 }
543 continue;
544 default:
545 goto handle_unusual;
546 } // switch
547 handle_unusual:
548 if ((tag == 0) || ((tag & 7) == 4)) {
549 CHK_(ptr);
550 ctx->SetLastTag(tag);
551 goto message_done;
552 }
553 ptr = UnknownFieldParse(
554 tag,
555 _internal_metadata_.mutable_unknown_fields<std::string>(),
556 ptr, ctx);
557 CHK_(ptr != nullptr);
558 } // while
559 message_done:
560 _impl_._has_bits_.Or(has_bits);
561 return ptr;
562 failure:
563 ptr = nullptr;
564 goto message_done;
565 #undef CHK_
566 }
567
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const568 ::uint8_t* MmFilemapDeleteFromPageCacheFtraceEvent::_InternalSerialize(
569 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
570 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
571 ::uint32_t cached_has_bits = 0;
572 (void) cached_has_bits;
573
574 cached_has_bits = _impl_._has_bits_[0];
575 // optional uint64 pfn = 1;
576 if (cached_has_bits & 0x00000001u) {
577 target = stream->EnsureSpace(target);
578 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_pfn(), target);
579 }
580
581 // optional uint64 i_ino = 2;
582 if (cached_has_bits & 0x00000002u) {
583 target = stream->EnsureSpace(target);
584 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_i_ino(), target);
585 }
586
587 // optional uint64 index = 3;
588 if (cached_has_bits & 0x00000004u) {
589 target = stream->EnsureSpace(target);
590 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_index(), target);
591 }
592
593 // optional uint64 s_dev = 4;
594 if (cached_has_bits & 0x00000008u) {
595 target = stream->EnsureSpace(target);
596 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_s_dev(), target);
597 }
598
599 // optional uint64 page = 5;
600 if (cached_has_bits & 0x00000010u) {
601 target = stream->EnsureSpace(target);
602 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_page(), target);
603 }
604
605 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
606 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
607 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
608 }
609 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
610 return target;
611 }
612
ByteSizeLong() const613 size_t MmFilemapDeleteFromPageCacheFtraceEvent::ByteSizeLong() const {
614 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
615 size_t total_size = 0;
616
617 ::uint32_t cached_has_bits = 0;
618 // Prevent compiler warnings about cached_has_bits being unused
619 (void) cached_has_bits;
620
621 cached_has_bits = _impl_._has_bits_[0];
622 if (cached_has_bits & 0x0000001fu) {
623 // optional uint64 pfn = 1;
624 if (cached_has_bits & 0x00000001u) {
625 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_pfn());
626 }
627
628 // optional uint64 i_ino = 2;
629 if (cached_has_bits & 0x00000002u) {
630 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_i_ino());
631 }
632
633 // optional uint64 index = 3;
634 if (cached_has_bits & 0x00000004u) {
635 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_index());
636 }
637
638 // optional uint64 s_dev = 4;
639 if (cached_has_bits & 0x00000008u) {
640 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_s_dev());
641 }
642
643 // optional uint64 page = 5;
644 if (cached_has_bits & 0x00000010u) {
645 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_page());
646 }
647
648 }
649 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
650 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
651 }
652 int cached_size = ::_pbi::ToCachedSize(total_size);
653 SetCachedSize(cached_size);
654 return total_size;
655 }
656
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)657 void MmFilemapDeleteFromPageCacheFtraceEvent::CheckTypeAndMergeFrom(
658 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
659 MergeFrom(*::_pbi::DownCast<const MmFilemapDeleteFromPageCacheFtraceEvent*>(
660 &from));
661 }
662
MergeFrom(const MmFilemapDeleteFromPageCacheFtraceEvent & from)663 void MmFilemapDeleteFromPageCacheFtraceEvent::MergeFrom(const MmFilemapDeleteFromPageCacheFtraceEvent& from) {
664 MmFilemapDeleteFromPageCacheFtraceEvent* const _this = this;
665 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
666 GOOGLE_DCHECK_NE(&from, _this);
667 ::uint32_t cached_has_bits = 0;
668 (void) cached_has_bits;
669
670 cached_has_bits = from._impl_._has_bits_[0];
671 if (cached_has_bits & 0x0000001fu) {
672 if (cached_has_bits & 0x00000001u) {
673 _this->_impl_.pfn_ = from._impl_.pfn_;
674 }
675 if (cached_has_bits & 0x00000002u) {
676 _this->_impl_.i_ino_ = from._impl_.i_ino_;
677 }
678 if (cached_has_bits & 0x00000004u) {
679 _this->_impl_.index_ = from._impl_.index_;
680 }
681 if (cached_has_bits & 0x00000008u) {
682 _this->_impl_.s_dev_ = from._impl_.s_dev_;
683 }
684 if (cached_has_bits & 0x00000010u) {
685 _this->_impl_.page_ = from._impl_.page_;
686 }
687 _this->_impl_._has_bits_[0] |= cached_has_bits;
688 }
689 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
690 }
691
CopyFrom(const MmFilemapDeleteFromPageCacheFtraceEvent & from)692 void MmFilemapDeleteFromPageCacheFtraceEvent::CopyFrom(const MmFilemapDeleteFromPageCacheFtraceEvent& from) {
693 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
694 if (&from == this) return;
695 Clear();
696 MergeFrom(from);
697 }
698
IsInitialized() const699 bool MmFilemapDeleteFromPageCacheFtraceEvent::IsInitialized() const {
700 return true;
701 }
702
InternalSwap(MmFilemapDeleteFromPageCacheFtraceEvent * other)703 void MmFilemapDeleteFromPageCacheFtraceEvent::InternalSwap(MmFilemapDeleteFromPageCacheFtraceEvent* other) {
704 using std::swap;
705 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
706 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
707 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
708 PROTOBUF_FIELD_OFFSET(MmFilemapDeleteFromPageCacheFtraceEvent, _impl_.page_)
709 + sizeof(MmFilemapDeleteFromPageCacheFtraceEvent::_impl_.page_) // NOLINT
710 - PROTOBUF_FIELD_OFFSET(MmFilemapDeleteFromPageCacheFtraceEvent, _impl_.pfn_)>(
711 reinterpret_cast<char*>(&_impl_.pfn_),
712 reinterpret_cast<char*>(&other->_impl_.pfn_));
713 }
714
GetTypeName() const715 std::string MmFilemapDeleteFromPageCacheFtraceEvent::GetTypeName() const {
716 return "perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent";
717 }
718
719
720 // @@protoc_insertion_point(namespace_scope)
721 } // namespace protos
722 } // namespace perfetto
723 PROTOBUF_NAMESPACE_OPEN
724 template<> PROTOBUF_NOINLINE ::perfetto::protos::MmFilemapAddToPageCacheFtraceEvent*
CreateMaybeMessage(Arena * arena)725 Arena::CreateMaybeMessage< ::perfetto::protos::MmFilemapAddToPageCacheFtraceEvent >(Arena* arena) {
726 return Arena::CreateMessageInternal< ::perfetto::protos::MmFilemapAddToPageCacheFtraceEvent >(arena);
727 }
728 template<> PROTOBUF_NOINLINE ::perfetto::protos::MmFilemapDeleteFromPageCacheFtraceEvent*
CreateMaybeMessage(Arena * arena)729 Arena::CreateMaybeMessage< ::perfetto::protos::MmFilemapDeleteFromPageCacheFtraceEvent >(Arena* arena) {
730 return Arena::CreateMessageInternal< ::perfetto::protos::MmFilemapDeleteFromPageCacheFtraceEvent >(arena);
731 }
732 PROTOBUF_NAMESPACE_CLOSE
733
734 // @@protoc_insertion_point(global_scope)
735 #include <google/protobuf/port_undef.inc>
736