1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/ftrace_stats.proto
3
4 #include "protos/perfetto/trace/ftrace/ftrace_stats.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 {
FtraceCpuStats(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR FtraceCpuStats::FtraceCpuStats(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.cpu_)*/::uint64_t{0u}
28 , /*decltype(_impl_.entries_)*/::uint64_t{0u}
29 , /*decltype(_impl_.overrun_)*/::uint64_t{0u}
30 , /*decltype(_impl_.commit_overrun_)*/::uint64_t{0u}
31 , /*decltype(_impl_.bytes_read_)*/::uint64_t{0u}
32 , /*decltype(_impl_.oldest_event_ts_)*/0
33 , /*decltype(_impl_.now_ts_)*/0
34 , /*decltype(_impl_.dropped_events_)*/::uint64_t{0u}
35 , /*decltype(_impl_.read_events_)*/::uint64_t{0u}} {}
36 struct FtraceCpuStatsDefaultTypeInternal {
FtraceCpuStatsDefaultTypeInternalperfetto::protos::FtraceCpuStatsDefaultTypeInternal37 PROTOBUF_CONSTEXPR FtraceCpuStatsDefaultTypeInternal()
38 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceCpuStatsDefaultTypeInternalperfetto::protos::FtraceCpuStatsDefaultTypeInternal39 ~FtraceCpuStatsDefaultTypeInternal() {}
40 union { // NOLINT(misc-non-private-member-variables-in-classes)
41 FtraceCpuStats _instance;
42 };
43 };
44 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceCpuStatsDefaultTypeInternal _FtraceCpuStats_default_instance_;
FtraceKprobeStats(::_pbi::ConstantInitialized)45 PROTOBUF_CONSTEXPR FtraceKprobeStats::FtraceKprobeStats(
46 ::_pbi::ConstantInitialized): _impl_{
47 /*decltype(_impl_._has_bits_)*/{}
48 , /*decltype(_impl_._cached_size_)*/{}
49 , /*decltype(_impl_.hits_)*/::int64_t{0}
50 , /*decltype(_impl_.misses_)*/::int64_t{0}} {}
51 struct FtraceKprobeStatsDefaultTypeInternal {
FtraceKprobeStatsDefaultTypeInternalperfetto::protos::FtraceKprobeStatsDefaultTypeInternal52 PROTOBUF_CONSTEXPR FtraceKprobeStatsDefaultTypeInternal()
53 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceKprobeStatsDefaultTypeInternalperfetto::protos::FtraceKprobeStatsDefaultTypeInternal54 ~FtraceKprobeStatsDefaultTypeInternal() {}
55 union { // NOLINT(misc-non-private-member-variables-in-classes)
56 FtraceKprobeStats _instance;
57 };
58 };
59 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceKprobeStatsDefaultTypeInternal _FtraceKprobeStats_default_instance_;
FtraceStats(::_pbi::ConstantInitialized)60 PROTOBUF_CONSTEXPR FtraceStats::FtraceStats(
61 ::_pbi::ConstantInitialized): _impl_{
62 /*decltype(_impl_._has_bits_)*/{}
63 , /*decltype(_impl_._cached_size_)*/{}
64 , /*decltype(_impl_.cpu_stats_)*/{}
65 , /*decltype(_impl_.unknown_ftrace_events_)*/{}
66 , /*decltype(_impl_.failed_ftrace_events_)*/{}
67 , /*decltype(_impl_.ftrace_parse_errors_)*/{}
68 , /*decltype(_impl_.atrace_errors_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
69 , /*decltype(_impl_.kprobe_stats_)*/nullptr
70 , /*decltype(_impl_.phase_)*/0
71 , /*decltype(_impl_.kernel_symbols_parsed_)*/0u
72 , /*decltype(_impl_.kernel_symbols_mem_kb_)*/0u
73 , /*decltype(_impl_.preserve_ftrace_buffer_)*/false} {}
74 struct FtraceStatsDefaultTypeInternal {
FtraceStatsDefaultTypeInternalperfetto::protos::FtraceStatsDefaultTypeInternal75 PROTOBUF_CONSTEXPR FtraceStatsDefaultTypeInternal()
76 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceStatsDefaultTypeInternalperfetto::protos::FtraceStatsDefaultTypeInternal77 ~FtraceStatsDefaultTypeInternal() {}
78 union { // NOLINT(misc-non-private-member-variables-in-classes)
79 FtraceStats _instance;
80 };
81 };
82 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceStatsDefaultTypeInternal _FtraceStats_default_instance_;
83 } // namespace protos
84 } // namespace perfetto
85 namespace perfetto {
86 namespace protos {
FtraceStats_Phase_IsValid(int value)87 bool FtraceStats_Phase_IsValid(int value) {
88 switch (value) {
89 case 0:
90 case 1:
91 case 2:
92 return true;
93 default:
94 return false;
95 }
96 }
97
98 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FtraceStats_Phase_strings[3] = {};
99
100 static const char FtraceStats_Phase_names[] =
101 "END_OF_TRACE"
102 "START_OF_TRACE"
103 "UNSPECIFIED";
104
105 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FtraceStats_Phase_entries[] = {
106 { {FtraceStats_Phase_names + 0, 12}, 2 },
107 { {FtraceStats_Phase_names + 12, 14}, 1 },
108 { {FtraceStats_Phase_names + 26, 11}, 0 },
109 };
110
111 static const int FtraceStats_Phase_entries_by_number[] = {
112 2, // 0 -> UNSPECIFIED
113 1, // 1 -> START_OF_TRACE
114 0, // 2 -> END_OF_TRACE
115 };
116
FtraceStats_Phase_Name(FtraceStats_Phase value)117 const std::string& FtraceStats_Phase_Name(
118 FtraceStats_Phase value) {
119 static const bool dummy =
120 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
121 FtraceStats_Phase_entries,
122 FtraceStats_Phase_entries_by_number,
123 3, FtraceStats_Phase_strings);
124 (void) dummy;
125 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
126 FtraceStats_Phase_entries,
127 FtraceStats_Phase_entries_by_number,
128 3, value);
129 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
130 FtraceStats_Phase_strings[idx].get();
131 }
FtraceStats_Phase_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FtraceStats_Phase * value)132 bool FtraceStats_Phase_Parse(
133 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FtraceStats_Phase* value) {
134 int int_value;
135 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
136 FtraceStats_Phase_entries, 3, name, &int_value);
137 if (success) {
138 *value = static_cast<FtraceStats_Phase>(int_value);
139 }
140 return success;
141 }
142 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
143 constexpr FtraceStats_Phase FtraceStats::UNSPECIFIED;
144 constexpr FtraceStats_Phase FtraceStats::START_OF_TRACE;
145 constexpr FtraceStats_Phase FtraceStats::END_OF_TRACE;
146 constexpr FtraceStats_Phase FtraceStats::Phase_MIN;
147 constexpr FtraceStats_Phase FtraceStats::Phase_MAX;
148 constexpr int FtraceStats::Phase_ARRAYSIZE;
149 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
FtraceParseStatus_IsValid(int value)150 bool FtraceParseStatus_IsValid(int value) {
151 switch (value) {
152 case 0:
153 case 1:
154 case 2:
155 case 3:
156 case 4:
157 case 5:
158 case 6:
159 case 7:
160 case 8:
161 case 9:
162 case 10:
163 case 11:
164 case 12:
165 case 13:
166 case 14:
167 case 15:
168 case 16:
169 case 17:
170 return true;
171 default:
172 return false;
173 }
174 }
175
176 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FtraceParseStatus_strings[18] = {};
177
178 static const char FtraceParseStatus_names[] =
179 "FTRACE_STATUS_ABI_END_OVERFLOW"
180 "FTRACE_STATUS_ABI_INVALID_DATA_LENGTH"
181 "FTRACE_STATUS_ABI_INVALID_PADDING_LENGTH"
182 "FTRACE_STATUS_ABI_INVALID_PAGE_HEADER"
183 "FTRACE_STATUS_ABI_NULL_PADDING"
184 "FTRACE_STATUS_ABI_SHORT_DATA_LENGTH"
185 "FTRACE_STATUS_ABI_SHORT_EVENT_HEADER"
186 "FTRACE_STATUS_ABI_SHORT_EVENT_ID"
187 "FTRACE_STATUS_ABI_SHORT_PADDING_LENGTH"
188 "FTRACE_STATUS_ABI_SHORT_TIME_EXTEND"
189 "FTRACE_STATUS_ABI_SHORT_TIME_STAMP"
190 "FTRACE_STATUS_ABI_ZERO_DATA_LENGTH"
191 "FTRACE_STATUS_INVALID_EVENT"
192 "FTRACE_STATUS_OK"
193 "FTRACE_STATUS_PARTIAL_PAGE_READ"
194 "FTRACE_STATUS_SHORT_COMPACT_EVENT"
195 "FTRACE_STATUS_UNEXPECTED_READ_ERROR"
196 "FTRACE_STATUS_UNSPECIFIED";
197
198 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FtraceParseStatus_entries[] = {
199 { {FtraceParseStatus_names + 0, 30}, 15 },
200 { {FtraceParseStatus_names + 30, 37}, 13 },
201 { {FtraceParseStatus_names + 67, 40}, 8 },
202 { {FtraceParseStatus_names + 107, 37}, 4 },
203 { {FtraceParseStatus_names + 144, 30}, 6 },
204 { {FtraceParseStatus_names + 174, 35}, 11 },
205 { {FtraceParseStatus_names + 209, 36}, 5 },
206 { {FtraceParseStatus_names + 245, 32}, 14 },
207 { {FtraceParseStatus_names + 277, 38}, 7 },
208 { {FtraceParseStatus_names + 315, 35}, 9 },
209 { {FtraceParseStatus_names + 350, 34}, 10 },
210 { {FtraceParseStatus_names + 384, 34}, 12 },
211 { {FtraceParseStatus_names + 418, 27}, 17 },
212 { {FtraceParseStatus_names + 445, 16}, 1 },
213 { {FtraceParseStatus_names + 461, 31}, 3 },
214 { {FtraceParseStatus_names + 492, 33}, 16 },
215 { {FtraceParseStatus_names + 525, 35}, 2 },
216 { {FtraceParseStatus_names + 560, 25}, 0 },
217 };
218
219 static const int FtraceParseStatus_entries_by_number[] = {
220 17, // 0 -> FTRACE_STATUS_UNSPECIFIED
221 13, // 1 -> FTRACE_STATUS_OK
222 16, // 2 -> FTRACE_STATUS_UNEXPECTED_READ_ERROR
223 14, // 3 -> FTRACE_STATUS_PARTIAL_PAGE_READ
224 3, // 4 -> FTRACE_STATUS_ABI_INVALID_PAGE_HEADER
225 6, // 5 -> FTRACE_STATUS_ABI_SHORT_EVENT_HEADER
226 4, // 6 -> FTRACE_STATUS_ABI_NULL_PADDING
227 8, // 7 -> FTRACE_STATUS_ABI_SHORT_PADDING_LENGTH
228 2, // 8 -> FTRACE_STATUS_ABI_INVALID_PADDING_LENGTH
229 9, // 9 -> FTRACE_STATUS_ABI_SHORT_TIME_EXTEND
230 10, // 10 -> FTRACE_STATUS_ABI_SHORT_TIME_STAMP
231 5, // 11 -> FTRACE_STATUS_ABI_SHORT_DATA_LENGTH
232 11, // 12 -> FTRACE_STATUS_ABI_ZERO_DATA_LENGTH
233 1, // 13 -> FTRACE_STATUS_ABI_INVALID_DATA_LENGTH
234 7, // 14 -> FTRACE_STATUS_ABI_SHORT_EVENT_ID
235 0, // 15 -> FTRACE_STATUS_ABI_END_OVERFLOW
236 15, // 16 -> FTRACE_STATUS_SHORT_COMPACT_EVENT
237 12, // 17 -> FTRACE_STATUS_INVALID_EVENT
238 };
239
FtraceParseStatus_Name(FtraceParseStatus value)240 const std::string& FtraceParseStatus_Name(
241 FtraceParseStatus value) {
242 static const bool dummy =
243 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
244 FtraceParseStatus_entries,
245 FtraceParseStatus_entries_by_number,
246 18, FtraceParseStatus_strings);
247 (void) dummy;
248 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
249 FtraceParseStatus_entries,
250 FtraceParseStatus_entries_by_number,
251 18, value);
252 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
253 FtraceParseStatus_strings[idx].get();
254 }
FtraceParseStatus_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FtraceParseStatus * value)255 bool FtraceParseStatus_Parse(
256 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FtraceParseStatus* value) {
257 int int_value;
258 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
259 FtraceParseStatus_entries, 18, name, &int_value);
260 if (success) {
261 *value = static_cast<FtraceParseStatus>(int_value);
262 }
263 return success;
264 }
265
266 // ===================================================================
267
268 class FtraceCpuStats::_Internal {
269 public:
270 using HasBits = decltype(std::declval<FtraceCpuStats>()._impl_._has_bits_);
set_has_cpu(HasBits * has_bits)271 static void set_has_cpu(HasBits* has_bits) {
272 (*has_bits)[0] |= 1u;
273 }
set_has_entries(HasBits * has_bits)274 static void set_has_entries(HasBits* has_bits) {
275 (*has_bits)[0] |= 2u;
276 }
set_has_overrun(HasBits * has_bits)277 static void set_has_overrun(HasBits* has_bits) {
278 (*has_bits)[0] |= 4u;
279 }
set_has_commit_overrun(HasBits * has_bits)280 static void set_has_commit_overrun(HasBits* has_bits) {
281 (*has_bits)[0] |= 8u;
282 }
set_has_bytes_read(HasBits * has_bits)283 static void set_has_bytes_read(HasBits* has_bits) {
284 (*has_bits)[0] |= 16u;
285 }
set_has_oldest_event_ts(HasBits * has_bits)286 static void set_has_oldest_event_ts(HasBits* has_bits) {
287 (*has_bits)[0] |= 32u;
288 }
set_has_now_ts(HasBits * has_bits)289 static void set_has_now_ts(HasBits* has_bits) {
290 (*has_bits)[0] |= 64u;
291 }
set_has_dropped_events(HasBits * has_bits)292 static void set_has_dropped_events(HasBits* has_bits) {
293 (*has_bits)[0] |= 128u;
294 }
set_has_read_events(HasBits * has_bits)295 static void set_has_read_events(HasBits* has_bits) {
296 (*has_bits)[0] |= 256u;
297 }
298 };
299
FtraceCpuStats(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)300 FtraceCpuStats::FtraceCpuStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
301 bool is_message_owned)
302 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
303 SharedCtor(arena, is_message_owned);
304 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceCpuStats)
305 }
FtraceCpuStats(const FtraceCpuStats & from)306 FtraceCpuStats::FtraceCpuStats(const FtraceCpuStats& from)
307 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
308 FtraceCpuStats* const _this = this; (void)_this;
309 new (&_impl_) Impl_{
310 decltype(_impl_._has_bits_){from._impl_._has_bits_}
311 , /*decltype(_impl_._cached_size_)*/{}
312 , decltype(_impl_.cpu_){}
313 , decltype(_impl_.entries_){}
314 , decltype(_impl_.overrun_){}
315 , decltype(_impl_.commit_overrun_){}
316 , decltype(_impl_.bytes_read_){}
317 , decltype(_impl_.oldest_event_ts_){}
318 , decltype(_impl_.now_ts_){}
319 , decltype(_impl_.dropped_events_){}
320 , decltype(_impl_.read_events_){}};
321
322 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
323 ::memcpy(&_impl_.cpu_, &from._impl_.cpu_,
324 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.read_events_) -
325 reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.read_events_));
326 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceCpuStats)
327 }
328
SharedCtor(::_pb::Arena * arena,bool is_message_owned)329 inline void FtraceCpuStats::SharedCtor(
330 ::_pb::Arena* arena, bool is_message_owned) {
331 (void)arena;
332 (void)is_message_owned;
333 new (&_impl_) Impl_{
334 decltype(_impl_._has_bits_){}
335 , /*decltype(_impl_._cached_size_)*/{}
336 , decltype(_impl_.cpu_){::uint64_t{0u}}
337 , decltype(_impl_.entries_){::uint64_t{0u}}
338 , decltype(_impl_.overrun_){::uint64_t{0u}}
339 , decltype(_impl_.commit_overrun_){::uint64_t{0u}}
340 , decltype(_impl_.bytes_read_){::uint64_t{0u}}
341 , decltype(_impl_.oldest_event_ts_){0}
342 , decltype(_impl_.now_ts_){0}
343 , decltype(_impl_.dropped_events_){::uint64_t{0u}}
344 , decltype(_impl_.read_events_){::uint64_t{0u}}
345 };
346 }
347
~FtraceCpuStats()348 FtraceCpuStats::~FtraceCpuStats() {
349 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceCpuStats)
350 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
351 (void)arena;
352 return;
353 }
354 SharedDtor();
355 }
356
SharedDtor()357 inline void FtraceCpuStats::SharedDtor() {
358 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
359 }
360
SetCachedSize(int size) const361 void FtraceCpuStats::SetCachedSize(int size) const {
362 _impl_._cached_size_.Set(size);
363 }
364
Clear()365 void FtraceCpuStats::Clear() {
366 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceCpuStats)
367 ::uint32_t cached_has_bits = 0;
368 // Prevent compiler warnings about cached_has_bits being unused
369 (void) cached_has_bits;
370
371 cached_has_bits = _impl_._has_bits_[0];
372 if (cached_has_bits & 0x000000ffu) {
373 ::memset(&_impl_.cpu_, 0, static_cast<size_t>(
374 reinterpret_cast<char*>(&_impl_.dropped_events_) -
375 reinterpret_cast<char*>(&_impl_.cpu_)) + sizeof(_impl_.dropped_events_));
376 }
377 _impl_.read_events_ = ::uint64_t{0u};
378 _impl_._has_bits_.Clear();
379 _internal_metadata_.Clear<std::string>();
380 }
381
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)382 const char* FtraceCpuStats::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
383 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
384 _Internal::HasBits has_bits{};
385 while (!ctx->Done(&ptr)) {
386 ::uint32_t tag;
387 ptr = ::_pbi::ReadTag(ptr, &tag);
388 switch (tag >> 3) {
389 // optional uint64 cpu = 1;
390 case 1:
391 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
392 _Internal::set_has_cpu(&has_bits);
393 _impl_.cpu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
394 CHK_(ptr);
395 } else {
396 goto handle_unusual;
397 }
398 continue;
399 // optional uint64 entries = 2;
400 case 2:
401 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
402 _Internal::set_has_entries(&has_bits);
403 _impl_.entries_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
404 CHK_(ptr);
405 } else {
406 goto handle_unusual;
407 }
408 continue;
409 // optional uint64 overrun = 3;
410 case 3:
411 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
412 _Internal::set_has_overrun(&has_bits);
413 _impl_.overrun_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
414 CHK_(ptr);
415 } else {
416 goto handle_unusual;
417 }
418 continue;
419 // optional uint64 commit_overrun = 4;
420 case 4:
421 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
422 _Internal::set_has_commit_overrun(&has_bits);
423 _impl_.commit_overrun_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
424 CHK_(ptr);
425 } else {
426 goto handle_unusual;
427 }
428 continue;
429 // optional uint64 bytes_read = 5;
430 case 5:
431 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
432 _Internal::set_has_bytes_read(&has_bits);
433 _impl_.bytes_read_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
434 CHK_(ptr);
435 } else {
436 goto handle_unusual;
437 }
438 continue;
439 // optional double oldest_event_ts = 6;
440 case 6:
441 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 49)) {
442 _Internal::set_has_oldest_event_ts(&has_bits);
443 _impl_.oldest_event_ts_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
444 ptr += sizeof(double);
445 } else {
446 goto handle_unusual;
447 }
448 continue;
449 // optional double now_ts = 7;
450 case 7:
451 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 57)) {
452 _Internal::set_has_now_ts(&has_bits);
453 _impl_.now_ts_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
454 ptr += sizeof(double);
455 } else {
456 goto handle_unusual;
457 }
458 continue;
459 // optional uint64 dropped_events = 8;
460 case 8:
461 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
462 _Internal::set_has_dropped_events(&has_bits);
463 _impl_.dropped_events_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
464 CHK_(ptr);
465 } else {
466 goto handle_unusual;
467 }
468 continue;
469 // optional uint64 read_events = 9;
470 case 9:
471 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
472 _Internal::set_has_read_events(&has_bits);
473 _impl_.read_events_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
474 CHK_(ptr);
475 } else {
476 goto handle_unusual;
477 }
478 continue;
479 default:
480 goto handle_unusual;
481 } // switch
482 handle_unusual:
483 if ((tag == 0) || ((tag & 7) == 4)) {
484 CHK_(ptr);
485 ctx->SetLastTag(tag);
486 goto message_done;
487 }
488 ptr = UnknownFieldParse(
489 tag,
490 _internal_metadata_.mutable_unknown_fields<std::string>(),
491 ptr, ctx);
492 CHK_(ptr != nullptr);
493 } // while
494 message_done:
495 _impl_._has_bits_.Or(has_bits);
496 return ptr;
497 failure:
498 ptr = nullptr;
499 goto message_done;
500 #undef CHK_
501 }
502
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const503 ::uint8_t* FtraceCpuStats::_InternalSerialize(
504 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
505 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceCpuStats)
506 ::uint32_t cached_has_bits = 0;
507 (void) cached_has_bits;
508
509 cached_has_bits = _impl_._has_bits_[0];
510 // optional uint64 cpu = 1;
511 if (cached_has_bits & 0x00000001u) {
512 target = stream->EnsureSpace(target);
513 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_cpu(), target);
514 }
515
516 // optional uint64 entries = 2;
517 if (cached_has_bits & 0x00000002u) {
518 target = stream->EnsureSpace(target);
519 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_entries(), target);
520 }
521
522 // optional uint64 overrun = 3;
523 if (cached_has_bits & 0x00000004u) {
524 target = stream->EnsureSpace(target);
525 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_overrun(), target);
526 }
527
528 // optional uint64 commit_overrun = 4;
529 if (cached_has_bits & 0x00000008u) {
530 target = stream->EnsureSpace(target);
531 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_commit_overrun(), target);
532 }
533
534 // optional uint64 bytes_read = 5;
535 if (cached_has_bits & 0x00000010u) {
536 target = stream->EnsureSpace(target);
537 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_bytes_read(), target);
538 }
539
540 // optional double oldest_event_ts = 6;
541 if (cached_has_bits & 0x00000020u) {
542 target = stream->EnsureSpace(target);
543 target = ::_pbi::WireFormatLite::WriteDoubleToArray(6, this->_internal_oldest_event_ts(), target);
544 }
545
546 // optional double now_ts = 7;
547 if (cached_has_bits & 0x00000040u) {
548 target = stream->EnsureSpace(target);
549 target = ::_pbi::WireFormatLite::WriteDoubleToArray(7, this->_internal_now_ts(), target);
550 }
551
552 // optional uint64 dropped_events = 8;
553 if (cached_has_bits & 0x00000080u) {
554 target = stream->EnsureSpace(target);
555 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_dropped_events(), target);
556 }
557
558 // optional uint64 read_events = 9;
559 if (cached_has_bits & 0x00000100u) {
560 target = stream->EnsureSpace(target);
561 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(9, this->_internal_read_events(), target);
562 }
563
564 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
565 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
566 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
567 }
568 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceCpuStats)
569 return target;
570 }
571
ByteSizeLong() const572 size_t FtraceCpuStats::ByteSizeLong() const {
573 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceCpuStats)
574 size_t total_size = 0;
575
576 ::uint32_t cached_has_bits = 0;
577 // Prevent compiler warnings about cached_has_bits being unused
578 (void) cached_has_bits;
579
580 cached_has_bits = _impl_._has_bits_[0];
581 if (cached_has_bits & 0x000000ffu) {
582 // optional uint64 cpu = 1;
583 if (cached_has_bits & 0x00000001u) {
584 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_cpu());
585 }
586
587 // optional uint64 entries = 2;
588 if (cached_has_bits & 0x00000002u) {
589 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_entries());
590 }
591
592 // optional uint64 overrun = 3;
593 if (cached_has_bits & 0x00000004u) {
594 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_overrun());
595 }
596
597 // optional uint64 commit_overrun = 4;
598 if (cached_has_bits & 0x00000008u) {
599 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_commit_overrun());
600 }
601
602 // optional uint64 bytes_read = 5;
603 if (cached_has_bits & 0x00000010u) {
604 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_bytes_read());
605 }
606
607 // optional double oldest_event_ts = 6;
608 if (cached_has_bits & 0x00000020u) {
609 total_size += 1 + 8;
610 }
611
612 // optional double now_ts = 7;
613 if (cached_has_bits & 0x00000040u) {
614 total_size += 1 + 8;
615 }
616
617 // optional uint64 dropped_events = 8;
618 if (cached_has_bits & 0x00000080u) {
619 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_dropped_events());
620 }
621
622 }
623 // optional uint64 read_events = 9;
624 if (cached_has_bits & 0x00000100u) {
625 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_read_events());
626 }
627
628 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
629 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
630 }
631 int cached_size = ::_pbi::ToCachedSize(total_size);
632 SetCachedSize(cached_size);
633 return total_size;
634 }
635
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)636 void FtraceCpuStats::CheckTypeAndMergeFrom(
637 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
638 MergeFrom(*::_pbi::DownCast<const FtraceCpuStats*>(
639 &from));
640 }
641
MergeFrom(const FtraceCpuStats & from)642 void FtraceCpuStats::MergeFrom(const FtraceCpuStats& from) {
643 FtraceCpuStats* const _this = this;
644 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceCpuStats)
645 GOOGLE_DCHECK_NE(&from, _this);
646 ::uint32_t cached_has_bits = 0;
647 (void) cached_has_bits;
648
649 cached_has_bits = from._impl_._has_bits_[0];
650 if (cached_has_bits & 0x000000ffu) {
651 if (cached_has_bits & 0x00000001u) {
652 _this->_impl_.cpu_ = from._impl_.cpu_;
653 }
654 if (cached_has_bits & 0x00000002u) {
655 _this->_impl_.entries_ = from._impl_.entries_;
656 }
657 if (cached_has_bits & 0x00000004u) {
658 _this->_impl_.overrun_ = from._impl_.overrun_;
659 }
660 if (cached_has_bits & 0x00000008u) {
661 _this->_impl_.commit_overrun_ = from._impl_.commit_overrun_;
662 }
663 if (cached_has_bits & 0x00000010u) {
664 _this->_impl_.bytes_read_ = from._impl_.bytes_read_;
665 }
666 if (cached_has_bits & 0x00000020u) {
667 _this->_impl_.oldest_event_ts_ = from._impl_.oldest_event_ts_;
668 }
669 if (cached_has_bits & 0x00000040u) {
670 _this->_impl_.now_ts_ = from._impl_.now_ts_;
671 }
672 if (cached_has_bits & 0x00000080u) {
673 _this->_impl_.dropped_events_ = from._impl_.dropped_events_;
674 }
675 _this->_impl_._has_bits_[0] |= cached_has_bits;
676 }
677 if (cached_has_bits & 0x00000100u) {
678 _this->_internal_set_read_events(from._internal_read_events());
679 }
680 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
681 }
682
CopyFrom(const FtraceCpuStats & from)683 void FtraceCpuStats::CopyFrom(const FtraceCpuStats& from) {
684 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceCpuStats)
685 if (&from == this) return;
686 Clear();
687 MergeFrom(from);
688 }
689
IsInitialized() const690 bool FtraceCpuStats::IsInitialized() const {
691 return true;
692 }
693
InternalSwap(FtraceCpuStats * other)694 void FtraceCpuStats::InternalSwap(FtraceCpuStats* other) {
695 using std::swap;
696 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
697 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
698 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
699 PROTOBUF_FIELD_OFFSET(FtraceCpuStats, _impl_.read_events_)
700 + sizeof(FtraceCpuStats::_impl_.read_events_) // NOLINT
701 - PROTOBUF_FIELD_OFFSET(FtraceCpuStats, _impl_.cpu_)>(
702 reinterpret_cast<char*>(&_impl_.cpu_),
703 reinterpret_cast<char*>(&other->_impl_.cpu_));
704 }
705
GetTypeName() const706 std::string FtraceCpuStats::GetTypeName() const {
707 return "perfetto.protos.FtraceCpuStats";
708 }
709
710
711 // ===================================================================
712
713 class FtraceKprobeStats::_Internal {
714 public:
715 using HasBits = decltype(std::declval<FtraceKprobeStats>()._impl_._has_bits_);
set_has_hits(HasBits * has_bits)716 static void set_has_hits(HasBits* has_bits) {
717 (*has_bits)[0] |= 1u;
718 }
set_has_misses(HasBits * has_bits)719 static void set_has_misses(HasBits* has_bits) {
720 (*has_bits)[0] |= 2u;
721 }
722 };
723
FtraceKprobeStats(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)724 FtraceKprobeStats::FtraceKprobeStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
725 bool is_message_owned)
726 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
727 SharedCtor(arena, is_message_owned);
728 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceKprobeStats)
729 }
FtraceKprobeStats(const FtraceKprobeStats & from)730 FtraceKprobeStats::FtraceKprobeStats(const FtraceKprobeStats& from)
731 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
732 FtraceKprobeStats* const _this = this; (void)_this;
733 new (&_impl_) Impl_{
734 decltype(_impl_._has_bits_){from._impl_._has_bits_}
735 , /*decltype(_impl_._cached_size_)*/{}
736 , decltype(_impl_.hits_){}
737 , decltype(_impl_.misses_){}};
738
739 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
740 ::memcpy(&_impl_.hits_, &from._impl_.hits_,
741 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.misses_) -
742 reinterpret_cast<char*>(&_impl_.hits_)) + sizeof(_impl_.misses_));
743 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceKprobeStats)
744 }
745
SharedCtor(::_pb::Arena * arena,bool is_message_owned)746 inline void FtraceKprobeStats::SharedCtor(
747 ::_pb::Arena* arena, bool is_message_owned) {
748 (void)arena;
749 (void)is_message_owned;
750 new (&_impl_) Impl_{
751 decltype(_impl_._has_bits_){}
752 , /*decltype(_impl_._cached_size_)*/{}
753 , decltype(_impl_.hits_){::int64_t{0}}
754 , decltype(_impl_.misses_){::int64_t{0}}
755 };
756 }
757
~FtraceKprobeStats()758 FtraceKprobeStats::~FtraceKprobeStats() {
759 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceKprobeStats)
760 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
761 (void)arena;
762 return;
763 }
764 SharedDtor();
765 }
766
SharedDtor()767 inline void FtraceKprobeStats::SharedDtor() {
768 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
769 }
770
SetCachedSize(int size) const771 void FtraceKprobeStats::SetCachedSize(int size) const {
772 _impl_._cached_size_.Set(size);
773 }
774
Clear()775 void FtraceKprobeStats::Clear() {
776 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceKprobeStats)
777 ::uint32_t cached_has_bits = 0;
778 // Prevent compiler warnings about cached_has_bits being unused
779 (void) cached_has_bits;
780
781 cached_has_bits = _impl_._has_bits_[0];
782 if (cached_has_bits & 0x00000003u) {
783 ::memset(&_impl_.hits_, 0, static_cast<size_t>(
784 reinterpret_cast<char*>(&_impl_.misses_) -
785 reinterpret_cast<char*>(&_impl_.hits_)) + sizeof(_impl_.misses_));
786 }
787 _impl_._has_bits_.Clear();
788 _internal_metadata_.Clear<std::string>();
789 }
790
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)791 const char* FtraceKprobeStats::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
792 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
793 _Internal::HasBits has_bits{};
794 while (!ctx->Done(&ptr)) {
795 ::uint32_t tag;
796 ptr = ::_pbi::ReadTag(ptr, &tag);
797 switch (tag >> 3) {
798 // optional int64 hits = 1;
799 case 1:
800 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
801 _Internal::set_has_hits(&has_bits);
802 _impl_.hits_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
803 CHK_(ptr);
804 } else {
805 goto handle_unusual;
806 }
807 continue;
808 // optional int64 misses = 2;
809 case 2:
810 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
811 _Internal::set_has_misses(&has_bits);
812 _impl_.misses_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
813 CHK_(ptr);
814 } else {
815 goto handle_unusual;
816 }
817 continue;
818 default:
819 goto handle_unusual;
820 } // switch
821 handle_unusual:
822 if ((tag == 0) || ((tag & 7) == 4)) {
823 CHK_(ptr);
824 ctx->SetLastTag(tag);
825 goto message_done;
826 }
827 ptr = UnknownFieldParse(
828 tag,
829 _internal_metadata_.mutable_unknown_fields<std::string>(),
830 ptr, ctx);
831 CHK_(ptr != nullptr);
832 } // while
833 message_done:
834 _impl_._has_bits_.Or(has_bits);
835 return ptr;
836 failure:
837 ptr = nullptr;
838 goto message_done;
839 #undef CHK_
840 }
841
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const842 ::uint8_t* FtraceKprobeStats::_InternalSerialize(
843 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
844 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceKprobeStats)
845 ::uint32_t cached_has_bits = 0;
846 (void) cached_has_bits;
847
848 cached_has_bits = _impl_._has_bits_[0];
849 // optional int64 hits = 1;
850 if (cached_has_bits & 0x00000001u) {
851 target = stream->EnsureSpace(target);
852 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_hits(), target);
853 }
854
855 // optional int64 misses = 2;
856 if (cached_has_bits & 0x00000002u) {
857 target = stream->EnsureSpace(target);
858 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_misses(), target);
859 }
860
861 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
862 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
863 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
864 }
865 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceKprobeStats)
866 return target;
867 }
868
ByteSizeLong() const869 size_t FtraceKprobeStats::ByteSizeLong() const {
870 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceKprobeStats)
871 size_t total_size = 0;
872
873 ::uint32_t cached_has_bits = 0;
874 // Prevent compiler warnings about cached_has_bits being unused
875 (void) cached_has_bits;
876
877 cached_has_bits = _impl_._has_bits_[0];
878 if (cached_has_bits & 0x00000003u) {
879 // optional int64 hits = 1;
880 if (cached_has_bits & 0x00000001u) {
881 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_hits());
882 }
883
884 // optional int64 misses = 2;
885 if (cached_has_bits & 0x00000002u) {
886 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_misses());
887 }
888
889 }
890 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
891 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
892 }
893 int cached_size = ::_pbi::ToCachedSize(total_size);
894 SetCachedSize(cached_size);
895 return total_size;
896 }
897
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)898 void FtraceKprobeStats::CheckTypeAndMergeFrom(
899 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
900 MergeFrom(*::_pbi::DownCast<const FtraceKprobeStats*>(
901 &from));
902 }
903
MergeFrom(const FtraceKprobeStats & from)904 void FtraceKprobeStats::MergeFrom(const FtraceKprobeStats& from) {
905 FtraceKprobeStats* const _this = this;
906 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceKprobeStats)
907 GOOGLE_DCHECK_NE(&from, _this);
908 ::uint32_t cached_has_bits = 0;
909 (void) cached_has_bits;
910
911 cached_has_bits = from._impl_._has_bits_[0];
912 if (cached_has_bits & 0x00000003u) {
913 if (cached_has_bits & 0x00000001u) {
914 _this->_impl_.hits_ = from._impl_.hits_;
915 }
916 if (cached_has_bits & 0x00000002u) {
917 _this->_impl_.misses_ = from._impl_.misses_;
918 }
919 _this->_impl_._has_bits_[0] |= cached_has_bits;
920 }
921 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
922 }
923
CopyFrom(const FtraceKprobeStats & from)924 void FtraceKprobeStats::CopyFrom(const FtraceKprobeStats& from) {
925 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceKprobeStats)
926 if (&from == this) return;
927 Clear();
928 MergeFrom(from);
929 }
930
IsInitialized() const931 bool FtraceKprobeStats::IsInitialized() const {
932 return true;
933 }
934
InternalSwap(FtraceKprobeStats * other)935 void FtraceKprobeStats::InternalSwap(FtraceKprobeStats* other) {
936 using std::swap;
937 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
938 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
939 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
940 PROTOBUF_FIELD_OFFSET(FtraceKprobeStats, _impl_.misses_)
941 + sizeof(FtraceKprobeStats::_impl_.misses_) // NOLINT
942 - PROTOBUF_FIELD_OFFSET(FtraceKprobeStats, _impl_.hits_)>(
943 reinterpret_cast<char*>(&_impl_.hits_),
944 reinterpret_cast<char*>(&other->_impl_.hits_));
945 }
946
GetTypeName() const947 std::string FtraceKprobeStats::GetTypeName() const {
948 return "perfetto.protos.FtraceKprobeStats";
949 }
950
951
952 // ===================================================================
953
954 class FtraceStats::_Internal {
955 public:
956 using HasBits = decltype(std::declval<FtraceStats>()._impl_._has_bits_);
set_has_phase(HasBits * has_bits)957 static void set_has_phase(HasBits* has_bits) {
958 (*has_bits)[0] |= 4u;
959 }
set_has_kernel_symbols_parsed(HasBits * has_bits)960 static void set_has_kernel_symbols_parsed(HasBits* has_bits) {
961 (*has_bits)[0] |= 8u;
962 }
set_has_kernel_symbols_mem_kb(HasBits * has_bits)963 static void set_has_kernel_symbols_mem_kb(HasBits* has_bits) {
964 (*has_bits)[0] |= 16u;
965 }
set_has_atrace_errors(HasBits * has_bits)966 static void set_has_atrace_errors(HasBits* has_bits) {
967 (*has_bits)[0] |= 1u;
968 }
set_has_preserve_ftrace_buffer(HasBits * has_bits)969 static void set_has_preserve_ftrace_buffer(HasBits* has_bits) {
970 (*has_bits)[0] |= 32u;
971 }
972 static const ::perfetto::protos::FtraceKprobeStats& kprobe_stats(const FtraceStats* msg);
set_has_kprobe_stats(HasBits * has_bits)973 static void set_has_kprobe_stats(HasBits* has_bits) {
974 (*has_bits)[0] |= 2u;
975 }
976 };
977
978 const ::perfetto::protos::FtraceKprobeStats&
kprobe_stats(const FtraceStats * msg)979 FtraceStats::_Internal::kprobe_stats(const FtraceStats* msg) {
980 return *msg->_impl_.kprobe_stats_;
981 }
FtraceStats(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)982 FtraceStats::FtraceStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
983 bool is_message_owned)
984 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
985 SharedCtor(arena, is_message_owned);
986 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceStats)
987 }
FtraceStats(const FtraceStats & from)988 FtraceStats::FtraceStats(const FtraceStats& from)
989 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
990 FtraceStats* const _this = this; (void)_this;
991 new (&_impl_) Impl_{
992 decltype(_impl_._has_bits_){from._impl_._has_bits_}
993 , /*decltype(_impl_._cached_size_)*/{}
994 , decltype(_impl_.cpu_stats_){from._impl_.cpu_stats_}
995 , decltype(_impl_.unknown_ftrace_events_){from._impl_.unknown_ftrace_events_}
996 , decltype(_impl_.failed_ftrace_events_){from._impl_.failed_ftrace_events_}
997 , decltype(_impl_.ftrace_parse_errors_){from._impl_.ftrace_parse_errors_}
998 , decltype(_impl_.atrace_errors_){}
999 , decltype(_impl_.kprobe_stats_){nullptr}
1000 , decltype(_impl_.phase_){}
1001 , decltype(_impl_.kernel_symbols_parsed_){}
1002 , decltype(_impl_.kernel_symbols_mem_kb_){}
1003 , decltype(_impl_.preserve_ftrace_buffer_){}};
1004
1005 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1006 _impl_.atrace_errors_.InitDefault();
1007 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1008 _impl_.atrace_errors_.Set("", GetArenaForAllocation());
1009 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1010 if (from._internal_has_atrace_errors()) {
1011 _this->_impl_.atrace_errors_.Set(from._internal_atrace_errors(),
1012 _this->GetArenaForAllocation());
1013 }
1014 if (from._internal_has_kprobe_stats()) {
1015 _this->_impl_.kprobe_stats_ = new ::perfetto::protos::FtraceKprobeStats(*from._impl_.kprobe_stats_);
1016 }
1017 ::memcpy(&_impl_.phase_, &from._impl_.phase_,
1018 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.preserve_ftrace_buffer_) -
1019 reinterpret_cast<char*>(&_impl_.phase_)) + sizeof(_impl_.preserve_ftrace_buffer_));
1020 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceStats)
1021 }
1022
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1023 inline void FtraceStats::SharedCtor(
1024 ::_pb::Arena* arena, bool is_message_owned) {
1025 (void)arena;
1026 (void)is_message_owned;
1027 new (&_impl_) Impl_{
1028 decltype(_impl_._has_bits_){}
1029 , /*decltype(_impl_._cached_size_)*/{}
1030 , decltype(_impl_.cpu_stats_){arena}
1031 , decltype(_impl_.unknown_ftrace_events_){arena}
1032 , decltype(_impl_.failed_ftrace_events_){arena}
1033 , decltype(_impl_.ftrace_parse_errors_){arena}
1034 , decltype(_impl_.atrace_errors_){}
1035 , decltype(_impl_.kprobe_stats_){nullptr}
1036 , decltype(_impl_.phase_){0}
1037 , decltype(_impl_.kernel_symbols_parsed_){0u}
1038 , decltype(_impl_.kernel_symbols_mem_kb_){0u}
1039 , decltype(_impl_.preserve_ftrace_buffer_){false}
1040 };
1041 _impl_.atrace_errors_.InitDefault();
1042 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1043 _impl_.atrace_errors_.Set("", GetArenaForAllocation());
1044 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1045 }
1046
~FtraceStats()1047 FtraceStats::~FtraceStats() {
1048 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceStats)
1049 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1050 (void)arena;
1051 return;
1052 }
1053 SharedDtor();
1054 }
1055
SharedDtor()1056 inline void FtraceStats::SharedDtor() {
1057 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1058 _impl_.cpu_stats_.~RepeatedPtrField();
1059 _impl_.unknown_ftrace_events_.~RepeatedPtrField();
1060 _impl_.failed_ftrace_events_.~RepeatedPtrField();
1061 _impl_.ftrace_parse_errors_.~RepeatedField();
1062 _impl_.atrace_errors_.Destroy();
1063 if (this != internal_default_instance()) delete _impl_.kprobe_stats_;
1064 }
1065
SetCachedSize(int size) const1066 void FtraceStats::SetCachedSize(int size) const {
1067 _impl_._cached_size_.Set(size);
1068 }
1069
Clear()1070 void FtraceStats::Clear() {
1071 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceStats)
1072 ::uint32_t cached_has_bits = 0;
1073 // Prevent compiler warnings about cached_has_bits being unused
1074 (void) cached_has_bits;
1075
1076 _impl_.cpu_stats_.Clear();
1077 _impl_.unknown_ftrace_events_.Clear();
1078 _impl_.failed_ftrace_events_.Clear();
1079 _impl_.ftrace_parse_errors_.Clear();
1080 cached_has_bits = _impl_._has_bits_[0];
1081 if (cached_has_bits & 0x00000003u) {
1082 if (cached_has_bits & 0x00000001u) {
1083 _impl_.atrace_errors_.ClearNonDefaultToEmpty();
1084 }
1085 if (cached_has_bits & 0x00000002u) {
1086 GOOGLE_DCHECK(_impl_.kprobe_stats_ != nullptr);
1087 _impl_.kprobe_stats_->Clear();
1088 }
1089 }
1090 if (cached_has_bits & 0x0000003cu) {
1091 ::memset(&_impl_.phase_, 0, static_cast<size_t>(
1092 reinterpret_cast<char*>(&_impl_.preserve_ftrace_buffer_) -
1093 reinterpret_cast<char*>(&_impl_.phase_)) + sizeof(_impl_.preserve_ftrace_buffer_));
1094 }
1095 _impl_._has_bits_.Clear();
1096 _internal_metadata_.Clear<std::string>();
1097 }
1098
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1099 const char* FtraceStats::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1100 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1101 _Internal::HasBits has_bits{};
1102 while (!ctx->Done(&ptr)) {
1103 ::uint32_t tag;
1104 ptr = ::_pbi::ReadTag(ptr, &tag);
1105 switch (tag >> 3) {
1106 // optional .perfetto.protos.FtraceStats.Phase phase = 1;
1107 case 1:
1108 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1109 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1110 CHK_(ptr);
1111 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FtraceStats_Phase_IsValid(val))) {
1112 _internal_set_phase(static_cast<::perfetto::protos::FtraceStats_Phase>(val));
1113 } else {
1114 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
1115 }
1116 } else {
1117 goto handle_unusual;
1118 }
1119 continue;
1120 // repeated .perfetto.protos.FtraceCpuStats cpu_stats = 2;
1121 case 2:
1122 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1123 ptr -= 1;
1124 do {
1125 ptr += 1;
1126 ptr = ctx->ParseMessage(_internal_add_cpu_stats(), ptr);
1127 CHK_(ptr);
1128 if (!ctx->DataAvailable(ptr)) break;
1129 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1130 } else {
1131 goto handle_unusual;
1132 }
1133 continue;
1134 // optional uint32 kernel_symbols_parsed = 3;
1135 case 3:
1136 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1137 _Internal::set_has_kernel_symbols_parsed(&has_bits);
1138 _impl_.kernel_symbols_parsed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1139 CHK_(ptr);
1140 } else {
1141 goto handle_unusual;
1142 }
1143 continue;
1144 // optional uint32 kernel_symbols_mem_kb = 4;
1145 case 4:
1146 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1147 _Internal::set_has_kernel_symbols_mem_kb(&has_bits);
1148 _impl_.kernel_symbols_mem_kb_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1149 CHK_(ptr);
1150 } else {
1151 goto handle_unusual;
1152 }
1153 continue;
1154 // optional string atrace_errors = 5;
1155 case 5:
1156 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
1157 auto str = _internal_mutable_atrace_errors();
1158 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1159 CHK_(ptr);
1160 } else {
1161 goto handle_unusual;
1162 }
1163 continue;
1164 // repeated string unknown_ftrace_events = 6;
1165 case 6:
1166 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1167 ptr -= 1;
1168 do {
1169 ptr += 1;
1170 auto str = _internal_add_unknown_ftrace_events();
1171 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1172 CHK_(ptr);
1173 if (!ctx->DataAvailable(ptr)) break;
1174 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
1175 } else {
1176 goto handle_unusual;
1177 }
1178 continue;
1179 // repeated string failed_ftrace_events = 7;
1180 case 7:
1181 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
1182 ptr -= 1;
1183 do {
1184 ptr += 1;
1185 auto str = _internal_add_failed_ftrace_events();
1186 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1187 CHK_(ptr);
1188 if (!ctx->DataAvailable(ptr)) break;
1189 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
1190 } else {
1191 goto handle_unusual;
1192 }
1193 continue;
1194 // optional bool preserve_ftrace_buffer = 8;
1195 case 8:
1196 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1197 _Internal::set_has_preserve_ftrace_buffer(&has_bits);
1198 _impl_.preserve_ftrace_buffer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1199 CHK_(ptr);
1200 } else {
1201 goto handle_unusual;
1202 }
1203 continue;
1204 // repeated .perfetto.protos.FtraceParseStatus ftrace_parse_errors = 9;
1205 case 9:
1206 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1207 ptr -= 1;
1208 do {
1209 ptr += 1;
1210 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1211 CHK_(ptr);
1212 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FtraceParseStatus_IsValid(val))) {
1213 _internal_add_ftrace_parse_errors(static_cast<::perfetto::protos::FtraceParseStatus>(val));
1214 } else {
1215 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields());
1216 }
1217 if (!ctx->DataAvailable(ptr)) break;
1218 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<72>(ptr));
1219 } else if (static_cast<::uint8_t>(tag) == 74) {
1220 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<std::string>(_internal_mutable_ftrace_parse_errors(), ptr, ctx, ::perfetto::protos::FtraceParseStatus_IsValid, &_internal_metadata_, 9);
1221 CHK_(ptr);
1222 } else {
1223 goto handle_unusual;
1224 }
1225 continue;
1226 // optional .perfetto.protos.FtraceKprobeStats kprobe_stats = 10;
1227 case 10:
1228 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
1229 ptr = ctx->ParseMessage(_internal_mutable_kprobe_stats(), ptr);
1230 CHK_(ptr);
1231 } else {
1232 goto handle_unusual;
1233 }
1234 continue;
1235 default:
1236 goto handle_unusual;
1237 } // switch
1238 handle_unusual:
1239 if ((tag == 0) || ((tag & 7) == 4)) {
1240 CHK_(ptr);
1241 ctx->SetLastTag(tag);
1242 goto message_done;
1243 }
1244 ptr = UnknownFieldParse(
1245 tag,
1246 _internal_metadata_.mutable_unknown_fields<std::string>(),
1247 ptr, ctx);
1248 CHK_(ptr != nullptr);
1249 } // while
1250 message_done:
1251 _impl_._has_bits_.Or(has_bits);
1252 return ptr;
1253 failure:
1254 ptr = nullptr;
1255 goto message_done;
1256 #undef CHK_
1257 }
1258
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1259 ::uint8_t* FtraceStats::_InternalSerialize(
1260 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1261 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceStats)
1262 ::uint32_t cached_has_bits = 0;
1263 (void) cached_has_bits;
1264
1265 cached_has_bits = _impl_._has_bits_[0];
1266 // optional .perfetto.protos.FtraceStats.Phase phase = 1;
1267 if (cached_has_bits & 0x00000004u) {
1268 target = stream->EnsureSpace(target);
1269 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1270 1, this->_internal_phase(), target);
1271 }
1272
1273 // repeated .perfetto.protos.FtraceCpuStats cpu_stats = 2;
1274 for (unsigned i = 0,
1275 n = static_cast<unsigned>(this->_internal_cpu_stats_size()); i < n; i++) {
1276 const auto& repfield = this->_internal_cpu_stats(i);
1277 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1278 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
1279 }
1280
1281 // optional uint32 kernel_symbols_parsed = 3;
1282 if (cached_has_bits & 0x00000008u) {
1283 target = stream->EnsureSpace(target);
1284 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_kernel_symbols_parsed(), target);
1285 }
1286
1287 // optional uint32 kernel_symbols_mem_kb = 4;
1288 if (cached_has_bits & 0x00000010u) {
1289 target = stream->EnsureSpace(target);
1290 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_kernel_symbols_mem_kb(), target);
1291 }
1292
1293 // optional string atrace_errors = 5;
1294 if (cached_has_bits & 0x00000001u) {
1295 target = stream->WriteStringMaybeAliased(
1296 5, this->_internal_atrace_errors(), target);
1297 }
1298
1299 // repeated string unknown_ftrace_events = 6;
1300 for (int i = 0, n = this->_internal_unknown_ftrace_events_size(); i < n; i++) {
1301 const auto& s = this->_internal_unknown_ftrace_events(i);
1302 target = stream->WriteString(6, s, target);
1303 }
1304
1305 // repeated string failed_ftrace_events = 7;
1306 for (int i = 0, n = this->_internal_failed_ftrace_events_size(); i < n; i++) {
1307 const auto& s = this->_internal_failed_ftrace_events(i);
1308 target = stream->WriteString(7, s, target);
1309 }
1310
1311 // optional bool preserve_ftrace_buffer = 8;
1312 if (cached_has_bits & 0x00000020u) {
1313 target = stream->EnsureSpace(target);
1314 target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_preserve_ftrace_buffer(), target);
1315 }
1316
1317 // repeated .perfetto.protos.FtraceParseStatus ftrace_parse_errors = 9;
1318 for (int i = 0, n = this->_internal_ftrace_parse_errors_size(); i < n; i++) {
1319 target = stream->EnsureSpace(target);
1320 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1321 9, this->_internal_ftrace_parse_errors(i), target);
1322 }
1323
1324 // optional .perfetto.protos.FtraceKprobeStats kprobe_stats = 10;
1325 if (cached_has_bits & 0x00000002u) {
1326 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1327 InternalWriteMessage(10, _Internal::kprobe_stats(this),
1328 _Internal::kprobe_stats(this).GetCachedSize(), target, stream);
1329 }
1330
1331 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1332 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1333 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1334 }
1335 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceStats)
1336 return target;
1337 }
1338
ByteSizeLong() const1339 size_t FtraceStats::ByteSizeLong() const {
1340 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceStats)
1341 size_t total_size = 0;
1342
1343 ::uint32_t cached_has_bits = 0;
1344 // Prevent compiler warnings about cached_has_bits being unused
1345 (void) cached_has_bits;
1346
1347 // repeated .perfetto.protos.FtraceCpuStats cpu_stats = 2;
1348 total_size += 1UL * this->_internal_cpu_stats_size();
1349 for (const auto& msg : this->_impl_.cpu_stats_) {
1350 total_size +=
1351 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1352 }
1353
1354 // repeated string unknown_ftrace_events = 6;
1355 total_size += 1 *
1356 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.unknown_ftrace_events_.size());
1357 for (int i = 0, n = _impl_.unknown_ftrace_events_.size(); i < n; i++) {
1358 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1359 _impl_.unknown_ftrace_events_.Get(i));
1360 }
1361
1362 // repeated string failed_ftrace_events = 7;
1363 total_size += 1 *
1364 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.failed_ftrace_events_.size());
1365 for (int i = 0, n = _impl_.failed_ftrace_events_.size(); i < n; i++) {
1366 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1367 _impl_.failed_ftrace_events_.Get(i));
1368 }
1369
1370 // repeated .perfetto.protos.FtraceParseStatus ftrace_parse_errors = 9;
1371 {
1372 size_t data_size = 0;
1373 unsigned int count = static_cast<unsigned int>(this->_internal_ftrace_parse_errors_size());for (unsigned int i = 0; i < count; i++) {
1374 data_size += ::_pbi::WireFormatLite::EnumSize(
1375 this->_internal_ftrace_parse_errors(static_cast<int>(i)));
1376 }
1377 total_size += (1UL * count) + data_size;
1378 }
1379
1380 cached_has_bits = _impl_._has_bits_[0];
1381 if (cached_has_bits & 0x0000003fu) {
1382 // optional string atrace_errors = 5;
1383 if (cached_has_bits & 0x00000001u) {
1384 total_size += 1 +
1385 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1386 this->_internal_atrace_errors());
1387 }
1388
1389 // optional .perfetto.protos.FtraceKprobeStats kprobe_stats = 10;
1390 if (cached_has_bits & 0x00000002u) {
1391 total_size += 1 +
1392 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1393 *_impl_.kprobe_stats_);
1394 }
1395
1396 // optional .perfetto.protos.FtraceStats.Phase phase = 1;
1397 if (cached_has_bits & 0x00000004u) {
1398 total_size += 1 +
1399 ::_pbi::WireFormatLite::EnumSize(this->_internal_phase());
1400 }
1401
1402 // optional uint32 kernel_symbols_parsed = 3;
1403 if (cached_has_bits & 0x00000008u) {
1404 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_symbols_parsed());
1405 }
1406
1407 // optional uint32 kernel_symbols_mem_kb = 4;
1408 if (cached_has_bits & 0x00000010u) {
1409 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_symbols_mem_kb());
1410 }
1411
1412 // optional bool preserve_ftrace_buffer = 8;
1413 if (cached_has_bits & 0x00000020u) {
1414 total_size += 1 + 1;
1415 }
1416
1417 }
1418 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1419 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1420 }
1421 int cached_size = ::_pbi::ToCachedSize(total_size);
1422 SetCachedSize(cached_size);
1423 return total_size;
1424 }
1425
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1426 void FtraceStats::CheckTypeAndMergeFrom(
1427 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1428 MergeFrom(*::_pbi::DownCast<const FtraceStats*>(
1429 &from));
1430 }
1431
MergeFrom(const FtraceStats & from)1432 void FtraceStats::MergeFrom(const FtraceStats& from) {
1433 FtraceStats* const _this = this;
1434 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceStats)
1435 GOOGLE_DCHECK_NE(&from, _this);
1436 ::uint32_t cached_has_bits = 0;
1437 (void) cached_has_bits;
1438
1439 _this->_impl_.cpu_stats_.MergeFrom(from._impl_.cpu_stats_);
1440 _this->_impl_.unknown_ftrace_events_.MergeFrom(from._impl_.unknown_ftrace_events_);
1441 _this->_impl_.failed_ftrace_events_.MergeFrom(from._impl_.failed_ftrace_events_);
1442 _this->_impl_.ftrace_parse_errors_.MergeFrom(from._impl_.ftrace_parse_errors_);
1443 cached_has_bits = from._impl_._has_bits_[0];
1444 if (cached_has_bits & 0x0000003fu) {
1445 if (cached_has_bits & 0x00000001u) {
1446 _this->_internal_set_atrace_errors(from._internal_atrace_errors());
1447 }
1448 if (cached_has_bits & 0x00000002u) {
1449 _this->_internal_mutable_kprobe_stats()->::perfetto::protos::FtraceKprobeStats::MergeFrom(
1450 from._internal_kprobe_stats());
1451 }
1452 if (cached_has_bits & 0x00000004u) {
1453 _this->_impl_.phase_ = from._impl_.phase_;
1454 }
1455 if (cached_has_bits & 0x00000008u) {
1456 _this->_impl_.kernel_symbols_parsed_ = from._impl_.kernel_symbols_parsed_;
1457 }
1458 if (cached_has_bits & 0x00000010u) {
1459 _this->_impl_.kernel_symbols_mem_kb_ = from._impl_.kernel_symbols_mem_kb_;
1460 }
1461 if (cached_has_bits & 0x00000020u) {
1462 _this->_impl_.preserve_ftrace_buffer_ = from._impl_.preserve_ftrace_buffer_;
1463 }
1464 _this->_impl_._has_bits_[0] |= cached_has_bits;
1465 }
1466 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1467 }
1468
CopyFrom(const FtraceStats & from)1469 void FtraceStats::CopyFrom(const FtraceStats& from) {
1470 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceStats)
1471 if (&from == this) return;
1472 Clear();
1473 MergeFrom(from);
1474 }
1475
IsInitialized() const1476 bool FtraceStats::IsInitialized() const {
1477 return true;
1478 }
1479
InternalSwap(FtraceStats * other)1480 void FtraceStats::InternalSwap(FtraceStats* other) {
1481 using std::swap;
1482 auto* lhs_arena = GetArenaForAllocation();
1483 auto* rhs_arena = other->GetArenaForAllocation();
1484 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1485 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1486 _impl_.cpu_stats_.InternalSwap(&other->_impl_.cpu_stats_);
1487 _impl_.unknown_ftrace_events_.InternalSwap(&other->_impl_.unknown_ftrace_events_);
1488 _impl_.failed_ftrace_events_.InternalSwap(&other->_impl_.failed_ftrace_events_);
1489 _impl_.ftrace_parse_errors_.InternalSwap(&other->_impl_.ftrace_parse_errors_);
1490 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1491 &_impl_.atrace_errors_, lhs_arena,
1492 &other->_impl_.atrace_errors_, rhs_arena
1493 );
1494 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1495 PROTOBUF_FIELD_OFFSET(FtraceStats, _impl_.preserve_ftrace_buffer_)
1496 + sizeof(FtraceStats::_impl_.preserve_ftrace_buffer_) // NOLINT
1497 - PROTOBUF_FIELD_OFFSET(FtraceStats, _impl_.kprobe_stats_)>(
1498 reinterpret_cast<char*>(&_impl_.kprobe_stats_),
1499 reinterpret_cast<char*>(&other->_impl_.kprobe_stats_));
1500 }
1501
GetTypeName() const1502 std::string FtraceStats::GetTypeName() const {
1503 return "perfetto.protos.FtraceStats";
1504 }
1505
1506
1507 // @@protoc_insertion_point(namespace_scope)
1508 } // namespace protos
1509 } // namespace perfetto
1510 PROTOBUF_NAMESPACE_OPEN
1511 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceCpuStats*
CreateMaybeMessage(Arena * arena)1512 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceCpuStats >(Arena* arena) {
1513 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceCpuStats >(arena);
1514 }
1515 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceKprobeStats*
CreateMaybeMessage(Arena * arena)1516 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceKprobeStats >(Arena* arena) {
1517 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceKprobeStats >(arena);
1518 }
1519 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceStats*
CreateMaybeMessage(Arena * arena)1520 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceStats >(Arena* arena) {
1521 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceStats >(arena);
1522 }
1523 PROTOBUF_NAMESPACE_CLOSE
1524
1525 // @@protoc_insertion_point(global_scope)
1526 #include <google/protobuf/port_undef.inc>
1527