1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/perfetto/tracing_service_event.proto
3
4 #include "protos/perfetto/trace/perfetto/tracing_service_event.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 {
TracingServiceEvent_DataSources_DataSource(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR TracingServiceEvent_DataSources_DataSource::TracingServiceEvent_DataSources_DataSource(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.producer_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.data_source_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
29 struct TracingServiceEvent_DataSources_DataSourceDefaultTypeInternal {
TracingServiceEvent_DataSources_DataSourceDefaultTypeInternalperfetto::protos::TracingServiceEvent_DataSources_DataSourceDefaultTypeInternal30 PROTOBUF_CONSTEXPR TracingServiceEvent_DataSources_DataSourceDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~TracingServiceEvent_DataSources_DataSourceDefaultTypeInternalperfetto::protos::TracingServiceEvent_DataSources_DataSourceDefaultTypeInternal32 ~TracingServiceEvent_DataSources_DataSourceDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 TracingServiceEvent_DataSources_DataSource _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TracingServiceEvent_DataSources_DataSourceDefaultTypeInternal _TracingServiceEvent_DataSources_DataSource_default_instance_;
TracingServiceEvent_DataSources(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR TracingServiceEvent_DataSources::TracingServiceEvent_DataSources(
39 ::_pbi::ConstantInitialized): _impl_{
40 /*decltype(_impl_.data_source_)*/{}
41 , /*decltype(_impl_._cached_size_)*/{}} {}
42 struct TracingServiceEvent_DataSourcesDefaultTypeInternal {
TracingServiceEvent_DataSourcesDefaultTypeInternalperfetto::protos::TracingServiceEvent_DataSourcesDefaultTypeInternal43 PROTOBUF_CONSTEXPR TracingServiceEvent_DataSourcesDefaultTypeInternal()
44 : _instance(::_pbi::ConstantInitialized{}) {}
~TracingServiceEvent_DataSourcesDefaultTypeInternalperfetto::protos::TracingServiceEvent_DataSourcesDefaultTypeInternal45 ~TracingServiceEvent_DataSourcesDefaultTypeInternal() {}
46 union { // NOLINT(misc-non-private-member-variables-in-classes)
47 TracingServiceEvent_DataSources _instance;
48 };
49 };
50 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TracingServiceEvent_DataSourcesDefaultTypeInternal _TracingServiceEvent_DataSources_default_instance_;
TracingServiceEvent(::_pbi::ConstantInitialized)51 PROTOBUF_CONSTEXPR TracingServiceEvent::TracingServiceEvent(
52 ::_pbi::ConstantInitialized): _impl_{
53 /*decltype(_impl_.event_type_)*/{}
54 , /*decltype(_impl_._cached_size_)*/{}
55 , /*decltype(_impl_._oneof_case_)*/{}} {}
56 struct TracingServiceEventDefaultTypeInternal {
TracingServiceEventDefaultTypeInternalperfetto::protos::TracingServiceEventDefaultTypeInternal57 PROTOBUF_CONSTEXPR TracingServiceEventDefaultTypeInternal()
58 : _instance(::_pbi::ConstantInitialized{}) {}
~TracingServiceEventDefaultTypeInternalperfetto::protos::TracingServiceEventDefaultTypeInternal59 ~TracingServiceEventDefaultTypeInternal() {}
60 union { // NOLINT(misc-non-private-member-variables-in-classes)
61 TracingServiceEvent _instance;
62 };
63 };
64 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TracingServiceEventDefaultTypeInternal _TracingServiceEvent_default_instance_;
65 } // namespace protos
66 } // namespace perfetto
67 namespace perfetto {
68 namespace protos {
69
70 // ===================================================================
71
72 class TracingServiceEvent_DataSources_DataSource::_Internal {
73 public:
74 using HasBits = decltype(std::declval<TracingServiceEvent_DataSources_DataSource>()._impl_._has_bits_);
set_has_producer_name(HasBits * has_bits)75 static void set_has_producer_name(HasBits* has_bits) {
76 (*has_bits)[0] |= 1u;
77 }
set_has_data_source_name(HasBits * has_bits)78 static void set_has_data_source_name(HasBits* has_bits) {
79 (*has_bits)[0] |= 2u;
80 }
81 };
82
TracingServiceEvent_DataSources_DataSource(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)83 TracingServiceEvent_DataSources_DataSource::TracingServiceEvent_DataSources_DataSource(::PROTOBUF_NAMESPACE_ID::Arena* arena,
84 bool is_message_owned)
85 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
86 SharedCtor(arena, is_message_owned);
87 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
88 }
TracingServiceEvent_DataSources_DataSource(const TracingServiceEvent_DataSources_DataSource & from)89 TracingServiceEvent_DataSources_DataSource::TracingServiceEvent_DataSources_DataSource(const TracingServiceEvent_DataSources_DataSource& from)
90 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
91 TracingServiceEvent_DataSources_DataSource* const _this = this; (void)_this;
92 new (&_impl_) Impl_{
93 decltype(_impl_._has_bits_){from._impl_._has_bits_}
94 , /*decltype(_impl_._cached_size_)*/{}
95 , decltype(_impl_.producer_name_){}
96 , decltype(_impl_.data_source_name_){}};
97
98 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
99 _impl_.producer_name_.InitDefault();
100 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
101 _impl_.producer_name_.Set("", GetArenaForAllocation());
102 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
103 if (from._internal_has_producer_name()) {
104 _this->_impl_.producer_name_.Set(from._internal_producer_name(),
105 _this->GetArenaForAllocation());
106 }
107 _impl_.data_source_name_.InitDefault();
108 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
109 _impl_.data_source_name_.Set("", GetArenaForAllocation());
110 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
111 if (from._internal_has_data_source_name()) {
112 _this->_impl_.data_source_name_.Set(from._internal_data_source_name(),
113 _this->GetArenaForAllocation());
114 }
115 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
116 }
117
SharedCtor(::_pb::Arena * arena,bool is_message_owned)118 inline void TracingServiceEvent_DataSources_DataSource::SharedCtor(
119 ::_pb::Arena* arena, bool is_message_owned) {
120 (void)arena;
121 (void)is_message_owned;
122 new (&_impl_) Impl_{
123 decltype(_impl_._has_bits_){}
124 , /*decltype(_impl_._cached_size_)*/{}
125 , decltype(_impl_.producer_name_){}
126 , decltype(_impl_.data_source_name_){}
127 };
128 _impl_.producer_name_.InitDefault();
129 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
130 _impl_.producer_name_.Set("", GetArenaForAllocation());
131 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
132 _impl_.data_source_name_.InitDefault();
133 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
134 _impl_.data_source_name_.Set("", GetArenaForAllocation());
135 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
136 }
137
~TracingServiceEvent_DataSources_DataSource()138 TracingServiceEvent_DataSources_DataSource::~TracingServiceEvent_DataSources_DataSource() {
139 // @@protoc_insertion_point(destructor:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
140 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
141 (void)arena;
142 return;
143 }
144 SharedDtor();
145 }
146
SharedDtor()147 inline void TracingServiceEvent_DataSources_DataSource::SharedDtor() {
148 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
149 _impl_.producer_name_.Destroy();
150 _impl_.data_source_name_.Destroy();
151 }
152
SetCachedSize(int size) const153 void TracingServiceEvent_DataSources_DataSource::SetCachedSize(int size) const {
154 _impl_._cached_size_.Set(size);
155 }
156
Clear()157 void TracingServiceEvent_DataSources_DataSource::Clear() {
158 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
159 ::uint32_t cached_has_bits = 0;
160 // Prevent compiler warnings about cached_has_bits being unused
161 (void) cached_has_bits;
162
163 cached_has_bits = _impl_._has_bits_[0];
164 if (cached_has_bits & 0x00000003u) {
165 if (cached_has_bits & 0x00000001u) {
166 _impl_.producer_name_.ClearNonDefaultToEmpty();
167 }
168 if (cached_has_bits & 0x00000002u) {
169 _impl_.data_source_name_.ClearNonDefaultToEmpty();
170 }
171 }
172 _impl_._has_bits_.Clear();
173 _internal_metadata_.Clear<std::string>();
174 }
175
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)176 const char* TracingServiceEvent_DataSources_DataSource::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
177 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
178 _Internal::HasBits has_bits{};
179 while (!ctx->Done(&ptr)) {
180 ::uint32_t tag;
181 ptr = ::_pbi::ReadTag(ptr, &tag);
182 switch (tag >> 3) {
183 // optional string producer_name = 1;
184 case 1:
185 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
186 auto str = _internal_mutable_producer_name();
187 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
188 CHK_(ptr);
189 } else {
190 goto handle_unusual;
191 }
192 continue;
193 // optional string data_source_name = 2;
194 case 2:
195 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
196 auto str = _internal_mutable_data_source_name();
197 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
198 CHK_(ptr);
199 } else {
200 goto handle_unusual;
201 }
202 continue;
203 default:
204 goto handle_unusual;
205 } // switch
206 handle_unusual:
207 if ((tag == 0) || ((tag & 7) == 4)) {
208 CHK_(ptr);
209 ctx->SetLastTag(tag);
210 goto message_done;
211 }
212 ptr = UnknownFieldParse(
213 tag,
214 _internal_metadata_.mutable_unknown_fields<std::string>(),
215 ptr, ctx);
216 CHK_(ptr != nullptr);
217 } // while
218 message_done:
219 _impl_._has_bits_.Or(has_bits);
220 return ptr;
221 failure:
222 ptr = nullptr;
223 goto message_done;
224 #undef CHK_
225 }
226
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const227 ::uint8_t* TracingServiceEvent_DataSources_DataSource::_InternalSerialize(
228 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
229 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
230 ::uint32_t cached_has_bits = 0;
231 (void) cached_has_bits;
232
233 cached_has_bits = _impl_._has_bits_[0];
234 // optional string producer_name = 1;
235 if (cached_has_bits & 0x00000001u) {
236 target = stream->WriteStringMaybeAliased(
237 1, this->_internal_producer_name(), target);
238 }
239
240 // optional string data_source_name = 2;
241 if (cached_has_bits & 0x00000002u) {
242 target = stream->WriteStringMaybeAliased(
243 2, this->_internal_data_source_name(), target);
244 }
245
246 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
247 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
248 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
249 }
250 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
251 return target;
252 }
253
ByteSizeLong() const254 size_t TracingServiceEvent_DataSources_DataSource::ByteSizeLong() const {
255 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
256 size_t total_size = 0;
257
258 ::uint32_t cached_has_bits = 0;
259 // Prevent compiler warnings about cached_has_bits being unused
260 (void) cached_has_bits;
261
262 cached_has_bits = _impl_._has_bits_[0];
263 if (cached_has_bits & 0x00000003u) {
264 // optional string producer_name = 1;
265 if (cached_has_bits & 0x00000001u) {
266 total_size += 1 +
267 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
268 this->_internal_producer_name());
269 }
270
271 // optional string data_source_name = 2;
272 if (cached_has_bits & 0x00000002u) {
273 total_size += 1 +
274 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
275 this->_internal_data_source_name());
276 }
277
278 }
279 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
280 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
281 }
282 int cached_size = ::_pbi::ToCachedSize(total_size);
283 SetCachedSize(cached_size);
284 return total_size;
285 }
286
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)287 void TracingServiceEvent_DataSources_DataSource::CheckTypeAndMergeFrom(
288 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
289 MergeFrom(*::_pbi::DownCast<const TracingServiceEvent_DataSources_DataSource*>(
290 &from));
291 }
292
MergeFrom(const TracingServiceEvent_DataSources_DataSource & from)293 void TracingServiceEvent_DataSources_DataSource::MergeFrom(const TracingServiceEvent_DataSources_DataSource& from) {
294 TracingServiceEvent_DataSources_DataSource* const _this = this;
295 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
296 GOOGLE_DCHECK_NE(&from, _this);
297 ::uint32_t cached_has_bits = 0;
298 (void) cached_has_bits;
299
300 cached_has_bits = from._impl_._has_bits_[0];
301 if (cached_has_bits & 0x00000003u) {
302 if (cached_has_bits & 0x00000001u) {
303 _this->_internal_set_producer_name(from._internal_producer_name());
304 }
305 if (cached_has_bits & 0x00000002u) {
306 _this->_internal_set_data_source_name(from._internal_data_source_name());
307 }
308 }
309 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
310 }
311
CopyFrom(const TracingServiceEvent_DataSources_DataSource & from)312 void TracingServiceEvent_DataSources_DataSource::CopyFrom(const TracingServiceEvent_DataSources_DataSource& from) {
313 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TracingServiceEvent.DataSources.DataSource)
314 if (&from == this) return;
315 Clear();
316 MergeFrom(from);
317 }
318
IsInitialized() const319 bool TracingServiceEvent_DataSources_DataSource::IsInitialized() const {
320 return true;
321 }
322
InternalSwap(TracingServiceEvent_DataSources_DataSource * other)323 void TracingServiceEvent_DataSources_DataSource::InternalSwap(TracingServiceEvent_DataSources_DataSource* other) {
324 using std::swap;
325 auto* lhs_arena = GetArenaForAllocation();
326 auto* rhs_arena = other->GetArenaForAllocation();
327 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
328 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
329 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
330 &_impl_.producer_name_, lhs_arena,
331 &other->_impl_.producer_name_, rhs_arena
332 );
333 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
334 &_impl_.data_source_name_, lhs_arena,
335 &other->_impl_.data_source_name_, rhs_arena
336 );
337 }
338
GetTypeName() const339 std::string TracingServiceEvent_DataSources_DataSource::GetTypeName() const {
340 return "perfetto.protos.TracingServiceEvent.DataSources.DataSource";
341 }
342
343
344 // ===================================================================
345
346 class TracingServiceEvent_DataSources::_Internal {
347 public:
348 };
349
TracingServiceEvent_DataSources(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)350 TracingServiceEvent_DataSources::TracingServiceEvent_DataSources(::PROTOBUF_NAMESPACE_ID::Arena* arena,
351 bool is_message_owned)
352 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
353 SharedCtor(arena, is_message_owned);
354 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TracingServiceEvent.DataSources)
355 }
TracingServiceEvent_DataSources(const TracingServiceEvent_DataSources & from)356 TracingServiceEvent_DataSources::TracingServiceEvent_DataSources(const TracingServiceEvent_DataSources& from)
357 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
358 TracingServiceEvent_DataSources* const _this = this; (void)_this;
359 new (&_impl_) Impl_{
360 decltype(_impl_.data_source_){from._impl_.data_source_}
361 , /*decltype(_impl_._cached_size_)*/{}};
362
363 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
364 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TracingServiceEvent.DataSources)
365 }
366
SharedCtor(::_pb::Arena * arena,bool is_message_owned)367 inline void TracingServiceEvent_DataSources::SharedCtor(
368 ::_pb::Arena* arena, bool is_message_owned) {
369 (void)arena;
370 (void)is_message_owned;
371 new (&_impl_) Impl_{
372 decltype(_impl_.data_source_){arena}
373 , /*decltype(_impl_._cached_size_)*/{}
374 };
375 }
376
~TracingServiceEvent_DataSources()377 TracingServiceEvent_DataSources::~TracingServiceEvent_DataSources() {
378 // @@protoc_insertion_point(destructor:perfetto.protos.TracingServiceEvent.DataSources)
379 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
380 (void)arena;
381 return;
382 }
383 SharedDtor();
384 }
385
SharedDtor()386 inline void TracingServiceEvent_DataSources::SharedDtor() {
387 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
388 _impl_.data_source_.~RepeatedPtrField();
389 }
390
SetCachedSize(int size) const391 void TracingServiceEvent_DataSources::SetCachedSize(int size) const {
392 _impl_._cached_size_.Set(size);
393 }
394
Clear()395 void TracingServiceEvent_DataSources::Clear() {
396 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TracingServiceEvent.DataSources)
397 ::uint32_t cached_has_bits = 0;
398 // Prevent compiler warnings about cached_has_bits being unused
399 (void) cached_has_bits;
400
401 _impl_.data_source_.Clear();
402 _internal_metadata_.Clear<std::string>();
403 }
404
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)405 const char* TracingServiceEvent_DataSources::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
406 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
407 while (!ctx->Done(&ptr)) {
408 ::uint32_t tag;
409 ptr = ::_pbi::ReadTag(ptr, &tag);
410 switch (tag >> 3) {
411 // repeated .perfetto.protos.TracingServiceEvent.DataSources.DataSource data_source = 1;
412 case 1:
413 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
414 ptr -= 1;
415 do {
416 ptr += 1;
417 ptr = ctx->ParseMessage(_internal_add_data_source(), ptr);
418 CHK_(ptr);
419 if (!ctx->DataAvailable(ptr)) break;
420 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
421 } else {
422 goto handle_unusual;
423 }
424 continue;
425 default:
426 goto handle_unusual;
427 } // switch
428 handle_unusual:
429 if ((tag == 0) || ((tag & 7) == 4)) {
430 CHK_(ptr);
431 ctx->SetLastTag(tag);
432 goto message_done;
433 }
434 ptr = UnknownFieldParse(
435 tag,
436 _internal_metadata_.mutable_unknown_fields<std::string>(),
437 ptr, ctx);
438 CHK_(ptr != nullptr);
439 } // while
440 message_done:
441 return ptr;
442 failure:
443 ptr = nullptr;
444 goto message_done;
445 #undef CHK_
446 }
447
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const448 ::uint8_t* TracingServiceEvent_DataSources::_InternalSerialize(
449 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
450 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TracingServiceEvent.DataSources)
451 ::uint32_t cached_has_bits = 0;
452 (void) cached_has_bits;
453
454 // repeated .perfetto.protos.TracingServiceEvent.DataSources.DataSource data_source = 1;
455 for (unsigned i = 0,
456 n = static_cast<unsigned>(this->_internal_data_source_size()); i < n; i++) {
457 const auto& repfield = this->_internal_data_source(i);
458 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
459 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
460 }
461
462 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
463 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
464 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
465 }
466 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TracingServiceEvent.DataSources)
467 return target;
468 }
469
ByteSizeLong() const470 size_t TracingServiceEvent_DataSources::ByteSizeLong() const {
471 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TracingServiceEvent.DataSources)
472 size_t total_size = 0;
473
474 ::uint32_t cached_has_bits = 0;
475 // Prevent compiler warnings about cached_has_bits being unused
476 (void) cached_has_bits;
477
478 // repeated .perfetto.protos.TracingServiceEvent.DataSources.DataSource data_source = 1;
479 total_size += 1UL * this->_internal_data_source_size();
480 for (const auto& msg : this->_impl_.data_source_) {
481 total_size +=
482 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
483 }
484
485 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
486 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
487 }
488 int cached_size = ::_pbi::ToCachedSize(total_size);
489 SetCachedSize(cached_size);
490 return total_size;
491 }
492
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)493 void TracingServiceEvent_DataSources::CheckTypeAndMergeFrom(
494 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
495 MergeFrom(*::_pbi::DownCast<const TracingServiceEvent_DataSources*>(
496 &from));
497 }
498
MergeFrom(const TracingServiceEvent_DataSources & from)499 void TracingServiceEvent_DataSources::MergeFrom(const TracingServiceEvent_DataSources& from) {
500 TracingServiceEvent_DataSources* const _this = this;
501 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TracingServiceEvent.DataSources)
502 GOOGLE_DCHECK_NE(&from, _this);
503 ::uint32_t cached_has_bits = 0;
504 (void) cached_has_bits;
505
506 _this->_impl_.data_source_.MergeFrom(from._impl_.data_source_);
507 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
508 }
509
CopyFrom(const TracingServiceEvent_DataSources & from)510 void TracingServiceEvent_DataSources::CopyFrom(const TracingServiceEvent_DataSources& from) {
511 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TracingServiceEvent.DataSources)
512 if (&from == this) return;
513 Clear();
514 MergeFrom(from);
515 }
516
IsInitialized() const517 bool TracingServiceEvent_DataSources::IsInitialized() const {
518 return true;
519 }
520
InternalSwap(TracingServiceEvent_DataSources * other)521 void TracingServiceEvent_DataSources::InternalSwap(TracingServiceEvent_DataSources* other) {
522 using std::swap;
523 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
524 _impl_.data_source_.InternalSwap(&other->_impl_.data_source_);
525 }
526
GetTypeName() const527 std::string TracingServiceEvent_DataSources::GetTypeName() const {
528 return "perfetto.protos.TracingServiceEvent.DataSources";
529 }
530
531
532 // ===================================================================
533
534 class TracingServiceEvent::_Internal {
535 public:
536 static const ::perfetto::protos::TracingServiceEvent_DataSources& slow_starting_data_sources(const TracingServiceEvent* msg);
537 static const ::perfetto::protos::TracingServiceEvent_DataSources& last_flush_slow_data_sources(const TracingServiceEvent* msg);
538 };
539
540 const ::perfetto::protos::TracingServiceEvent_DataSources&
slow_starting_data_sources(const TracingServiceEvent * msg)541 TracingServiceEvent::_Internal::slow_starting_data_sources(const TracingServiceEvent* msg) {
542 return *msg->_impl_.event_type_.slow_starting_data_sources_;
543 }
544 const ::perfetto::protos::TracingServiceEvent_DataSources&
last_flush_slow_data_sources(const TracingServiceEvent * msg)545 TracingServiceEvent::_Internal::last_flush_slow_data_sources(const TracingServiceEvent* msg) {
546 return *msg->_impl_.event_type_.last_flush_slow_data_sources_;
547 }
set_allocated_slow_starting_data_sources(::perfetto::protos::TracingServiceEvent_DataSources * slow_starting_data_sources)548 void TracingServiceEvent::set_allocated_slow_starting_data_sources(::perfetto::protos::TracingServiceEvent_DataSources* slow_starting_data_sources) {
549 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
550 clear_event_type();
551 if (slow_starting_data_sources) {
552 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
553 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(slow_starting_data_sources);
554 if (message_arena != submessage_arena) {
555 slow_starting_data_sources = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
556 message_arena, slow_starting_data_sources, submessage_arena);
557 }
558 set_has_slow_starting_data_sources();
559 _impl_.event_type_.slow_starting_data_sources_ = slow_starting_data_sources;
560 }
561 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.TracingServiceEvent.slow_starting_data_sources)
562 }
set_allocated_last_flush_slow_data_sources(::perfetto::protos::TracingServiceEvent_DataSources * last_flush_slow_data_sources)563 void TracingServiceEvent::set_allocated_last_flush_slow_data_sources(::perfetto::protos::TracingServiceEvent_DataSources* last_flush_slow_data_sources) {
564 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
565 clear_event_type();
566 if (last_flush_slow_data_sources) {
567 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
568 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(last_flush_slow_data_sources);
569 if (message_arena != submessage_arena) {
570 last_flush_slow_data_sources = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
571 message_arena, last_flush_slow_data_sources, submessage_arena);
572 }
573 set_has_last_flush_slow_data_sources();
574 _impl_.event_type_.last_flush_slow_data_sources_ = last_flush_slow_data_sources;
575 }
576 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.TracingServiceEvent.last_flush_slow_data_sources)
577 }
TracingServiceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)578 TracingServiceEvent::TracingServiceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
579 bool is_message_owned)
580 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
581 SharedCtor(arena, is_message_owned);
582 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TracingServiceEvent)
583 }
TracingServiceEvent(const TracingServiceEvent & from)584 TracingServiceEvent::TracingServiceEvent(const TracingServiceEvent& from)
585 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
586 TracingServiceEvent* const _this = this; (void)_this;
587 new (&_impl_) Impl_{
588 decltype(_impl_.event_type_){}
589 , /*decltype(_impl_._cached_size_)*/{}
590 , /*decltype(_impl_._oneof_case_)*/{}};
591
592 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
593 clear_has_event_type();
594 switch (from.event_type_case()) {
595 case kTracingStarted: {
596 _this->_internal_set_tracing_started(from._internal_tracing_started());
597 break;
598 }
599 case kAllDataSourcesStarted: {
600 _this->_internal_set_all_data_sources_started(from._internal_all_data_sources_started());
601 break;
602 }
603 case kFlushStarted: {
604 _this->_internal_set_flush_started(from._internal_flush_started());
605 break;
606 }
607 case kAllDataSourcesFlushed: {
608 _this->_internal_set_all_data_sources_flushed(from._internal_all_data_sources_flushed());
609 break;
610 }
611 case kReadTracingBuffersCompleted: {
612 _this->_internal_set_read_tracing_buffers_completed(from._internal_read_tracing_buffers_completed());
613 break;
614 }
615 case kTracingDisabled: {
616 _this->_internal_set_tracing_disabled(from._internal_tracing_disabled());
617 break;
618 }
619 case kSeizedForBugreport: {
620 _this->_internal_set_seized_for_bugreport(from._internal_seized_for_bugreport());
621 break;
622 }
623 case kSlowStartingDataSources: {
624 _this->_internal_mutable_slow_starting_data_sources()->::perfetto::protos::TracingServiceEvent_DataSources::MergeFrom(
625 from._internal_slow_starting_data_sources());
626 break;
627 }
628 case kLastFlushSlowDataSources: {
629 _this->_internal_mutable_last_flush_slow_data_sources()->::perfetto::protos::TracingServiceEvent_DataSources::MergeFrom(
630 from._internal_last_flush_slow_data_sources());
631 break;
632 }
633 case EVENT_TYPE_NOT_SET: {
634 break;
635 }
636 }
637 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TracingServiceEvent)
638 }
639
SharedCtor(::_pb::Arena * arena,bool is_message_owned)640 inline void TracingServiceEvent::SharedCtor(
641 ::_pb::Arena* arena, bool is_message_owned) {
642 (void)arena;
643 (void)is_message_owned;
644 new (&_impl_) Impl_{
645 decltype(_impl_.event_type_){}
646 , /*decltype(_impl_._cached_size_)*/{}
647 , /*decltype(_impl_._oneof_case_)*/{}
648 };
649 clear_has_event_type();
650 }
651
~TracingServiceEvent()652 TracingServiceEvent::~TracingServiceEvent() {
653 // @@protoc_insertion_point(destructor:perfetto.protos.TracingServiceEvent)
654 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
655 (void)arena;
656 return;
657 }
658 SharedDtor();
659 }
660
SharedDtor()661 inline void TracingServiceEvent::SharedDtor() {
662 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
663 if (has_event_type()) {
664 clear_event_type();
665 }
666 }
667
SetCachedSize(int size) const668 void TracingServiceEvent::SetCachedSize(int size) const {
669 _impl_._cached_size_.Set(size);
670 }
671
clear_event_type()672 void TracingServiceEvent::clear_event_type() {
673 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.TracingServiceEvent)
674 switch (event_type_case()) {
675 case kTracingStarted: {
676 // No need to clear
677 break;
678 }
679 case kAllDataSourcesStarted: {
680 // No need to clear
681 break;
682 }
683 case kFlushStarted: {
684 // No need to clear
685 break;
686 }
687 case kAllDataSourcesFlushed: {
688 // No need to clear
689 break;
690 }
691 case kReadTracingBuffersCompleted: {
692 // No need to clear
693 break;
694 }
695 case kTracingDisabled: {
696 // No need to clear
697 break;
698 }
699 case kSeizedForBugreport: {
700 // No need to clear
701 break;
702 }
703 case kSlowStartingDataSources: {
704 if (GetArenaForAllocation() == nullptr) {
705 delete _impl_.event_type_.slow_starting_data_sources_;
706 }
707 break;
708 }
709 case kLastFlushSlowDataSources: {
710 if (GetArenaForAllocation() == nullptr) {
711 delete _impl_.event_type_.last_flush_slow_data_sources_;
712 }
713 break;
714 }
715 case EVENT_TYPE_NOT_SET: {
716 break;
717 }
718 }
719 _impl_._oneof_case_[0] = EVENT_TYPE_NOT_SET;
720 }
721
722
Clear()723 void TracingServiceEvent::Clear() {
724 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TracingServiceEvent)
725 ::uint32_t cached_has_bits = 0;
726 // Prevent compiler warnings about cached_has_bits being unused
727 (void) cached_has_bits;
728
729 clear_event_type();
730 _internal_metadata_.Clear<std::string>();
731 }
732
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)733 const char* TracingServiceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
734 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
735 while (!ctx->Done(&ptr)) {
736 ::uint32_t tag;
737 ptr = ::_pbi::ReadTag(ptr, &tag);
738 switch (tag >> 3) {
739 // bool all_data_sources_started = 1;
740 case 1:
741 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
742 _internal_set_all_data_sources_started(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
743 CHK_(ptr);
744 } else {
745 goto handle_unusual;
746 }
747 continue;
748 // bool tracing_started = 2;
749 case 2:
750 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
751 _internal_set_tracing_started(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
752 CHK_(ptr);
753 } else {
754 goto handle_unusual;
755 }
756 continue;
757 // bool all_data_sources_flushed = 3;
758 case 3:
759 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
760 _internal_set_all_data_sources_flushed(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
761 CHK_(ptr);
762 } else {
763 goto handle_unusual;
764 }
765 continue;
766 // bool read_tracing_buffers_completed = 4;
767 case 4:
768 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
769 _internal_set_read_tracing_buffers_completed(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
770 CHK_(ptr);
771 } else {
772 goto handle_unusual;
773 }
774 continue;
775 // bool tracing_disabled = 5;
776 case 5:
777 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
778 _internal_set_tracing_disabled(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
779 CHK_(ptr);
780 } else {
781 goto handle_unusual;
782 }
783 continue;
784 // bool seized_for_bugreport = 6;
785 case 6:
786 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
787 _internal_set_seized_for_bugreport(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
788 CHK_(ptr);
789 } else {
790 goto handle_unusual;
791 }
792 continue;
793 // .perfetto.protos.TracingServiceEvent.DataSources slow_starting_data_sources = 7;
794 case 7:
795 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
796 ptr = ctx->ParseMessage(_internal_mutable_slow_starting_data_sources(), ptr);
797 CHK_(ptr);
798 } else {
799 goto handle_unusual;
800 }
801 continue;
802 // .perfetto.protos.TracingServiceEvent.DataSources last_flush_slow_data_sources = 8;
803 case 8:
804 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
805 ptr = ctx->ParseMessage(_internal_mutable_last_flush_slow_data_sources(), ptr);
806 CHK_(ptr);
807 } else {
808 goto handle_unusual;
809 }
810 continue;
811 // bool flush_started = 9;
812 case 9:
813 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
814 _internal_set_flush_started(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
815 CHK_(ptr);
816 } else {
817 goto handle_unusual;
818 }
819 continue;
820 default:
821 goto handle_unusual;
822 } // switch
823 handle_unusual:
824 if ((tag == 0) || ((tag & 7) == 4)) {
825 CHK_(ptr);
826 ctx->SetLastTag(tag);
827 goto message_done;
828 }
829 ptr = UnknownFieldParse(
830 tag,
831 _internal_metadata_.mutable_unknown_fields<std::string>(),
832 ptr, ctx);
833 CHK_(ptr != nullptr);
834 } // while
835 message_done:
836 return ptr;
837 failure:
838 ptr = nullptr;
839 goto message_done;
840 #undef CHK_
841 }
842
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const843 ::uint8_t* TracingServiceEvent::_InternalSerialize(
844 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
845 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TracingServiceEvent)
846 ::uint32_t cached_has_bits = 0;
847 (void) cached_has_bits;
848
849 switch (event_type_case()) {
850 case kAllDataSourcesStarted: {
851 target = stream->EnsureSpace(target);
852 target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_all_data_sources_started(), target);
853 break;
854 }
855 case kTracingStarted: {
856 target = stream->EnsureSpace(target);
857 target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_tracing_started(), target);
858 break;
859 }
860 case kAllDataSourcesFlushed: {
861 target = stream->EnsureSpace(target);
862 target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_all_data_sources_flushed(), target);
863 break;
864 }
865 case kReadTracingBuffersCompleted: {
866 target = stream->EnsureSpace(target);
867 target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_read_tracing_buffers_completed(), target);
868 break;
869 }
870 case kTracingDisabled: {
871 target = stream->EnsureSpace(target);
872 target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_tracing_disabled(), target);
873 break;
874 }
875 case kSeizedForBugreport: {
876 target = stream->EnsureSpace(target);
877 target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_seized_for_bugreport(), target);
878 break;
879 }
880 case kSlowStartingDataSources: {
881 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
882 InternalWriteMessage(7, _Internal::slow_starting_data_sources(this),
883 _Internal::slow_starting_data_sources(this).GetCachedSize(), target, stream);
884 break;
885 }
886 case kLastFlushSlowDataSources: {
887 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
888 InternalWriteMessage(8, _Internal::last_flush_slow_data_sources(this),
889 _Internal::last_flush_slow_data_sources(this).GetCachedSize(), target, stream);
890 break;
891 }
892 case kFlushStarted: {
893 target = stream->EnsureSpace(target);
894 target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_flush_started(), target);
895 break;
896 }
897 default: ;
898 }
899 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
900 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
901 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
902 }
903 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TracingServiceEvent)
904 return target;
905 }
906
ByteSizeLong() const907 size_t TracingServiceEvent::ByteSizeLong() const {
908 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TracingServiceEvent)
909 size_t total_size = 0;
910
911 switch (event_type_case()) {
912 // bool tracing_started = 2;
913 case kTracingStarted: {
914 total_size += 1 + 1;
915 break;
916 }
917 // bool all_data_sources_started = 1;
918 case kAllDataSourcesStarted: {
919 total_size += 1 + 1;
920 break;
921 }
922 // bool flush_started = 9;
923 case kFlushStarted: {
924 total_size += 1 + 1;
925 break;
926 }
927 // bool all_data_sources_flushed = 3;
928 case kAllDataSourcesFlushed: {
929 total_size += 1 + 1;
930 break;
931 }
932 // bool read_tracing_buffers_completed = 4;
933 case kReadTracingBuffersCompleted: {
934 total_size += 1 + 1;
935 break;
936 }
937 // bool tracing_disabled = 5;
938 case kTracingDisabled: {
939 total_size += 1 + 1;
940 break;
941 }
942 // bool seized_for_bugreport = 6;
943 case kSeizedForBugreport: {
944 total_size += 1 + 1;
945 break;
946 }
947 // .perfetto.protos.TracingServiceEvent.DataSources slow_starting_data_sources = 7;
948 case kSlowStartingDataSources: {
949 total_size += 1 +
950 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
951 *_impl_.event_type_.slow_starting_data_sources_);
952 break;
953 }
954 // .perfetto.protos.TracingServiceEvent.DataSources last_flush_slow_data_sources = 8;
955 case kLastFlushSlowDataSources: {
956 total_size += 1 +
957 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
958 *_impl_.event_type_.last_flush_slow_data_sources_);
959 break;
960 }
961 case EVENT_TYPE_NOT_SET: {
962 break;
963 }
964 }
965 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
966 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
967 }
968 int cached_size = ::_pbi::ToCachedSize(total_size);
969 SetCachedSize(cached_size);
970 return total_size;
971 }
972
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)973 void TracingServiceEvent::CheckTypeAndMergeFrom(
974 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
975 MergeFrom(*::_pbi::DownCast<const TracingServiceEvent*>(
976 &from));
977 }
978
MergeFrom(const TracingServiceEvent & from)979 void TracingServiceEvent::MergeFrom(const TracingServiceEvent& from) {
980 TracingServiceEvent* const _this = this;
981 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TracingServiceEvent)
982 GOOGLE_DCHECK_NE(&from, _this);
983 ::uint32_t cached_has_bits = 0;
984 (void) cached_has_bits;
985
986 switch (from.event_type_case()) {
987 case kTracingStarted: {
988 _this->_internal_set_tracing_started(from._internal_tracing_started());
989 break;
990 }
991 case kAllDataSourcesStarted: {
992 _this->_internal_set_all_data_sources_started(from._internal_all_data_sources_started());
993 break;
994 }
995 case kFlushStarted: {
996 _this->_internal_set_flush_started(from._internal_flush_started());
997 break;
998 }
999 case kAllDataSourcesFlushed: {
1000 _this->_internal_set_all_data_sources_flushed(from._internal_all_data_sources_flushed());
1001 break;
1002 }
1003 case kReadTracingBuffersCompleted: {
1004 _this->_internal_set_read_tracing_buffers_completed(from._internal_read_tracing_buffers_completed());
1005 break;
1006 }
1007 case kTracingDisabled: {
1008 _this->_internal_set_tracing_disabled(from._internal_tracing_disabled());
1009 break;
1010 }
1011 case kSeizedForBugreport: {
1012 _this->_internal_set_seized_for_bugreport(from._internal_seized_for_bugreport());
1013 break;
1014 }
1015 case kSlowStartingDataSources: {
1016 _this->_internal_mutable_slow_starting_data_sources()->::perfetto::protos::TracingServiceEvent_DataSources::MergeFrom(
1017 from._internal_slow_starting_data_sources());
1018 break;
1019 }
1020 case kLastFlushSlowDataSources: {
1021 _this->_internal_mutable_last_flush_slow_data_sources()->::perfetto::protos::TracingServiceEvent_DataSources::MergeFrom(
1022 from._internal_last_flush_slow_data_sources());
1023 break;
1024 }
1025 case EVENT_TYPE_NOT_SET: {
1026 break;
1027 }
1028 }
1029 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1030 }
1031
CopyFrom(const TracingServiceEvent & from)1032 void TracingServiceEvent::CopyFrom(const TracingServiceEvent& from) {
1033 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TracingServiceEvent)
1034 if (&from == this) return;
1035 Clear();
1036 MergeFrom(from);
1037 }
1038
IsInitialized() const1039 bool TracingServiceEvent::IsInitialized() const {
1040 return true;
1041 }
1042
InternalSwap(TracingServiceEvent * other)1043 void TracingServiceEvent::InternalSwap(TracingServiceEvent* other) {
1044 using std::swap;
1045 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1046 swap(_impl_.event_type_, other->_impl_.event_type_);
1047 swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
1048 }
1049
GetTypeName() const1050 std::string TracingServiceEvent::GetTypeName() const {
1051 return "perfetto.protos.TracingServiceEvent";
1052 }
1053
1054
1055 // @@protoc_insertion_point(namespace_scope)
1056 } // namespace protos
1057 } // namespace perfetto
1058 PROTOBUF_NAMESPACE_OPEN
1059 template<> PROTOBUF_NOINLINE ::perfetto::protos::TracingServiceEvent_DataSources_DataSource*
CreateMaybeMessage(Arena * arena)1060 Arena::CreateMaybeMessage< ::perfetto::protos::TracingServiceEvent_DataSources_DataSource >(Arena* arena) {
1061 return Arena::CreateMessageInternal< ::perfetto::protos::TracingServiceEvent_DataSources_DataSource >(arena);
1062 }
1063 template<> PROTOBUF_NOINLINE ::perfetto::protos::TracingServiceEvent_DataSources*
CreateMaybeMessage(Arena * arena)1064 Arena::CreateMaybeMessage< ::perfetto::protos::TracingServiceEvent_DataSources >(Arena* arena) {
1065 return Arena::CreateMessageInternal< ::perfetto::protos::TracingServiceEvent_DataSources >(arena);
1066 }
1067 template<> PROTOBUF_NOINLINE ::perfetto::protos::TracingServiceEvent*
CreateMaybeMessage(Arena * arena)1068 Arena::CreateMaybeMessage< ::perfetto::protos::TracingServiceEvent >(Arena* arena) {
1069 return Arena::CreateMessageInternal< ::perfetto::protos::TracingServiceEvent >(arena);
1070 }
1071 PROTOBUF_NAMESPACE_CLOSE
1072
1073 // @@protoc_insertion_point(global_scope)
1074 #include <google/protobuf/port_undef.inc>
1075