1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/oom.proto
3
4 #include "protos/perfetto/trace/ftrace/oom.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 {
OomScoreAdjUpdateFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR OomScoreAdjUpdateFtraceEvent::OomScoreAdjUpdateFtraceEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.comm_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.oom_score_adj_)*/0
29 , /*decltype(_impl_.pid_)*/0} {}
30 struct OomScoreAdjUpdateFtraceEventDefaultTypeInternal {
OomScoreAdjUpdateFtraceEventDefaultTypeInternalperfetto::protos::OomScoreAdjUpdateFtraceEventDefaultTypeInternal31 PROTOBUF_CONSTEXPR OomScoreAdjUpdateFtraceEventDefaultTypeInternal()
32 : _instance(::_pbi::ConstantInitialized{}) {}
~OomScoreAdjUpdateFtraceEventDefaultTypeInternalperfetto::protos::OomScoreAdjUpdateFtraceEventDefaultTypeInternal33 ~OomScoreAdjUpdateFtraceEventDefaultTypeInternal() {}
34 union { // NOLINT(misc-non-private-member-variables-in-classes)
35 OomScoreAdjUpdateFtraceEvent _instance;
36 };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OomScoreAdjUpdateFtraceEventDefaultTypeInternal _OomScoreAdjUpdateFtraceEvent_default_instance_;
MarkVictimFtraceEvent(::_pbi::ConstantInitialized)39 PROTOBUF_CONSTEXPR MarkVictimFtraceEvent::MarkVictimFtraceEvent(
40 ::_pbi::ConstantInitialized): _impl_{
41 /*decltype(_impl_._has_bits_)*/{}
42 , /*decltype(_impl_._cached_size_)*/{}
43 , /*decltype(_impl_.pid_)*/0} {}
44 struct MarkVictimFtraceEventDefaultTypeInternal {
MarkVictimFtraceEventDefaultTypeInternalperfetto::protos::MarkVictimFtraceEventDefaultTypeInternal45 PROTOBUF_CONSTEXPR MarkVictimFtraceEventDefaultTypeInternal()
46 : _instance(::_pbi::ConstantInitialized{}) {}
~MarkVictimFtraceEventDefaultTypeInternalperfetto::protos::MarkVictimFtraceEventDefaultTypeInternal47 ~MarkVictimFtraceEventDefaultTypeInternal() {}
48 union { // NOLINT(misc-non-private-member-variables-in-classes)
49 MarkVictimFtraceEvent _instance;
50 };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MarkVictimFtraceEventDefaultTypeInternal _MarkVictimFtraceEvent_default_instance_;
53 } // namespace protos
54 } // namespace perfetto
55 namespace perfetto {
56 namespace protos {
57
58 // ===================================================================
59
60 class OomScoreAdjUpdateFtraceEvent::_Internal {
61 public:
62 using HasBits = decltype(std::declval<OomScoreAdjUpdateFtraceEvent>()._impl_._has_bits_);
set_has_comm(HasBits * has_bits)63 static void set_has_comm(HasBits* has_bits) {
64 (*has_bits)[0] |= 1u;
65 }
set_has_oom_score_adj(HasBits * has_bits)66 static void set_has_oom_score_adj(HasBits* has_bits) {
67 (*has_bits)[0] |= 2u;
68 }
set_has_pid(HasBits * has_bits)69 static void set_has_pid(HasBits* has_bits) {
70 (*has_bits)[0] |= 4u;
71 }
72 };
73
OomScoreAdjUpdateFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)74 OomScoreAdjUpdateFtraceEvent::OomScoreAdjUpdateFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
75 bool is_message_owned)
76 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
77 SharedCtor(arena, is_message_owned);
78 // @@protoc_insertion_point(arena_constructor:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
79 }
OomScoreAdjUpdateFtraceEvent(const OomScoreAdjUpdateFtraceEvent & from)80 OomScoreAdjUpdateFtraceEvent::OomScoreAdjUpdateFtraceEvent(const OomScoreAdjUpdateFtraceEvent& from)
81 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
82 OomScoreAdjUpdateFtraceEvent* const _this = this; (void)_this;
83 new (&_impl_) Impl_{
84 decltype(_impl_._has_bits_){from._impl_._has_bits_}
85 , /*decltype(_impl_._cached_size_)*/{}
86 , decltype(_impl_.comm_){}
87 , decltype(_impl_.oom_score_adj_){}
88 , decltype(_impl_.pid_){}};
89
90 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
91 _impl_.comm_.InitDefault();
92 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
93 _impl_.comm_.Set("", GetArenaForAllocation());
94 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
95 if (from._internal_has_comm()) {
96 _this->_impl_.comm_.Set(from._internal_comm(),
97 _this->GetArenaForAllocation());
98 }
99 ::memcpy(&_impl_.oom_score_adj_, &from._impl_.oom_score_adj_,
100 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.pid_) -
101 reinterpret_cast<char*>(&_impl_.oom_score_adj_)) + sizeof(_impl_.pid_));
102 // @@protoc_insertion_point(copy_constructor:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
103 }
104
SharedCtor(::_pb::Arena * arena,bool is_message_owned)105 inline void OomScoreAdjUpdateFtraceEvent::SharedCtor(
106 ::_pb::Arena* arena, bool is_message_owned) {
107 (void)arena;
108 (void)is_message_owned;
109 new (&_impl_) Impl_{
110 decltype(_impl_._has_bits_){}
111 , /*decltype(_impl_._cached_size_)*/{}
112 , decltype(_impl_.comm_){}
113 , decltype(_impl_.oom_score_adj_){0}
114 , decltype(_impl_.pid_){0}
115 };
116 _impl_.comm_.InitDefault();
117 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
118 _impl_.comm_.Set("", GetArenaForAllocation());
119 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
120 }
121
~OomScoreAdjUpdateFtraceEvent()122 OomScoreAdjUpdateFtraceEvent::~OomScoreAdjUpdateFtraceEvent() {
123 // @@protoc_insertion_point(destructor:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
124 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
125 (void)arena;
126 return;
127 }
128 SharedDtor();
129 }
130
SharedDtor()131 inline void OomScoreAdjUpdateFtraceEvent::SharedDtor() {
132 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
133 _impl_.comm_.Destroy();
134 }
135
SetCachedSize(int size) const136 void OomScoreAdjUpdateFtraceEvent::SetCachedSize(int size) const {
137 _impl_._cached_size_.Set(size);
138 }
139
Clear()140 void OomScoreAdjUpdateFtraceEvent::Clear() {
141 // @@protoc_insertion_point(message_clear_start:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
142 ::uint32_t cached_has_bits = 0;
143 // Prevent compiler warnings about cached_has_bits being unused
144 (void) cached_has_bits;
145
146 cached_has_bits = _impl_._has_bits_[0];
147 if (cached_has_bits & 0x00000001u) {
148 _impl_.comm_.ClearNonDefaultToEmpty();
149 }
150 if (cached_has_bits & 0x00000006u) {
151 ::memset(&_impl_.oom_score_adj_, 0, static_cast<size_t>(
152 reinterpret_cast<char*>(&_impl_.pid_) -
153 reinterpret_cast<char*>(&_impl_.oom_score_adj_)) + sizeof(_impl_.pid_));
154 }
155 _impl_._has_bits_.Clear();
156 _internal_metadata_.Clear<std::string>();
157 }
158
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)159 const char* OomScoreAdjUpdateFtraceEvent::_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 string comm = 1;
167 case 1:
168 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
169 auto str = _internal_mutable_comm();
170 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
171 CHK_(ptr);
172 } else {
173 goto handle_unusual;
174 }
175 continue;
176 // optional int32 oom_score_adj = 2;
177 case 2:
178 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
179 _Internal::set_has_oom_score_adj(&has_bits);
180 _impl_.oom_score_adj_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
181 CHK_(ptr);
182 } else {
183 goto handle_unusual;
184 }
185 continue;
186 // optional int32 pid = 3;
187 case 3:
188 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
189 _Internal::set_has_pid(&has_bits);
190 _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
191 CHK_(ptr);
192 } else {
193 goto handle_unusual;
194 }
195 continue;
196 default:
197 goto handle_unusual;
198 } // switch
199 handle_unusual:
200 if ((tag == 0) || ((tag & 7) == 4)) {
201 CHK_(ptr);
202 ctx->SetLastTag(tag);
203 goto message_done;
204 }
205 ptr = UnknownFieldParse(
206 tag,
207 _internal_metadata_.mutable_unknown_fields<std::string>(),
208 ptr, ctx);
209 CHK_(ptr != nullptr);
210 } // while
211 message_done:
212 _impl_._has_bits_.Or(has_bits);
213 return ptr;
214 failure:
215 ptr = nullptr;
216 goto message_done;
217 #undef CHK_
218 }
219
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const220 ::uint8_t* OomScoreAdjUpdateFtraceEvent::_InternalSerialize(
221 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
222 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
223 ::uint32_t cached_has_bits = 0;
224 (void) cached_has_bits;
225
226 cached_has_bits = _impl_._has_bits_[0];
227 // optional string comm = 1;
228 if (cached_has_bits & 0x00000001u) {
229 target = stream->WriteStringMaybeAliased(
230 1, this->_internal_comm(), target);
231 }
232
233 // optional int32 oom_score_adj = 2;
234 if (cached_has_bits & 0x00000002u) {
235 target = stream->EnsureSpace(target);
236 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_oom_score_adj(), target);
237 }
238
239 // optional int32 pid = 3;
240 if (cached_has_bits & 0x00000004u) {
241 target = stream->EnsureSpace(target);
242 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_pid(), target);
243 }
244
245 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
246 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
247 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
248 }
249 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
250 return target;
251 }
252
ByteSizeLong() const253 size_t OomScoreAdjUpdateFtraceEvent::ByteSizeLong() const {
254 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
255 size_t total_size = 0;
256
257 ::uint32_t cached_has_bits = 0;
258 // Prevent compiler warnings about cached_has_bits being unused
259 (void) cached_has_bits;
260
261 cached_has_bits = _impl_._has_bits_[0];
262 if (cached_has_bits & 0x00000007u) {
263 // optional string comm = 1;
264 if (cached_has_bits & 0x00000001u) {
265 total_size += 1 +
266 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
267 this->_internal_comm());
268 }
269
270 // optional int32 oom_score_adj = 2;
271 if (cached_has_bits & 0x00000002u) {
272 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_oom_score_adj());
273 }
274
275 // optional int32 pid = 3;
276 if (cached_has_bits & 0x00000004u) {
277 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
278 }
279
280 }
281 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
282 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
283 }
284 int cached_size = ::_pbi::ToCachedSize(total_size);
285 SetCachedSize(cached_size);
286 return total_size;
287 }
288
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)289 void OomScoreAdjUpdateFtraceEvent::CheckTypeAndMergeFrom(
290 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
291 MergeFrom(*::_pbi::DownCast<const OomScoreAdjUpdateFtraceEvent*>(
292 &from));
293 }
294
MergeFrom(const OomScoreAdjUpdateFtraceEvent & from)295 void OomScoreAdjUpdateFtraceEvent::MergeFrom(const OomScoreAdjUpdateFtraceEvent& from) {
296 OomScoreAdjUpdateFtraceEvent* const _this = this;
297 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
298 GOOGLE_DCHECK_NE(&from, _this);
299 ::uint32_t cached_has_bits = 0;
300 (void) cached_has_bits;
301
302 cached_has_bits = from._impl_._has_bits_[0];
303 if (cached_has_bits & 0x00000007u) {
304 if (cached_has_bits & 0x00000001u) {
305 _this->_internal_set_comm(from._internal_comm());
306 }
307 if (cached_has_bits & 0x00000002u) {
308 _this->_impl_.oom_score_adj_ = from._impl_.oom_score_adj_;
309 }
310 if (cached_has_bits & 0x00000004u) {
311 _this->_impl_.pid_ = from._impl_.pid_;
312 }
313 _this->_impl_._has_bits_[0] |= cached_has_bits;
314 }
315 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
316 }
317
CopyFrom(const OomScoreAdjUpdateFtraceEvent & from)318 void OomScoreAdjUpdateFtraceEvent::CopyFrom(const OomScoreAdjUpdateFtraceEvent& from) {
319 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.OomScoreAdjUpdateFtraceEvent)
320 if (&from == this) return;
321 Clear();
322 MergeFrom(from);
323 }
324
IsInitialized() const325 bool OomScoreAdjUpdateFtraceEvent::IsInitialized() const {
326 return true;
327 }
328
InternalSwap(OomScoreAdjUpdateFtraceEvent * other)329 void OomScoreAdjUpdateFtraceEvent::InternalSwap(OomScoreAdjUpdateFtraceEvent* other) {
330 using std::swap;
331 auto* lhs_arena = GetArenaForAllocation();
332 auto* rhs_arena = other->GetArenaForAllocation();
333 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
334 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
335 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
336 &_impl_.comm_, lhs_arena,
337 &other->_impl_.comm_, rhs_arena
338 );
339 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
340 PROTOBUF_FIELD_OFFSET(OomScoreAdjUpdateFtraceEvent, _impl_.pid_)
341 + sizeof(OomScoreAdjUpdateFtraceEvent::_impl_.pid_) // NOLINT
342 - PROTOBUF_FIELD_OFFSET(OomScoreAdjUpdateFtraceEvent, _impl_.oom_score_adj_)>(
343 reinterpret_cast<char*>(&_impl_.oom_score_adj_),
344 reinterpret_cast<char*>(&other->_impl_.oom_score_adj_));
345 }
346
GetTypeName() const347 std::string OomScoreAdjUpdateFtraceEvent::GetTypeName() const {
348 return "perfetto.protos.OomScoreAdjUpdateFtraceEvent";
349 }
350
351
352 // ===================================================================
353
354 class MarkVictimFtraceEvent::_Internal {
355 public:
356 using HasBits = decltype(std::declval<MarkVictimFtraceEvent>()._impl_._has_bits_);
set_has_pid(HasBits * has_bits)357 static void set_has_pid(HasBits* has_bits) {
358 (*has_bits)[0] |= 1u;
359 }
360 };
361
MarkVictimFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)362 MarkVictimFtraceEvent::MarkVictimFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
363 bool is_message_owned)
364 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
365 SharedCtor(arena, is_message_owned);
366 // @@protoc_insertion_point(arena_constructor:perfetto.protos.MarkVictimFtraceEvent)
367 }
MarkVictimFtraceEvent(const MarkVictimFtraceEvent & from)368 MarkVictimFtraceEvent::MarkVictimFtraceEvent(const MarkVictimFtraceEvent& from)
369 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
370 MarkVictimFtraceEvent* const _this = this; (void)_this;
371 new (&_impl_) Impl_{
372 decltype(_impl_._has_bits_){from._impl_._has_bits_}
373 , /*decltype(_impl_._cached_size_)*/{}
374 , decltype(_impl_.pid_){}};
375
376 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
377 _this->_impl_.pid_ = from._impl_.pid_;
378 // @@protoc_insertion_point(copy_constructor:perfetto.protos.MarkVictimFtraceEvent)
379 }
380
SharedCtor(::_pb::Arena * arena,bool is_message_owned)381 inline void MarkVictimFtraceEvent::SharedCtor(
382 ::_pb::Arena* arena, bool is_message_owned) {
383 (void)arena;
384 (void)is_message_owned;
385 new (&_impl_) Impl_{
386 decltype(_impl_._has_bits_){}
387 , /*decltype(_impl_._cached_size_)*/{}
388 , decltype(_impl_.pid_){0}
389 };
390 }
391
~MarkVictimFtraceEvent()392 MarkVictimFtraceEvent::~MarkVictimFtraceEvent() {
393 // @@protoc_insertion_point(destructor:perfetto.protos.MarkVictimFtraceEvent)
394 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
395 (void)arena;
396 return;
397 }
398 SharedDtor();
399 }
400
SharedDtor()401 inline void MarkVictimFtraceEvent::SharedDtor() {
402 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
403 }
404
SetCachedSize(int size) const405 void MarkVictimFtraceEvent::SetCachedSize(int size) const {
406 _impl_._cached_size_.Set(size);
407 }
408
Clear()409 void MarkVictimFtraceEvent::Clear() {
410 // @@protoc_insertion_point(message_clear_start:perfetto.protos.MarkVictimFtraceEvent)
411 ::uint32_t cached_has_bits = 0;
412 // Prevent compiler warnings about cached_has_bits being unused
413 (void) cached_has_bits;
414
415 _impl_.pid_ = 0;
416 _impl_._has_bits_.Clear();
417 _internal_metadata_.Clear<std::string>();
418 }
419
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)420 const char* MarkVictimFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
421 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
422 _Internal::HasBits has_bits{};
423 while (!ctx->Done(&ptr)) {
424 ::uint32_t tag;
425 ptr = ::_pbi::ReadTag(ptr, &tag);
426 switch (tag >> 3) {
427 // optional int32 pid = 1;
428 case 1:
429 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
430 _Internal::set_has_pid(&has_bits);
431 _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
432 CHK_(ptr);
433 } else {
434 goto handle_unusual;
435 }
436 continue;
437 default:
438 goto handle_unusual;
439 } // switch
440 handle_unusual:
441 if ((tag == 0) || ((tag & 7) == 4)) {
442 CHK_(ptr);
443 ctx->SetLastTag(tag);
444 goto message_done;
445 }
446 ptr = UnknownFieldParse(
447 tag,
448 _internal_metadata_.mutable_unknown_fields<std::string>(),
449 ptr, ctx);
450 CHK_(ptr != nullptr);
451 } // while
452 message_done:
453 _impl_._has_bits_.Or(has_bits);
454 return ptr;
455 failure:
456 ptr = nullptr;
457 goto message_done;
458 #undef CHK_
459 }
460
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const461 ::uint8_t* MarkVictimFtraceEvent::_InternalSerialize(
462 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
463 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.MarkVictimFtraceEvent)
464 ::uint32_t cached_has_bits = 0;
465 (void) cached_has_bits;
466
467 cached_has_bits = _impl_._has_bits_[0];
468 // optional int32 pid = 1;
469 if (cached_has_bits & 0x00000001u) {
470 target = stream->EnsureSpace(target);
471 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_pid(), target);
472 }
473
474 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
475 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
476 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
477 }
478 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.MarkVictimFtraceEvent)
479 return target;
480 }
481
ByteSizeLong() const482 size_t MarkVictimFtraceEvent::ByteSizeLong() const {
483 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.MarkVictimFtraceEvent)
484 size_t total_size = 0;
485
486 ::uint32_t cached_has_bits = 0;
487 // Prevent compiler warnings about cached_has_bits being unused
488 (void) cached_has_bits;
489
490 // optional int32 pid = 1;
491 cached_has_bits = _impl_._has_bits_[0];
492 if (cached_has_bits & 0x00000001u) {
493 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_pid());
494 }
495
496 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
497 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
498 }
499 int cached_size = ::_pbi::ToCachedSize(total_size);
500 SetCachedSize(cached_size);
501 return total_size;
502 }
503
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)504 void MarkVictimFtraceEvent::CheckTypeAndMergeFrom(
505 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
506 MergeFrom(*::_pbi::DownCast<const MarkVictimFtraceEvent*>(
507 &from));
508 }
509
MergeFrom(const MarkVictimFtraceEvent & from)510 void MarkVictimFtraceEvent::MergeFrom(const MarkVictimFtraceEvent& from) {
511 MarkVictimFtraceEvent* const _this = this;
512 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.MarkVictimFtraceEvent)
513 GOOGLE_DCHECK_NE(&from, _this);
514 ::uint32_t cached_has_bits = 0;
515 (void) cached_has_bits;
516
517 if (from._internal_has_pid()) {
518 _this->_internal_set_pid(from._internal_pid());
519 }
520 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
521 }
522
CopyFrom(const MarkVictimFtraceEvent & from)523 void MarkVictimFtraceEvent::CopyFrom(const MarkVictimFtraceEvent& from) {
524 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.MarkVictimFtraceEvent)
525 if (&from == this) return;
526 Clear();
527 MergeFrom(from);
528 }
529
IsInitialized() const530 bool MarkVictimFtraceEvent::IsInitialized() const {
531 return true;
532 }
533
InternalSwap(MarkVictimFtraceEvent * other)534 void MarkVictimFtraceEvent::InternalSwap(MarkVictimFtraceEvent* other) {
535 using std::swap;
536 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
537 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
538 swap(_impl_.pid_, other->_impl_.pid_);
539 }
540
GetTypeName() const541 std::string MarkVictimFtraceEvent::GetTypeName() const {
542 return "perfetto.protos.MarkVictimFtraceEvent";
543 }
544
545
546 // @@protoc_insertion_point(namespace_scope)
547 } // namespace protos
548 } // namespace perfetto
549 PROTOBUF_NAMESPACE_OPEN
550 template<> PROTOBUF_NOINLINE ::perfetto::protos::OomScoreAdjUpdateFtraceEvent*
CreateMaybeMessage(Arena * arena)551 Arena::CreateMaybeMessage< ::perfetto::protos::OomScoreAdjUpdateFtraceEvent >(Arena* arena) {
552 return Arena::CreateMessageInternal< ::perfetto::protos::OomScoreAdjUpdateFtraceEvent >(arena);
553 }
554 template<> PROTOBUF_NOINLINE ::perfetto::protos::MarkVictimFtraceEvent*
CreateMaybeMessage(Arena * arena)555 Arena::CreateMaybeMessage< ::perfetto::protos::MarkVictimFtraceEvent >(Arena* arena) {
556 return Arena::CreateMessageInternal< ::perfetto::protos::MarkVictimFtraceEvent >(arena);
557 }
558 PROTOBUF_NAMESPACE_CLOSE
559
560 // @@protoc_insertion_point(global_scope)
561 #include <google/protobuf/port_undef.inc>
562