1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/fs.proto
3
4 #include "protos/perfetto/trace/ftrace/fs.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 {
DoSysOpenFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR DoSysOpenFtraceEvent::DoSysOpenFtraceEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.filename_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.flags_)*/0
29 , /*decltype(_impl_.mode_)*/0} {}
30 struct DoSysOpenFtraceEventDefaultTypeInternal {
DoSysOpenFtraceEventDefaultTypeInternalperfetto::protos::DoSysOpenFtraceEventDefaultTypeInternal31 PROTOBUF_CONSTEXPR DoSysOpenFtraceEventDefaultTypeInternal()
32 : _instance(::_pbi::ConstantInitialized{}) {}
~DoSysOpenFtraceEventDefaultTypeInternalperfetto::protos::DoSysOpenFtraceEventDefaultTypeInternal33 ~DoSysOpenFtraceEventDefaultTypeInternal() {}
34 union { // NOLINT(misc-non-private-member-variables-in-classes)
35 DoSysOpenFtraceEvent _instance;
36 };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DoSysOpenFtraceEventDefaultTypeInternal _DoSysOpenFtraceEvent_default_instance_;
OpenExecFtraceEvent(::_pbi::ConstantInitialized)39 PROTOBUF_CONSTEXPR OpenExecFtraceEvent::OpenExecFtraceEvent(
40 ::_pbi::ConstantInitialized): _impl_{
41 /*decltype(_impl_._has_bits_)*/{}
42 , /*decltype(_impl_._cached_size_)*/{}
43 , /*decltype(_impl_.filename_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
44 struct OpenExecFtraceEventDefaultTypeInternal {
OpenExecFtraceEventDefaultTypeInternalperfetto::protos::OpenExecFtraceEventDefaultTypeInternal45 PROTOBUF_CONSTEXPR OpenExecFtraceEventDefaultTypeInternal()
46 : _instance(::_pbi::ConstantInitialized{}) {}
~OpenExecFtraceEventDefaultTypeInternalperfetto::protos::OpenExecFtraceEventDefaultTypeInternal47 ~OpenExecFtraceEventDefaultTypeInternal() {}
48 union { // NOLINT(misc-non-private-member-variables-in-classes)
49 OpenExecFtraceEvent _instance;
50 };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OpenExecFtraceEventDefaultTypeInternal _OpenExecFtraceEvent_default_instance_;
53 } // namespace protos
54 } // namespace perfetto
55 namespace perfetto {
56 namespace protos {
57
58 // ===================================================================
59
60 class DoSysOpenFtraceEvent::_Internal {
61 public:
62 using HasBits = decltype(std::declval<DoSysOpenFtraceEvent>()._impl_._has_bits_);
set_has_filename(HasBits * has_bits)63 static void set_has_filename(HasBits* has_bits) {
64 (*has_bits)[0] |= 1u;
65 }
set_has_flags(HasBits * has_bits)66 static void set_has_flags(HasBits* has_bits) {
67 (*has_bits)[0] |= 2u;
68 }
set_has_mode(HasBits * has_bits)69 static void set_has_mode(HasBits* has_bits) {
70 (*has_bits)[0] |= 4u;
71 }
72 };
73
DoSysOpenFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)74 DoSysOpenFtraceEvent::DoSysOpenFtraceEvent(::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.DoSysOpenFtraceEvent)
79 }
DoSysOpenFtraceEvent(const DoSysOpenFtraceEvent & from)80 DoSysOpenFtraceEvent::DoSysOpenFtraceEvent(const DoSysOpenFtraceEvent& from)
81 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
82 DoSysOpenFtraceEvent* 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_.filename_){}
87 , decltype(_impl_.flags_){}
88 , decltype(_impl_.mode_){}};
89
90 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
91 _impl_.filename_.InitDefault();
92 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
93 _impl_.filename_.Set("", GetArenaForAllocation());
94 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
95 if (from._internal_has_filename()) {
96 _this->_impl_.filename_.Set(from._internal_filename(),
97 _this->GetArenaForAllocation());
98 }
99 ::memcpy(&_impl_.flags_, &from._impl_.flags_,
100 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.mode_) -
101 reinterpret_cast<char*>(&_impl_.flags_)) + sizeof(_impl_.mode_));
102 // @@protoc_insertion_point(copy_constructor:perfetto.protos.DoSysOpenFtraceEvent)
103 }
104
SharedCtor(::_pb::Arena * arena,bool is_message_owned)105 inline void DoSysOpenFtraceEvent::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_.filename_){}
113 , decltype(_impl_.flags_){0}
114 , decltype(_impl_.mode_){0}
115 };
116 _impl_.filename_.InitDefault();
117 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
118 _impl_.filename_.Set("", GetArenaForAllocation());
119 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
120 }
121
~DoSysOpenFtraceEvent()122 DoSysOpenFtraceEvent::~DoSysOpenFtraceEvent() {
123 // @@protoc_insertion_point(destructor:perfetto.protos.DoSysOpenFtraceEvent)
124 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
125 (void)arena;
126 return;
127 }
128 SharedDtor();
129 }
130
SharedDtor()131 inline void DoSysOpenFtraceEvent::SharedDtor() {
132 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
133 _impl_.filename_.Destroy();
134 }
135
SetCachedSize(int size) const136 void DoSysOpenFtraceEvent::SetCachedSize(int size) const {
137 _impl_._cached_size_.Set(size);
138 }
139
Clear()140 void DoSysOpenFtraceEvent::Clear() {
141 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DoSysOpenFtraceEvent)
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_.filename_.ClearNonDefaultToEmpty();
149 }
150 if (cached_has_bits & 0x00000006u) {
151 ::memset(&_impl_.flags_, 0, static_cast<size_t>(
152 reinterpret_cast<char*>(&_impl_.mode_) -
153 reinterpret_cast<char*>(&_impl_.flags_)) + sizeof(_impl_.mode_));
154 }
155 _impl_._has_bits_.Clear();
156 _internal_metadata_.Clear<std::string>();
157 }
158
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)159 const char* DoSysOpenFtraceEvent::_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 filename = 1;
167 case 1:
168 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
169 auto str = _internal_mutable_filename();
170 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
171 CHK_(ptr);
172 } else {
173 goto handle_unusual;
174 }
175 continue;
176 // optional int32 flags = 2;
177 case 2:
178 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
179 _Internal::set_has_flags(&has_bits);
180 _impl_.flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
181 CHK_(ptr);
182 } else {
183 goto handle_unusual;
184 }
185 continue;
186 // optional int32 mode = 3;
187 case 3:
188 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
189 _Internal::set_has_mode(&has_bits);
190 _impl_.mode_ = ::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* DoSysOpenFtraceEvent::_InternalSerialize(
221 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
222 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DoSysOpenFtraceEvent)
223 ::uint32_t cached_has_bits = 0;
224 (void) cached_has_bits;
225
226 cached_has_bits = _impl_._has_bits_[0];
227 // optional string filename = 1;
228 if (cached_has_bits & 0x00000001u) {
229 target = stream->WriteStringMaybeAliased(
230 1, this->_internal_filename(), target);
231 }
232
233 // optional int32 flags = 2;
234 if (cached_has_bits & 0x00000002u) {
235 target = stream->EnsureSpace(target);
236 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_flags(), target);
237 }
238
239 // optional int32 mode = 3;
240 if (cached_has_bits & 0x00000004u) {
241 target = stream->EnsureSpace(target);
242 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_mode(), 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.DoSysOpenFtraceEvent)
250 return target;
251 }
252
ByteSizeLong() const253 size_t DoSysOpenFtraceEvent::ByteSizeLong() const {
254 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DoSysOpenFtraceEvent)
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 filename = 1;
264 if (cached_has_bits & 0x00000001u) {
265 total_size += 1 +
266 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
267 this->_internal_filename());
268 }
269
270 // optional int32 flags = 2;
271 if (cached_has_bits & 0x00000002u) {
272 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_flags());
273 }
274
275 // optional int32 mode = 3;
276 if (cached_has_bits & 0x00000004u) {
277 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_mode());
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 DoSysOpenFtraceEvent::CheckTypeAndMergeFrom(
290 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
291 MergeFrom(*::_pbi::DownCast<const DoSysOpenFtraceEvent*>(
292 &from));
293 }
294
MergeFrom(const DoSysOpenFtraceEvent & from)295 void DoSysOpenFtraceEvent::MergeFrom(const DoSysOpenFtraceEvent& from) {
296 DoSysOpenFtraceEvent* const _this = this;
297 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DoSysOpenFtraceEvent)
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_filename(from._internal_filename());
306 }
307 if (cached_has_bits & 0x00000002u) {
308 _this->_impl_.flags_ = from._impl_.flags_;
309 }
310 if (cached_has_bits & 0x00000004u) {
311 _this->_impl_.mode_ = from._impl_.mode_;
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 DoSysOpenFtraceEvent & from)318 void DoSysOpenFtraceEvent::CopyFrom(const DoSysOpenFtraceEvent& from) {
319 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DoSysOpenFtraceEvent)
320 if (&from == this) return;
321 Clear();
322 MergeFrom(from);
323 }
324
IsInitialized() const325 bool DoSysOpenFtraceEvent::IsInitialized() const {
326 return true;
327 }
328
InternalSwap(DoSysOpenFtraceEvent * other)329 void DoSysOpenFtraceEvent::InternalSwap(DoSysOpenFtraceEvent* 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_.filename_, lhs_arena,
337 &other->_impl_.filename_, rhs_arena
338 );
339 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
340 PROTOBUF_FIELD_OFFSET(DoSysOpenFtraceEvent, _impl_.mode_)
341 + sizeof(DoSysOpenFtraceEvent::_impl_.mode_) // NOLINT
342 - PROTOBUF_FIELD_OFFSET(DoSysOpenFtraceEvent, _impl_.flags_)>(
343 reinterpret_cast<char*>(&_impl_.flags_),
344 reinterpret_cast<char*>(&other->_impl_.flags_));
345 }
346
GetTypeName() const347 std::string DoSysOpenFtraceEvent::GetTypeName() const {
348 return "perfetto.protos.DoSysOpenFtraceEvent";
349 }
350
351
352 // ===================================================================
353
354 class OpenExecFtraceEvent::_Internal {
355 public:
356 using HasBits = decltype(std::declval<OpenExecFtraceEvent>()._impl_._has_bits_);
set_has_filename(HasBits * has_bits)357 static void set_has_filename(HasBits* has_bits) {
358 (*has_bits)[0] |= 1u;
359 }
360 };
361
OpenExecFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)362 OpenExecFtraceEvent::OpenExecFtraceEvent(::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.OpenExecFtraceEvent)
367 }
OpenExecFtraceEvent(const OpenExecFtraceEvent & from)368 OpenExecFtraceEvent::OpenExecFtraceEvent(const OpenExecFtraceEvent& from)
369 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
370 OpenExecFtraceEvent* 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_.filename_){}};
375
376 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
377 _impl_.filename_.InitDefault();
378 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
379 _impl_.filename_.Set("", GetArenaForAllocation());
380 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
381 if (from._internal_has_filename()) {
382 _this->_impl_.filename_.Set(from._internal_filename(),
383 _this->GetArenaForAllocation());
384 }
385 // @@protoc_insertion_point(copy_constructor:perfetto.protos.OpenExecFtraceEvent)
386 }
387
SharedCtor(::_pb::Arena * arena,bool is_message_owned)388 inline void OpenExecFtraceEvent::SharedCtor(
389 ::_pb::Arena* arena, bool is_message_owned) {
390 (void)arena;
391 (void)is_message_owned;
392 new (&_impl_) Impl_{
393 decltype(_impl_._has_bits_){}
394 , /*decltype(_impl_._cached_size_)*/{}
395 , decltype(_impl_.filename_){}
396 };
397 _impl_.filename_.InitDefault();
398 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
399 _impl_.filename_.Set("", GetArenaForAllocation());
400 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
401 }
402
~OpenExecFtraceEvent()403 OpenExecFtraceEvent::~OpenExecFtraceEvent() {
404 // @@protoc_insertion_point(destructor:perfetto.protos.OpenExecFtraceEvent)
405 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
406 (void)arena;
407 return;
408 }
409 SharedDtor();
410 }
411
SharedDtor()412 inline void OpenExecFtraceEvent::SharedDtor() {
413 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
414 _impl_.filename_.Destroy();
415 }
416
SetCachedSize(int size) const417 void OpenExecFtraceEvent::SetCachedSize(int size) const {
418 _impl_._cached_size_.Set(size);
419 }
420
Clear()421 void OpenExecFtraceEvent::Clear() {
422 // @@protoc_insertion_point(message_clear_start:perfetto.protos.OpenExecFtraceEvent)
423 ::uint32_t cached_has_bits = 0;
424 // Prevent compiler warnings about cached_has_bits being unused
425 (void) cached_has_bits;
426
427 cached_has_bits = _impl_._has_bits_[0];
428 if (cached_has_bits & 0x00000001u) {
429 _impl_.filename_.ClearNonDefaultToEmpty();
430 }
431 _impl_._has_bits_.Clear();
432 _internal_metadata_.Clear<std::string>();
433 }
434
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)435 const char* OpenExecFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
436 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
437 _Internal::HasBits has_bits{};
438 while (!ctx->Done(&ptr)) {
439 ::uint32_t tag;
440 ptr = ::_pbi::ReadTag(ptr, &tag);
441 switch (tag >> 3) {
442 // optional string filename = 1;
443 case 1:
444 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
445 auto str = _internal_mutable_filename();
446 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
447 CHK_(ptr);
448 } else {
449 goto handle_unusual;
450 }
451 continue;
452 default:
453 goto handle_unusual;
454 } // switch
455 handle_unusual:
456 if ((tag == 0) || ((tag & 7) == 4)) {
457 CHK_(ptr);
458 ctx->SetLastTag(tag);
459 goto message_done;
460 }
461 ptr = UnknownFieldParse(
462 tag,
463 _internal_metadata_.mutable_unknown_fields<std::string>(),
464 ptr, ctx);
465 CHK_(ptr != nullptr);
466 } // while
467 message_done:
468 _impl_._has_bits_.Or(has_bits);
469 return ptr;
470 failure:
471 ptr = nullptr;
472 goto message_done;
473 #undef CHK_
474 }
475
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const476 ::uint8_t* OpenExecFtraceEvent::_InternalSerialize(
477 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
478 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.OpenExecFtraceEvent)
479 ::uint32_t cached_has_bits = 0;
480 (void) cached_has_bits;
481
482 cached_has_bits = _impl_._has_bits_[0];
483 // optional string filename = 1;
484 if (cached_has_bits & 0x00000001u) {
485 target = stream->WriteStringMaybeAliased(
486 1, this->_internal_filename(), target);
487 }
488
489 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
490 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
491 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
492 }
493 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.OpenExecFtraceEvent)
494 return target;
495 }
496
ByteSizeLong() const497 size_t OpenExecFtraceEvent::ByteSizeLong() const {
498 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.OpenExecFtraceEvent)
499 size_t total_size = 0;
500
501 ::uint32_t cached_has_bits = 0;
502 // Prevent compiler warnings about cached_has_bits being unused
503 (void) cached_has_bits;
504
505 // optional string filename = 1;
506 cached_has_bits = _impl_._has_bits_[0];
507 if (cached_has_bits & 0x00000001u) {
508 total_size += 1 +
509 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
510 this->_internal_filename());
511 }
512
513 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
514 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
515 }
516 int cached_size = ::_pbi::ToCachedSize(total_size);
517 SetCachedSize(cached_size);
518 return total_size;
519 }
520
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)521 void OpenExecFtraceEvent::CheckTypeAndMergeFrom(
522 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
523 MergeFrom(*::_pbi::DownCast<const OpenExecFtraceEvent*>(
524 &from));
525 }
526
MergeFrom(const OpenExecFtraceEvent & from)527 void OpenExecFtraceEvent::MergeFrom(const OpenExecFtraceEvent& from) {
528 OpenExecFtraceEvent* const _this = this;
529 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.OpenExecFtraceEvent)
530 GOOGLE_DCHECK_NE(&from, _this);
531 ::uint32_t cached_has_bits = 0;
532 (void) cached_has_bits;
533
534 if (from._internal_has_filename()) {
535 _this->_internal_set_filename(from._internal_filename());
536 }
537 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
538 }
539
CopyFrom(const OpenExecFtraceEvent & from)540 void OpenExecFtraceEvent::CopyFrom(const OpenExecFtraceEvent& from) {
541 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.OpenExecFtraceEvent)
542 if (&from == this) return;
543 Clear();
544 MergeFrom(from);
545 }
546
IsInitialized() const547 bool OpenExecFtraceEvent::IsInitialized() const {
548 return true;
549 }
550
InternalSwap(OpenExecFtraceEvent * other)551 void OpenExecFtraceEvent::InternalSwap(OpenExecFtraceEvent* other) {
552 using std::swap;
553 auto* lhs_arena = GetArenaForAllocation();
554 auto* rhs_arena = other->GetArenaForAllocation();
555 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
556 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
557 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
558 &_impl_.filename_, lhs_arena,
559 &other->_impl_.filename_, rhs_arena
560 );
561 }
562
GetTypeName() const563 std::string OpenExecFtraceEvent::GetTypeName() const {
564 return "perfetto.protos.OpenExecFtraceEvent";
565 }
566
567
568 // @@protoc_insertion_point(namespace_scope)
569 } // namespace protos
570 } // namespace perfetto
571 PROTOBUF_NAMESPACE_OPEN
572 template<> PROTOBUF_NOINLINE ::perfetto::protos::DoSysOpenFtraceEvent*
CreateMaybeMessage(Arena * arena)573 Arena::CreateMaybeMessage< ::perfetto::protos::DoSysOpenFtraceEvent >(Arena* arena) {
574 return Arena::CreateMessageInternal< ::perfetto::protos::DoSysOpenFtraceEvent >(arena);
575 }
576 template<> PROTOBUF_NOINLINE ::perfetto::protos::OpenExecFtraceEvent*
CreateMaybeMessage(Arena * arena)577 Arena::CreateMaybeMessage< ::perfetto::protos::OpenExecFtraceEvent >(Arena* arena) {
578 return Arena::CreateMessageInternal< ::perfetto::protos::OpenExecFtraceEvent >(arena);
579 }
580 PROTOBUF_NAMESPACE_CLOSE
581
582 // @@protoc_insertion_point(global_scope)
583 #include <google/protobuf/port_undef.inc>
584