1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/config/ftrace/ftrace_config.proto
3
4 #include "protos/perfetto/config/ftrace/ftrace_config.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 {
FtraceConfig_KprobeEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR FtraceConfig_KprobeEvent::FtraceConfig_KprobeEvent(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.probe_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.type_)*/0} {}
29 struct FtraceConfig_KprobeEventDefaultTypeInternal {
FtraceConfig_KprobeEventDefaultTypeInternalperfetto::protos::FtraceConfig_KprobeEventDefaultTypeInternal30 PROTOBUF_CONSTEXPR FtraceConfig_KprobeEventDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceConfig_KprobeEventDefaultTypeInternalperfetto::protos::FtraceConfig_KprobeEventDefaultTypeInternal32 ~FtraceConfig_KprobeEventDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 FtraceConfig_KprobeEvent _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceConfig_KprobeEventDefaultTypeInternal _FtraceConfig_KprobeEvent_default_instance_;
FtraceConfig_CompactSchedConfig(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR FtraceConfig_CompactSchedConfig::FtraceConfig_CompactSchedConfig(
39 ::_pbi::ConstantInitialized): _impl_{
40 /*decltype(_impl_._has_bits_)*/{}
41 , /*decltype(_impl_._cached_size_)*/{}
42 , /*decltype(_impl_.enabled_)*/false} {}
43 struct FtraceConfig_CompactSchedConfigDefaultTypeInternal {
FtraceConfig_CompactSchedConfigDefaultTypeInternalperfetto::protos::FtraceConfig_CompactSchedConfigDefaultTypeInternal44 PROTOBUF_CONSTEXPR FtraceConfig_CompactSchedConfigDefaultTypeInternal()
45 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceConfig_CompactSchedConfigDefaultTypeInternalperfetto::protos::FtraceConfig_CompactSchedConfigDefaultTypeInternal46 ~FtraceConfig_CompactSchedConfigDefaultTypeInternal() {}
47 union { // NOLINT(misc-non-private-member-variables-in-classes)
48 FtraceConfig_CompactSchedConfig _instance;
49 };
50 };
51 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceConfig_CompactSchedConfigDefaultTypeInternal _FtraceConfig_CompactSchedConfig_default_instance_;
FtraceConfig_PrintFilter_Rule_AtraceMessage(::_pbi::ConstantInitialized)52 PROTOBUF_CONSTEXPR FtraceConfig_PrintFilter_Rule_AtraceMessage::FtraceConfig_PrintFilter_Rule_AtraceMessage(
53 ::_pbi::ConstantInitialized): _impl_{
54 /*decltype(_impl_._has_bits_)*/{}
55 , /*decltype(_impl_._cached_size_)*/{}
56 , /*decltype(_impl_.type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
57 , /*decltype(_impl_.prefix_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
58 struct FtraceConfig_PrintFilter_Rule_AtraceMessageDefaultTypeInternal {
FtraceConfig_PrintFilter_Rule_AtraceMessageDefaultTypeInternalperfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessageDefaultTypeInternal59 PROTOBUF_CONSTEXPR FtraceConfig_PrintFilter_Rule_AtraceMessageDefaultTypeInternal()
60 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceConfig_PrintFilter_Rule_AtraceMessageDefaultTypeInternalperfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessageDefaultTypeInternal61 ~FtraceConfig_PrintFilter_Rule_AtraceMessageDefaultTypeInternal() {}
62 union { // NOLINT(misc-non-private-member-variables-in-classes)
63 FtraceConfig_PrintFilter_Rule_AtraceMessage _instance;
64 };
65 };
66 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceConfig_PrintFilter_Rule_AtraceMessageDefaultTypeInternal _FtraceConfig_PrintFilter_Rule_AtraceMessage_default_instance_;
FtraceConfig_PrintFilter_Rule(::_pbi::ConstantInitialized)67 PROTOBUF_CONSTEXPR FtraceConfig_PrintFilter_Rule::FtraceConfig_PrintFilter_Rule(
68 ::_pbi::ConstantInitialized): _impl_{
69 /*decltype(_impl_._has_bits_)*/{}
70 , /*decltype(_impl_._cached_size_)*/{}
71 , /*decltype(_impl_.allow_)*/false
72 , /*decltype(_impl_.match_)*/{}
73 , /*decltype(_impl_._oneof_case_)*/{}} {}
74 struct FtraceConfig_PrintFilter_RuleDefaultTypeInternal {
FtraceConfig_PrintFilter_RuleDefaultTypeInternalperfetto::protos::FtraceConfig_PrintFilter_RuleDefaultTypeInternal75 PROTOBUF_CONSTEXPR FtraceConfig_PrintFilter_RuleDefaultTypeInternal()
76 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceConfig_PrintFilter_RuleDefaultTypeInternalperfetto::protos::FtraceConfig_PrintFilter_RuleDefaultTypeInternal77 ~FtraceConfig_PrintFilter_RuleDefaultTypeInternal() {}
78 union { // NOLINT(misc-non-private-member-variables-in-classes)
79 FtraceConfig_PrintFilter_Rule _instance;
80 };
81 };
82 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceConfig_PrintFilter_RuleDefaultTypeInternal _FtraceConfig_PrintFilter_Rule_default_instance_;
FtraceConfig_PrintFilter(::_pbi::ConstantInitialized)83 PROTOBUF_CONSTEXPR FtraceConfig_PrintFilter::FtraceConfig_PrintFilter(
84 ::_pbi::ConstantInitialized): _impl_{
85 /*decltype(_impl_.rules_)*/{}
86 , /*decltype(_impl_._cached_size_)*/{}} {}
87 struct FtraceConfig_PrintFilterDefaultTypeInternal {
FtraceConfig_PrintFilterDefaultTypeInternalperfetto::protos::FtraceConfig_PrintFilterDefaultTypeInternal88 PROTOBUF_CONSTEXPR FtraceConfig_PrintFilterDefaultTypeInternal()
89 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceConfig_PrintFilterDefaultTypeInternalperfetto::protos::FtraceConfig_PrintFilterDefaultTypeInternal90 ~FtraceConfig_PrintFilterDefaultTypeInternal() {}
91 union { // NOLINT(misc-non-private-member-variables-in-classes)
92 FtraceConfig_PrintFilter _instance;
93 };
94 };
95 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceConfig_PrintFilterDefaultTypeInternal _FtraceConfig_PrintFilter_default_instance_;
FtraceConfig(::_pbi::ConstantInitialized)96 PROTOBUF_CONSTEXPR FtraceConfig::FtraceConfig(
97 ::_pbi::ConstantInitialized): _impl_{
98 /*decltype(_impl_._has_bits_)*/{}
99 , /*decltype(_impl_._cached_size_)*/{}
100 , /*decltype(_impl_.ftrace_events_)*/{}
101 , /*decltype(_impl_.atrace_categories_)*/{}
102 , /*decltype(_impl_.atrace_apps_)*/{}
103 , /*decltype(_impl_.syscall_events_)*/{}
104 , /*decltype(_impl_.function_filters_)*/{}
105 , /*decltype(_impl_.function_graph_roots_)*/{}
106 , /*decltype(_impl_.atrace_categories_prefer_sdk_)*/{}
107 , /*decltype(_impl_.kprobe_events_)*/{}
108 , /*decltype(_impl_.instance_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
109 , /*decltype(_impl_.compact_sched_)*/nullptr
110 , /*decltype(_impl_.print_filter_)*/nullptr
111 , /*decltype(_impl_.buffer_size_kb_)*/0u
112 , /*decltype(_impl_.drain_period_ms_)*/0u
113 , /*decltype(_impl_.symbolize_ksyms_)*/false
114 , /*decltype(_impl_.initialize_ksyms_synchronously_for_testing_)*/false
115 , /*decltype(_impl_.throttle_rss_stat_)*/false
116 , /*decltype(_impl_.disable_generic_events_)*/false
117 , /*decltype(_impl_.ksyms_mem_policy_)*/0
118 , /*decltype(_impl_.enable_function_graph_)*/false
119 , /*decltype(_impl_.preserve_ftrace_buffer_)*/false
120 , /*decltype(_impl_.use_monotonic_raw_clock_)*/false
121 , /*decltype(_impl_.buffer_size_lower_bound_)*/false
122 , /*decltype(_impl_.drain_buffer_percent_)*/0u} {}
123 struct FtraceConfigDefaultTypeInternal {
FtraceConfigDefaultTypeInternalperfetto::protos::FtraceConfigDefaultTypeInternal124 PROTOBUF_CONSTEXPR FtraceConfigDefaultTypeInternal()
125 : _instance(::_pbi::ConstantInitialized{}) {}
~FtraceConfigDefaultTypeInternalperfetto::protos::FtraceConfigDefaultTypeInternal126 ~FtraceConfigDefaultTypeInternal() {}
127 union { // NOLINT(misc-non-private-member-variables-in-classes)
128 FtraceConfig _instance;
129 };
130 };
131 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FtraceConfigDefaultTypeInternal _FtraceConfig_default_instance_;
132 } // namespace protos
133 } // namespace perfetto
134 namespace perfetto {
135 namespace protos {
FtraceConfig_KprobeEvent_KprobeType_IsValid(int value)136 bool FtraceConfig_KprobeEvent_KprobeType_IsValid(int value) {
137 switch (value) {
138 case 0:
139 case 1:
140 case 2:
141 case 3:
142 return true;
143 default:
144 return false;
145 }
146 }
147
148 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FtraceConfig_KprobeEvent_KprobeType_strings[4] = {};
149
150 static const char FtraceConfig_KprobeEvent_KprobeType_names[] =
151 "KPROBE_TYPE_BOTH"
152 "KPROBE_TYPE_KPROBE"
153 "KPROBE_TYPE_KRETPROBE"
154 "KPROBE_TYPE_UNKNOWN";
155
156 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FtraceConfig_KprobeEvent_KprobeType_entries[] = {
157 { {FtraceConfig_KprobeEvent_KprobeType_names + 0, 16}, 3 },
158 { {FtraceConfig_KprobeEvent_KprobeType_names + 16, 18}, 1 },
159 { {FtraceConfig_KprobeEvent_KprobeType_names + 34, 21}, 2 },
160 { {FtraceConfig_KprobeEvent_KprobeType_names + 55, 19}, 0 },
161 };
162
163 static const int FtraceConfig_KprobeEvent_KprobeType_entries_by_number[] = {
164 3, // 0 -> KPROBE_TYPE_UNKNOWN
165 1, // 1 -> KPROBE_TYPE_KPROBE
166 2, // 2 -> KPROBE_TYPE_KRETPROBE
167 0, // 3 -> KPROBE_TYPE_BOTH
168 };
169
FtraceConfig_KprobeEvent_KprobeType_Name(FtraceConfig_KprobeEvent_KprobeType value)170 const std::string& FtraceConfig_KprobeEvent_KprobeType_Name(
171 FtraceConfig_KprobeEvent_KprobeType value) {
172 static const bool dummy =
173 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
174 FtraceConfig_KprobeEvent_KprobeType_entries,
175 FtraceConfig_KprobeEvent_KprobeType_entries_by_number,
176 4, FtraceConfig_KprobeEvent_KprobeType_strings);
177 (void) dummy;
178 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
179 FtraceConfig_KprobeEvent_KprobeType_entries,
180 FtraceConfig_KprobeEvent_KprobeType_entries_by_number,
181 4, value);
182 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
183 FtraceConfig_KprobeEvent_KprobeType_strings[idx].get();
184 }
FtraceConfig_KprobeEvent_KprobeType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FtraceConfig_KprobeEvent_KprobeType * value)185 bool FtraceConfig_KprobeEvent_KprobeType_Parse(
186 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FtraceConfig_KprobeEvent_KprobeType* value) {
187 int int_value;
188 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
189 FtraceConfig_KprobeEvent_KprobeType_entries, 4, name, &int_value);
190 if (success) {
191 *value = static_cast<FtraceConfig_KprobeEvent_KprobeType>(int_value);
192 }
193 return success;
194 }
195 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
196 constexpr FtraceConfig_KprobeEvent_KprobeType FtraceConfig_KprobeEvent::KPROBE_TYPE_UNKNOWN;
197 constexpr FtraceConfig_KprobeEvent_KprobeType FtraceConfig_KprobeEvent::KPROBE_TYPE_KPROBE;
198 constexpr FtraceConfig_KprobeEvent_KprobeType FtraceConfig_KprobeEvent::KPROBE_TYPE_KRETPROBE;
199 constexpr FtraceConfig_KprobeEvent_KprobeType FtraceConfig_KprobeEvent::KPROBE_TYPE_BOTH;
200 constexpr FtraceConfig_KprobeEvent_KprobeType FtraceConfig_KprobeEvent::KprobeType_MIN;
201 constexpr FtraceConfig_KprobeEvent_KprobeType FtraceConfig_KprobeEvent::KprobeType_MAX;
202 constexpr int FtraceConfig_KprobeEvent::KprobeType_ARRAYSIZE;
203 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
FtraceConfig_KsymsMemPolicy_IsValid(int value)204 bool FtraceConfig_KsymsMemPolicy_IsValid(int value) {
205 switch (value) {
206 case 0:
207 case 1:
208 case 2:
209 return true;
210 default:
211 return false;
212 }
213 }
214
215 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FtraceConfig_KsymsMemPolicy_strings[3] = {};
216
217 static const char FtraceConfig_KsymsMemPolicy_names[] =
218 "KSYMS_CLEANUP_ON_STOP"
219 "KSYMS_RETAIN"
220 "KSYMS_UNSPECIFIED";
221
222 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FtraceConfig_KsymsMemPolicy_entries[] = {
223 { {FtraceConfig_KsymsMemPolicy_names + 0, 21}, 1 },
224 { {FtraceConfig_KsymsMemPolicy_names + 21, 12}, 2 },
225 { {FtraceConfig_KsymsMemPolicy_names + 33, 17}, 0 },
226 };
227
228 static const int FtraceConfig_KsymsMemPolicy_entries_by_number[] = {
229 2, // 0 -> KSYMS_UNSPECIFIED
230 0, // 1 -> KSYMS_CLEANUP_ON_STOP
231 1, // 2 -> KSYMS_RETAIN
232 };
233
FtraceConfig_KsymsMemPolicy_Name(FtraceConfig_KsymsMemPolicy value)234 const std::string& FtraceConfig_KsymsMemPolicy_Name(
235 FtraceConfig_KsymsMemPolicy value) {
236 static const bool dummy =
237 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
238 FtraceConfig_KsymsMemPolicy_entries,
239 FtraceConfig_KsymsMemPolicy_entries_by_number,
240 3, FtraceConfig_KsymsMemPolicy_strings);
241 (void) dummy;
242 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
243 FtraceConfig_KsymsMemPolicy_entries,
244 FtraceConfig_KsymsMemPolicy_entries_by_number,
245 3, value);
246 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
247 FtraceConfig_KsymsMemPolicy_strings[idx].get();
248 }
FtraceConfig_KsymsMemPolicy_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,FtraceConfig_KsymsMemPolicy * value)249 bool FtraceConfig_KsymsMemPolicy_Parse(
250 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FtraceConfig_KsymsMemPolicy* value) {
251 int int_value;
252 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
253 FtraceConfig_KsymsMemPolicy_entries, 3, name, &int_value);
254 if (success) {
255 *value = static_cast<FtraceConfig_KsymsMemPolicy>(int_value);
256 }
257 return success;
258 }
259 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
260 constexpr FtraceConfig_KsymsMemPolicy FtraceConfig::KSYMS_UNSPECIFIED;
261 constexpr FtraceConfig_KsymsMemPolicy FtraceConfig::KSYMS_CLEANUP_ON_STOP;
262 constexpr FtraceConfig_KsymsMemPolicy FtraceConfig::KSYMS_RETAIN;
263 constexpr FtraceConfig_KsymsMemPolicy FtraceConfig::KsymsMemPolicy_MIN;
264 constexpr FtraceConfig_KsymsMemPolicy FtraceConfig::KsymsMemPolicy_MAX;
265 constexpr int FtraceConfig::KsymsMemPolicy_ARRAYSIZE;
266 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
267
268 // ===================================================================
269
270 class FtraceConfig_KprobeEvent::_Internal {
271 public:
272 using HasBits = decltype(std::declval<FtraceConfig_KprobeEvent>()._impl_._has_bits_);
set_has_probe(HasBits * has_bits)273 static void set_has_probe(HasBits* has_bits) {
274 (*has_bits)[0] |= 1u;
275 }
set_has_type(HasBits * has_bits)276 static void set_has_type(HasBits* has_bits) {
277 (*has_bits)[0] |= 2u;
278 }
279 };
280
FtraceConfig_KprobeEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)281 FtraceConfig_KprobeEvent::FtraceConfig_KprobeEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
282 bool is_message_owned)
283 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
284 SharedCtor(arena, is_message_owned);
285 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceConfig.KprobeEvent)
286 }
FtraceConfig_KprobeEvent(const FtraceConfig_KprobeEvent & from)287 FtraceConfig_KprobeEvent::FtraceConfig_KprobeEvent(const FtraceConfig_KprobeEvent& from)
288 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
289 FtraceConfig_KprobeEvent* const _this = this; (void)_this;
290 new (&_impl_) Impl_{
291 decltype(_impl_._has_bits_){from._impl_._has_bits_}
292 , /*decltype(_impl_._cached_size_)*/{}
293 , decltype(_impl_.probe_){}
294 , decltype(_impl_.type_){}};
295
296 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
297 _impl_.probe_.InitDefault();
298 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
299 _impl_.probe_.Set("", GetArenaForAllocation());
300 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
301 if (from._internal_has_probe()) {
302 _this->_impl_.probe_.Set(from._internal_probe(),
303 _this->GetArenaForAllocation());
304 }
305 _this->_impl_.type_ = from._impl_.type_;
306 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceConfig.KprobeEvent)
307 }
308
SharedCtor(::_pb::Arena * arena,bool is_message_owned)309 inline void FtraceConfig_KprobeEvent::SharedCtor(
310 ::_pb::Arena* arena, bool is_message_owned) {
311 (void)arena;
312 (void)is_message_owned;
313 new (&_impl_) Impl_{
314 decltype(_impl_._has_bits_){}
315 , /*decltype(_impl_._cached_size_)*/{}
316 , decltype(_impl_.probe_){}
317 , decltype(_impl_.type_){0}
318 };
319 _impl_.probe_.InitDefault();
320 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
321 _impl_.probe_.Set("", GetArenaForAllocation());
322 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
323 }
324
~FtraceConfig_KprobeEvent()325 FtraceConfig_KprobeEvent::~FtraceConfig_KprobeEvent() {
326 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceConfig.KprobeEvent)
327 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
328 (void)arena;
329 return;
330 }
331 SharedDtor();
332 }
333
SharedDtor()334 inline void FtraceConfig_KprobeEvent::SharedDtor() {
335 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
336 _impl_.probe_.Destroy();
337 }
338
SetCachedSize(int size) const339 void FtraceConfig_KprobeEvent::SetCachedSize(int size) const {
340 _impl_._cached_size_.Set(size);
341 }
342
Clear()343 void FtraceConfig_KprobeEvent::Clear() {
344 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceConfig.KprobeEvent)
345 ::uint32_t cached_has_bits = 0;
346 // Prevent compiler warnings about cached_has_bits being unused
347 (void) cached_has_bits;
348
349 cached_has_bits = _impl_._has_bits_[0];
350 if (cached_has_bits & 0x00000001u) {
351 _impl_.probe_.ClearNonDefaultToEmpty();
352 }
353 _impl_.type_ = 0;
354 _impl_._has_bits_.Clear();
355 _internal_metadata_.Clear<std::string>();
356 }
357
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)358 const char* FtraceConfig_KprobeEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
359 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
360 _Internal::HasBits has_bits{};
361 while (!ctx->Done(&ptr)) {
362 ::uint32_t tag;
363 ptr = ::_pbi::ReadTag(ptr, &tag);
364 switch (tag >> 3) {
365 // optional string probe = 1;
366 case 1:
367 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
368 auto str = _internal_mutable_probe();
369 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
370 CHK_(ptr);
371 } else {
372 goto handle_unusual;
373 }
374 continue;
375 // optional .perfetto.protos.FtraceConfig.KprobeEvent.KprobeType type = 2;
376 case 2:
377 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
378 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
379 CHK_(ptr);
380 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FtraceConfig_KprobeEvent_KprobeType_IsValid(val))) {
381 _internal_set_type(static_cast<::perfetto::protos::FtraceConfig_KprobeEvent_KprobeType>(val));
382 } else {
383 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
384 }
385 } else {
386 goto handle_unusual;
387 }
388 continue;
389 default:
390 goto handle_unusual;
391 } // switch
392 handle_unusual:
393 if ((tag == 0) || ((tag & 7) == 4)) {
394 CHK_(ptr);
395 ctx->SetLastTag(tag);
396 goto message_done;
397 }
398 ptr = UnknownFieldParse(
399 tag,
400 _internal_metadata_.mutable_unknown_fields<std::string>(),
401 ptr, ctx);
402 CHK_(ptr != nullptr);
403 } // while
404 message_done:
405 _impl_._has_bits_.Or(has_bits);
406 return ptr;
407 failure:
408 ptr = nullptr;
409 goto message_done;
410 #undef CHK_
411 }
412
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const413 ::uint8_t* FtraceConfig_KprobeEvent::_InternalSerialize(
414 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
415 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceConfig.KprobeEvent)
416 ::uint32_t cached_has_bits = 0;
417 (void) cached_has_bits;
418
419 cached_has_bits = _impl_._has_bits_[0];
420 // optional string probe = 1;
421 if (cached_has_bits & 0x00000001u) {
422 target = stream->WriteStringMaybeAliased(
423 1, this->_internal_probe(), target);
424 }
425
426 // optional .perfetto.protos.FtraceConfig.KprobeEvent.KprobeType type = 2;
427 if (cached_has_bits & 0x00000002u) {
428 target = stream->EnsureSpace(target);
429 target = ::_pbi::WireFormatLite::WriteEnumToArray(
430 2, this->_internal_type(), target);
431 }
432
433 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
434 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
435 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
436 }
437 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceConfig.KprobeEvent)
438 return target;
439 }
440
ByteSizeLong() const441 size_t FtraceConfig_KprobeEvent::ByteSizeLong() const {
442 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceConfig.KprobeEvent)
443 size_t total_size = 0;
444
445 ::uint32_t cached_has_bits = 0;
446 // Prevent compiler warnings about cached_has_bits being unused
447 (void) cached_has_bits;
448
449 cached_has_bits = _impl_._has_bits_[0];
450 if (cached_has_bits & 0x00000003u) {
451 // optional string probe = 1;
452 if (cached_has_bits & 0x00000001u) {
453 total_size += 1 +
454 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
455 this->_internal_probe());
456 }
457
458 // optional .perfetto.protos.FtraceConfig.KprobeEvent.KprobeType type = 2;
459 if (cached_has_bits & 0x00000002u) {
460 total_size += 1 +
461 ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
462 }
463
464 }
465 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
466 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
467 }
468 int cached_size = ::_pbi::ToCachedSize(total_size);
469 SetCachedSize(cached_size);
470 return total_size;
471 }
472
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)473 void FtraceConfig_KprobeEvent::CheckTypeAndMergeFrom(
474 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
475 MergeFrom(*::_pbi::DownCast<const FtraceConfig_KprobeEvent*>(
476 &from));
477 }
478
MergeFrom(const FtraceConfig_KprobeEvent & from)479 void FtraceConfig_KprobeEvent::MergeFrom(const FtraceConfig_KprobeEvent& from) {
480 FtraceConfig_KprobeEvent* const _this = this;
481 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceConfig.KprobeEvent)
482 GOOGLE_DCHECK_NE(&from, _this);
483 ::uint32_t cached_has_bits = 0;
484 (void) cached_has_bits;
485
486 cached_has_bits = from._impl_._has_bits_[0];
487 if (cached_has_bits & 0x00000003u) {
488 if (cached_has_bits & 0x00000001u) {
489 _this->_internal_set_probe(from._internal_probe());
490 }
491 if (cached_has_bits & 0x00000002u) {
492 _this->_impl_.type_ = from._impl_.type_;
493 }
494 _this->_impl_._has_bits_[0] |= cached_has_bits;
495 }
496 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
497 }
498
CopyFrom(const FtraceConfig_KprobeEvent & from)499 void FtraceConfig_KprobeEvent::CopyFrom(const FtraceConfig_KprobeEvent& from) {
500 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceConfig.KprobeEvent)
501 if (&from == this) return;
502 Clear();
503 MergeFrom(from);
504 }
505
IsInitialized() const506 bool FtraceConfig_KprobeEvent::IsInitialized() const {
507 return true;
508 }
509
InternalSwap(FtraceConfig_KprobeEvent * other)510 void FtraceConfig_KprobeEvent::InternalSwap(FtraceConfig_KprobeEvent* other) {
511 using std::swap;
512 auto* lhs_arena = GetArenaForAllocation();
513 auto* rhs_arena = other->GetArenaForAllocation();
514 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
515 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
516 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
517 &_impl_.probe_, lhs_arena,
518 &other->_impl_.probe_, rhs_arena
519 );
520 swap(_impl_.type_, other->_impl_.type_);
521 }
522
GetTypeName() const523 std::string FtraceConfig_KprobeEvent::GetTypeName() const {
524 return "perfetto.protos.FtraceConfig.KprobeEvent";
525 }
526
527
528 // ===================================================================
529
530 class FtraceConfig_CompactSchedConfig::_Internal {
531 public:
532 using HasBits = decltype(std::declval<FtraceConfig_CompactSchedConfig>()._impl_._has_bits_);
set_has_enabled(HasBits * has_bits)533 static void set_has_enabled(HasBits* has_bits) {
534 (*has_bits)[0] |= 1u;
535 }
536 };
537
FtraceConfig_CompactSchedConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)538 FtraceConfig_CompactSchedConfig::FtraceConfig_CompactSchedConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
539 bool is_message_owned)
540 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
541 SharedCtor(arena, is_message_owned);
542 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceConfig.CompactSchedConfig)
543 }
FtraceConfig_CompactSchedConfig(const FtraceConfig_CompactSchedConfig & from)544 FtraceConfig_CompactSchedConfig::FtraceConfig_CompactSchedConfig(const FtraceConfig_CompactSchedConfig& from)
545 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
546 FtraceConfig_CompactSchedConfig* const _this = this; (void)_this;
547 new (&_impl_) Impl_{
548 decltype(_impl_._has_bits_){from._impl_._has_bits_}
549 , /*decltype(_impl_._cached_size_)*/{}
550 , decltype(_impl_.enabled_){}};
551
552 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
553 _this->_impl_.enabled_ = from._impl_.enabled_;
554 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceConfig.CompactSchedConfig)
555 }
556
SharedCtor(::_pb::Arena * arena,bool is_message_owned)557 inline void FtraceConfig_CompactSchedConfig::SharedCtor(
558 ::_pb::Arena* arena, bool is_message_owned) {
559 (void)arena;
560 (void)is_message_owned;
561 new (&_impl_) Impl_{
562 decltype(_impl_._has_bits_){}
563 , /*decltype(_impl_._cached_size_)*/{}
564 , decltype(_impl_.enabled_){false}
565 };
566 }
567
~FtraceConfig_CompactSchedConfig()568 FtraceConfig_CompactSchedConfig::~FtraceConfig_CompactSchedConfig() {
569 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceConfig.CompactSchedConfig)
570 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
571 (void)arena;
572 return;
573 }
574 SharedDtor();
575 }
576
SharedDtor()577 inline void FtraceConfig_CompactSchedConfig::SharedDtor() {
578 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
579 }
580
SetCachedSize(int size) const581 void FtraceConfig_CompactSchedConfig::SetCachedSize(int size) const {
582 _impl_._cached_size_.Set(size);
583 }
584
Clear()585 void FtraceConfig_CompactSchedConfig::Clear() {
586 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceConfig.CompactSchedConfig)
587 ::uint32_t cached_has_bits = 0;
588 // Prevent compiler warnings about cached_has_bits being unused
589 (void) cached_has_bits;
590
591 _impl_.enabled_ = false;
592 _impl_._has_bits_.Clear();
593 _internal_metadata_.Clear<std::string>();
594 }
595
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)596 const char* FtraceConfig_CompactSchedConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
597 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
598 _Internal::HasBits has_bits{};
599 while (!ctx->Done(&ptr)) {
600 ::uint32_t tag;
601 ptr = ::_pbi::ReadTag(ptr, &tag);
602 switch (tag >> 3) {
603 // optional bool enabled = 1;
604 case 1:
605 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
606 _Internal::set_has_enabled(&has_bits);
607 _impl_.enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
608 CHK_(ptr);
609 } else {
610 goto handle_unusual;
611 }
612 continue;
613 default:
614 goto handle_unusual;
615 } // switch
616 handle_unusual:
617 if ((tag == 0) || ((tag & 7) == 4)) {
618 CHK_(ptr);
619 ctx->SetLastTag(tag);
620 goto message_done;
621 }
622 ptr = UnknownFieldParse(
623 tag,
624 _internal_metadata_.mutable_unknown_fields<std::string>(),
625 ptr, ctx);
626 CHK_(ptr != nullptr);
627 } // while
628 message_done:
629 _impl_._has_bits_.Or(has_bits);
630 return ptr;
631 failure:
632 ptr = nullptr;
633 goto message_done;
634 #undef CHK_
635 }
636
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const637 ::uint8_t* FtraceConfig_CompactSchedConfig::_InternalSerialize(
638 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
639 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceConfig.CompactSchedConfig)
640 ::uint32_t cached_has_bits = 0;
641 (void) cached_has_bits;
642
643 cached_has_bits = _impl_._has_bits_[0];
644 // optional bool enabled = 1;
645 if (cached_has_bits & 0x00000001u) {
646 target = stream->EnsureSpace(target);
647 target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_enabled(), target);
648 }
649
650 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
651 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
652 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
653 }
654 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceConfig.CompactSchedConfig)
655 return target;
656 }
657
ByteSizeLong() const658 size_t FtraceConfig_CompactSchedConfig::ByteSizeLong() const {
659 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceConfig.CompactSchedConfig)
660 size_t total_size = 0;
661
662 ::uint32_t cached_has_bits = 0;
663 // Prevent compiler warnings about cached_has_bits being unused
664 (void) cached_has_bits;
665
666 // optional bool enabled = 1;
667 cached_has_bits = _impl_._has_bits_[0];
668 if (cached_has_bits & 0x00000001u) {
669 total_size += 1 + 1;
670 }
671
672 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
673 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
674 }
675 int cached_size = ::_pbi::ToCachedSize(total_size);
676 SetCachedSize(cached_size);
677 return total_size;
678 }
679
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)680 void FtraceConfig_CompactSchedConfig::CheckTypeAndMergeFrom(
681 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
682 MergeFrom(*::_pbi::DownCast<const FtraceConfig_CompactSchedConfig*>(
683 &from));
684 }
685
MergeFrom(const FtraceConfig_CompactSchedConfig & from)686 void FtraceConfig_CompactSchedConfig::MergeFrom(const FtraceConfig_CompactSchedConfig& from) {
687 FtraceConfig_CompactSchedConfig* const _this = this;
688 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceConfig.CompactSchedConfig)
689 GOOGLE_DCHECK_NE(&from, _this);
690 ::uint32_t cached_has_bits = 0;
691 (void) cached_has_bits;
692
693 if (from._internal_has_enabled()) {
694 _this->_internal_set_enabled(from._internal_enabled());
695 }
696 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
697 }
698
CopyFrom(const FtraceConfig_CompactSchedConfig & from)699 void FtraceConfig_CompactSchedConfig::CopyFrom(const FtraceConfig_CompactSchedConfig& from) {
700 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceConfig.CompactSchedConfig)
701 if (&from == this) return;
702 Clear();
703 MergeFrom(from);
704 }
705
IsInitialized() const706 bool FtraceConfig_CompactSchedConfig::IsInitialized() const {
707 return true;
708 }
709
InternalSwap(FtraceConfig_CompactSchedConfig * other)710 void FtraceConfig_CompactSchedConfig::InternalSwap(FtraceConfig_CompactSchedConfig* other) {
711 using std::swap;
712 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
713 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
714 swap(_impl_.enabled_, other->_impl_.enabled_);
715 }
716
GetTypeName() const717 std::string FtraceConfig_CompactSchedConfig::GetTypeName() const {
718 return "perfetto.protos.FtraceConfig.CompactSchedConfig";
719 }
720
721
722 // ===================================================================
723
724 class FtraceConfig_PrintFilter_Rule_AtraceMessage::_Internal {
725 public:
726 using HasBits = decltype(std::declval<FtraceConfig_PrintFilter_Rule_AtraceMessage>()._impl_._has_bits_);
set_has_type(HasBits * has_bits)727 static void set_has_type(HasBits* has_bits) {
728 (*has_bits)[0] |= 1u;
729 }
set_has_prefix(HasBits * has_bits)730 static void set_has_prefix(HasBits* has_bits) {
731 (*has_bits)[0] |= 2u;
732 }
733 };
734
FtraceConfig_PrintFilter_Rule_AtraceMessage(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)735 FtraceConfig_PrintFilter_Rule_AtraceMessage::FtraceConfig_PrintFilter_Rule_AtraceMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena,
736 bool is_message_owned)
737 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
738 SharedCtor(arena, is_message_owned);
739 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
740 }
FtraceConfig_PrintFilter_Rule_AtraceMessage(const FtraceConfig_PrintFilter_Rule_AtraceMessage & from)741 FtraceConfig_PrintFilter_Rule_AtraceMessage::FtraceConfig_PrintFilter_Rule_AtraceMessage(const FtraceConfig_PrintFilter_Rule_AtraceMessage& from)
742 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
743 FtraceConfig_PrintFilter_Rule_AtraceMessage* const _this = this; (void)_this;
744 new (&_impl_) Impl_{
745 decltype(_impl_._has_bits_){from._impl_._has_bits_}
746 , /*decltype(_impl_._cached_size_)*/{}
747 , decltype(_impl_.type_){}
748 , decltype(_impl_.prefix_){}};
749
750 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
751 _impl_.type_.InitDefault();
752 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
753 _impl_.type_.Set("", GetArenaForAllocation());
754 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
755 if (from._internal_has_type()) {
756 _this->_impl_.type_.Set(from._internal_type(),
757 _this->GetArenaForAllocation());
758 }
759 _impl_.prefix_.InitDefault();
760 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
761 _impl_.prefix_.Set("", GetArenaForAllocation());
762 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
763 if (from._internal_has_prefix()) {
764 _this->_impl_.prefix_.Set(from._internal_prefix(),
765 _this->GetArenaForAllocation());
766 }
767 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
768 }
769
SharedCtor(::_pb::Arena * arena,bool is_message_owned)770 inline void FtraceConfig_PrintFilter_Rule_AtraceMessage::SharedCtor(
771 ::_pb::Arena* arena, bool is_message_owned) {
772 (void)arena;
773 (void)is_message_owned;
774 new (&_impl_) Impl_{
775 decltype(_impl_._has_bits_){}
776 , /*decltype(_impl_._cached_size_)*/{}
777 , decltype(_impl_.type_){}
778 , decltype(_impl_.prefix_){}
779 };
780 _impl_.type_.InitDefault();
781 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
782 _impl_.type_.Set("", GetArenaForAllocation());
783 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
784 _impl_.prefix_.InitDefault();
785 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
786 _impl_.prefix_.Set("", GetArenaForAllocation());
787 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
788 }
789
~FtraceConfig_PrintFilter_Rule_AtraceMessage()790 FtraceConfig_PrintFilter_Rule_AtraceMessage::~FtraceConfig_PrintFilter_Rule_AtraceMessage() {
791 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
792 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
793 (void)arena;
794 return;
795 }
796 SharedDtor();
797 }
798
SharedDtor()799 inline void FtraceConfig_PrintFilter_Rule_AtraceMessage::SharedDtor() {
800 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
801 _impl_.type_.Destroy();
802 _impl_.prefix_.Destroy();
803 }
804
SetCachedSize(int size) const805 void FtraceConfig_PrintFilter_Rule_AtraceMessage::SetCachedSize(int size) const {
806 _impl_._cached_size_.Set(size);
807 }
808
Clear()809 void FtraceConfig_PrintFilter_Rule_AtraceMessage::Clear() {
810 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
811 ::uint32_t cached_has_bits = 0;
812 // Prevent compiler warnings about cached_has_bits being unused
813 (void) cached_has_bits;
814
815 cached_has_bits = _impl_._has_bits_[0];
816 if (cached_has_bits & 0x00000003u) {
817 if (cached_has_bits & 0x00000001u) {
818 _impl_.type_.ClearNonDefaultToEmpty();
819 }
820 if (cached_has_bits & 0x00000002u) {
821 _impl_.prefix_.ClearNonDefaultToEmpty();
822 }
823 }
824 _impl_._has_bits_.Clear();
825 _internal_metadata_.Clear<std::string>();
826 }
827
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)828 const char* FtraceConfig_PrintFilter_Rule_AtraceMessage::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
829 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
830 _Internal::HasBits has_bits{};
831 while (!ctx->Done(&ptr)) {
832 ::uint32_t tag;
833 ptr = ::_pbi::ReadTag(ptr, &tag);
834 switch (tag >> 3) {
835 // optional string type = 1;
836 case 1:
837 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
838 auto str = _internal_mutable_type();
839 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
840 CHK_(ptr);
841 } else {
842 goto handle_unusual;
843 }
844 continue;
845 // optional string prefix = 2;
846 case 2:
847 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
848 auto str = _internal_mutable_prefix();
849 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
850 CHK_(ptr);
851 } else {
852 goto handle_unusual;
853 }
854 continue;
855 default:
856 goto handle_unusual;
857 } // switch
858 handle_unusual:
859 if ((tag == 0) || ((tag & 7) == 4)) {
860 CHK_(ptr);
861 ctx->SetLastTag(tag);
862 goto message_done;
863 }
864 ptr = UnknownFieldParse(
865 tag,
866 _internal_metadata_.mutable_unknown_fields<std::string>(),
867 ptr, ctx);
868 CHK_(ptr != nullptr);
869 } // while
870 message_done:
871 _impl_._has_bits_.Or(has_bits);
872 return ptr;
873 failure:
874 ptr = nullptr;
875 goto message_done;
876 #undef CHK_
877 }
878
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const879 ::uint8_t* FtraceConfig_PrintFilter_Rule_AtraceMessage::_InternalSerialize(
880 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
881 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
882 ::uint32_t cached_has_bits = 0;
883 (void) cached_has_bits;
884
885 cached_has_bits = _impl_._has_bits_[0];
886 // optional string type = 1;
887 if (cached_has_bits & 0x00000001u) {
888 target = stream->WriteStringMaybeAliased(
889 1, this->_internal_type(), target);
890 }
891
892 // optional string prefix = 2;
893 if (cached_has_bits & 0x00000002u) {
894 target = stream->WriteStringMaybeAliased(
895 2, this->_internal_prefix(), target);
896 }
897
898 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
899 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
900 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
901 }
902 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
903 return target;
904 }
905
ByteSizeLong() const906 size_t FtraceConfig_PrintFilter_Rule_AtraceMessage::ByteSizeLong() const {
907 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
908 size_t total_size = 0;
909
910 ::uint32_t cached_has_bits = 0;
911 // Prevent compiler warnings about cached_has_bits being unused
912 (void) cached_has_bits;
913
914 cached_has_bits = _impl_._has_bits_[0];
915 if (cached_has_bits & 0x00000003u) {
916 // optional string type = 1;
917 if (cached_has_bits & 0x00000001u) {
918 total_size += 1 +
919 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
920 this->_internal_type());
921 }
922
923 // optional string prefix = 2;
924 if (cached_has_bits & 0x00000002u) {
925 total_size += 1 +
926 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
927 this->_internal_prefix());
928 }
929
930 }
931 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
932 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
933 }
934 int cached_size = ::_pbi::ToCachedSize(total_size);
935 SetCachedSize(cached_size);
936 return total_size;
937 }
938
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)939 void FtraceConfig_PrintFilter_Rule_AtraceMessage::CheckTypeAndMergeFrom(
940 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
941 MergeFrom(*::_pbi::DownCast<const FtraceConfig_PrintFilter_Rule_AtraceMessage*>(
942 &from));
943 }
944
MergeFrom(const FtraceConfig_PrintFilter_Rule_AtraceMessage & from)945 void FtraceConfig_PrintFilter_Rule_AtraceMessage::MergeFrom(const FtraceConfig_PrintFilter_Rule_AtraceMessage& from) {
946 FtraceConfig_PrintFilter_Rule_AtraceMessage* const _this = this;
947 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
948 GOOGLE_DCHECK_NE(&from, _this);
949 ::uint32_t cached_has_bits = 0;
950 (void) cached_has_bits;
951
952 cached_has_bits = from._impl_._has_bits_[0];
953 if (cached_has_bits & 0x00000003u) {
954 if (cached_has_bits & 0x00000001u) {
955 _this->_internal_set_type(from._internal_type());
956 }
957 if (cached_has_bits & 0x00000002u) {
958 _this->_internal_set_prefix(from._internal_prefix());
959 }
960 }
961 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
962 }
963
CopyFrom(const FtraceConfig_PrintFilter_Rule_AtraceMessage & from)964 void FtraceConfig_PrintFilter_Rule_AtraceMessage::CopyFrom(const FtraceConfig_PrintFilter_Rule_AtraceMessage& from) {
965 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage)
966 if (&from == this) return;
967 Clear();
968 MergeFrom(from);
969 }
970
IsInitialized() const971 bool FtraceConfig_PrintFilter_Rule_AtraceMessage::IsInitialized() const {
972 return true;
973 }
974
InternalSwap(FtraceConfig_PrintFilter_Rule_AtraceMessage * other)975 void FtraceConfig_PrintFilter_Rule_AtraceMessage::InternalSwap(FtraceConfig_PrintFilter_Rule_AtraceMessage* other) {
976 using std::swap;
977 auto* lhs_arena = GetArenaForAllocation();
978 auto* rhs_arena = other->GetArenaForAllocation();
979 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
980 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
981 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
982 &_impl_.type_, lhs_arena,
983 &other->_impl_.type_, rhs_arena
984 );
985 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
986 &_impl_.prefix_, lhs_arena,
987 &other->_impl_.prefix_, rhs_arena
988 );
989 }
990
GetTypeName() const991 std::string FtraceConfig_PrintFilter_Rule_AtraceMessage::GetTypeName() const {
992 return "perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage";
993 }
994
995
996 // ===================================================================
997
998 class FtraceConfig_PrintFilter_Rule::_Internal {
999 public:
1000 using HasBits = decltype(std::declval<FtraceConfig_PrintFilter_Rule>()._impl_._has_bits_);
1001 static const ::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage& atrace_msg(const FtraceConfig_PrintFilter_Rule* msg);
set_has_allow(HasBits * has_bits)1002 static void set_has_allow(HasBits* has_bits) {
1003 (*has_bits)[0] |= 1u;
1004 }
1005 };
1006
1007 const ::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage&
atrace_msg(const FtraceConfig_PrintFilter_Rule * msg)1008 FtraceConfig_PrintFilter_Rule::_Internal::atrace_msg(const FtraceConfig_PrintFilter_Rule* msg) {
1009 return *msg->_impl_.match_.atrace_msg_;
1010 }
set_allocated_atrace_msg(::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage * atrace_msg)1011 void FtraceConfig_PrintFilter_Rule::set_allocated_atrace_msg(::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage* atrace_msg) {
1012 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
1013 clear_match();
1014 if (atrace_msg) {
1015 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
1016 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(atrace_msg);
1017 if (message_arena != submessage_arena) {
1018 atrace_msg = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
1019 message_arena, atrace_msg, submessage_arena);
1020 }
1021 set_has_atrace_msg();
1022 _impl_.match_.atrace_msg_ = atrace_msg;
1023 }
1024 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.FtraceConfig.PrintFilter.Rule.atrace_msg)
1025 }
FtraceConfig_PrintFilter_Rule(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1026 FtraceConfig_PrintFilter_Rule::FtraceConfig_PrintFilter_Rule(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1027 bool is_message_owned)
1028 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1029 SharedCtor(arena, is_message_owned);
1030 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1031 }
FtraceConfig_PrintFilter_Rule(const FtraceConfig_PrintFilter_Rule & from)1032 FtraceConfig_PrintFilter_Rule::FtraceConfig_PrintFilter_Rule(const FtraceConfig_PrintFilter_Rule& from)
1033 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1034 FtraceConfig_PrintFilter_Rule* const _this = this; (void)_this;
1035 new (&_impl_) Impl_{
1036 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1037 , /*decltype(_impl_._cached_size_)*/{}
1038 , decltype(_impl_.allow_){}
1039 , decltype(_impl_.match_){}
1040 , /*decltype(_impl_._oneof_case_)*/{}};
1041
1042 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1043 _this->_impl_.allow_ = from._impl_.allow_;
1044 clear_has_match();
1045 switch (from.match_case()) {
1046 case kPrefix: {
1047 _this->_internal_set_prefix(from._internal_prefix());
1048 break;
1049 }
1050 case kAtraceMsg: {
1051 _this->_internal_mutable_atrace_msg()->::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage::MergeFrom(
1052 from._internal_atrace_msg());
1053 break;
1054 }
1055 case MATCH_NOT_SET: {
1056 break;
1057 }
1058 }
1059 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1060 }
1061
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1062 inline void FtraceConfig_PrintFilter_Rule::SharedCtor(
1063 ::_pb::Arena* arena, bool is_message_owned) {
1064 (void)arena;
1065 (void)is_message_owned;
1066 new (&_impl_) Impl_{
1067 decltype(_impl_._has_bits_){}
1068 , /*decltype(_impl_._cached_size_)*/{}
1069 , decltype(_impl_.allow_){false}
1070 , decltype(_impl_.match_){}
1071 , /*decltype(_impl_._oneof_case_)*/{}
1072 };
1073 clear_has_match();
1074 }
1075
~FtraceConfig_PrintFilter_Rule()1076 FtraceConfig_PrintFilter_Rule::~FtraceConfig_PrintFilter_Rule() {
1077 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1078 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1079 (void)arena;
1080 return;
1081 }
1082 SharedDtor();
1083 }
1084
SharedDtor()1085 inline void FtraceConfig_PrintFilter_Rule::SharedDtor() {
1086 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1087 if (has_match()) {
1088 clear_match();
1089 }
1090 }
1091
SetCachedSize(int size) const1092 void FtraceConfig_PrintFilter_Rule::SetCachedSize(int size) const {
1093 _impl_._cached_size_.Set(size);
1094 }
1095
clear_match()1096 void FtraceConfig_PrintFilter_Rule::clear_match() {
1097 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1098 switch (match_case()) {
1099 case kPrefix: {
1100 _impl_.match_.prefix_.Destroy();
1101 break;
1102 }
1103 case kAtraceMsg: {
1104 if (GetArenaForAllocation() == nullptr) {
1105 delete _impl_.match_.atrace_msg_;
1106 }
1107 break;
1108 }
1109 case MATCH_NOT_SET: {
1110 break;
1111 }
1112 }
1113 _impl_._oneof_case_[0] = MATCH_NOT_SET;
1114 }
1115
1116
Clear()1117 void FtraceConfig_PrintFilter_Rule::Clear() {
1118 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1119 ::uint32_t cached_has_bits = 0;
1120 // Prevent compiler warnings about cached_has_bits being unused
1121 (void) cached_has_bits;
1122
1123 _impl_.allow_ = false;
1124 clear_match();
1125 _impl_._has_bits_.Clear();
1126 _internal_metadata_.Clear<std::string>();
1127 }
1128
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1129 const char* FtraceConfig_PrintFilter_Rule::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1130 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1131 _Internal::HasBits has_bits{};
1132 while (!ctx->Done(&ptr)) {
1133 ::uint32_t tag;
1134 ptr = ::_pbi::ReadTag(ptr, &tag);
1135 switch (tag >> 3) {
1136 // string prefix = 1;
1137 case 1:
1138 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1139 auto str = _internal_mutable_prefix();
1140 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1141 CHK_(ptr);
1142 } else {
1143 goto handle_unusual;
1144 }
1145 continue;
1146 // optional bool allow = 2;
1147 case 2:
1148 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1149 _Internal::set_has_allow(&has_bits);
1150 _impl_.allow_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1151 CHK_(ptr);
1152 } else {
1153 goto handle_unusual;
1154 }
1155 continue;
1156 // .perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage atrace_msg = 3;
1157 case 3:
1158 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1159 ptr = ctx->ParseMessage(_internal_mutable_atrace_msg(), ptr);
1160 CHK_(ptr);
1161 } else {
1162 goto handle_unusual;
1163 }
1164 continue;
1165 default:
1166 goto handle_unusual;
1167 } // switch
1168 handle_unusual:
1169 if ((tag == 0) || ((tag & 7) == 4)) {
1170 CHK_(ptr);
1171 ctx->SetLastTag(tag);
1172 goto message_done;
1173 }
1174 ptr = UnknownFieldParse(
1175 tag,
1176 _internal_metadata_.mutable_unknown_fields<std::string>(),
1177 ptr, ctx);
1178 CHK_(ptr != nullptr);
1179 } // while
1180 message_done:
1181 _impl_._has_bits_.Or(has_bits);
1182 return ptr;
1183 failure:
1184 ptr = nullptr;
1185 goto message_done;
1186 #undef CHK_
1187 }
1188
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1189 ::uint8_t* FtraceConfig_PrintFilter_Rule::_InternalSerialize(
1190 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1191 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1192 ::uint32_t cached_has_bits = 0;
1193 (void) cached_has_bits;
1194
1195 // string prefix = 1;
1196 if (_internal_has_prefix()) {
1197 target = stream->WriteStringMaybeAliased(
1198 1, this->_internal_prefix(), target);
1199 }
1200
1201 cached_has_bits = _impl_._has_bits_[0];
1202 // optional bool allow = 2;
1203 if (cached_has_bits & 0x00000001u) {
1204 target = stream->EnsureSpace(target);
1205 target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_allow(), target);
1206 }
1207
1208 // .perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage atrace_msg = 3;
1209 if (_internal_has_atrace_msg()) {
1210 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1211 InternalWriteMessage(3, _Internal::atrace_msg(this),
1212 _Internal::atrace_msg(this).GetCachedSize(), target, stream);
1213 }
1214
1215 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1216 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1217 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1218 }
1219 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1220 return target;
1221 }
1222
ByteSizeLong() const1223 size_t FtraceConfig_PrintFilter_Rule::ByteSizeLong() const {
1224 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1225 size_t total_size = 0;
1226
1227 ::uint32_t cached_has_bits = 0;
1228 // Prevent compiler warnings about cached_has_bits being unused
1229 (void) cached_has_bits;
1230
1231 // optional bool allow = 2;
1232 cached_has_bits = _impl_._has_bits_[0];
1233 if (cached_has_bits & 0x00000001u) {
1234 total_size += 1 + 1;
1235 }
1236
1237 switch (match_case()) {
1238 // string prefix = 1;
1239 case kPrefix: {
1240 total_size += 1 +
1241 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1242 this->_internal_prefix());
1243 break;
1244 }
1245 // .perfetto.protos.FtraceConfig.PrintFilter.Rule.AtraceMessage atrace_msg = 3;
1246 case kAtraceMsg: {
1247 total_size += 1 +
1248 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1249 *_impl_.match_.atrace_msg_);
1250 break;
1251 }
1252 case MATCH_NOT_SET: {
1253 break;
1254 }
1255 }
1256 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1257 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1258 }
1259 int cached_size = ::_pbi::ToCachedSize(total_size);
1260 SetCachedSize(cached_size);
1261 return total_size;
1262 }
1263
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1264 void FtraceConfig_PrintFilter_Rule::CheckTypeAndMergeFrom(
1265 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1266 MergeFrom(*::_pbi::DownCast<const FtraceConfig_PrintFilter_Rule*>(
1267 &from));
1268 }
1269
MergeFrom(const FtraceConfig_PrintFilter_Rule & from)1270 void FtraceConfig_PrintFilter_Rule::MergeFrom(const FtraceConfig_PrintFilter_Rule& from) {
1271 FtraceConfig_PrintFilter_Rule* const _this = this;
1272 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1273 GOOGLE_DCHECK_NE(&from, _this);
1274 ::uint32_t cached_has_bits = 0;
1275 (void) cached_has_bits;
1276
1277 if (from._internal_has_allow()) {
1278 _this->_internal_set_allow(from._internal_allow());
1279 }
1280 switch (from.match_case()) {
1281 case kPrefix: {
1282 _this->_internal_set_prefix(from._internal_prefix());
1283 break;
1284 }
1285 case kAtraceMsg: {
1286 _this->_internal_mutable_atrace_msg()->::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage::MergeFrom(
1287 from._internal_atrace_msg());
1288 break;
1289 }
1290 case MATCH_NOT_SET: {
1291 break;
1292 }
1293 }
1294 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1295 }
1296
CopyFrom(const FtraceConfig_PrintFilter_Rule & from)1297 void FtraceConfig_PrintFilter_Rule::CopyFrom(const FtraceConfig_PrintFilter_Rule& from) {
1298 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceConfig.PrintFilter.Rule)
1299 if (&from == this) return;
1300 Clear();
1301 MergeFrom(from);
1302 }
1303
IsInitialized() const1304 bool FtraceConfig_PrintFilter_Rule::IsInitialized() const {
1305 return true;
1306 }
1307
InternalSwap(FtraceConfig_PrintFilter_Rule * other)1308 void FtraceConfig_PrintFilter_Rule::InternalSwap(FtraceConfig_PrintFilter_Rule* other) {
1309 using std::swap;
1310 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1311 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1312 swap(_impl_.allow_, other->_impl_.allow_);
1313 swap(_impl_.match_, other->_impl_.match_);
1314 swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
1315 }
1316
GetTypeName() const1317 std::string FtraceConfig_PrintFilter_Rule::GetTypeName() const {
1318 return "perfetto.protos.FtraceConfig.PrintFilter.Rule";
1319 }
1320
1321
1322 // ===================================================================
1323
1324 class FtraceConfig_PrintFilter::_Internal {
1325 public:
1326 };
1327
FtraceConfig_PrintFilter(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1328 FtraceConfig_PrintFilter::FtraceConfig_PrintFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1329 bool is_message_owned)
1330 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1331 SharedCtor(arena, is_message_owned);
1332 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceConfig.PrintFilter)
1333 }
FtraceConfig_PrintFilter(const FtraceConfig_PrintFilter & from)1334 FtraceConfig_PrintFilter::FtraceConfig_PrintFilter(const FtraceConfig_PrintFilter& from)
1335 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1336 FtraceConfig_PrintFilter* const _this = this; (void)_this;
1337 new (&_impl_) Impl_{
1338 decltype(_impl_.rules_){from._impl_.rules_}
1339 , /*decltype(_impl_._cached_size_)*/{}};
1340
1341 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1342 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceConfig.PrintFilter)
1343 }
1344
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1345 inline void FtraceConfig_PrintFilter::SharedCtor(
1346 ::_pb::Arena* arena, bool is_message_owned) {
1347 (void)arena;
1348 (void)is_message_owned;
1349 new (&_impl_) Impl_{
1350 decltype(_impl_.rules_){arena}
1351 , /*decltype(_impl_._cached_size_)*/{}
1352 };
1353 }
1354
~FtraceConfig_PrintFilter()1355 FtraceConfig_PrintFilter::~FtraceConfig_PrintFilter() {
1356 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceConfig.PrintFilter)
1357 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1358 (void)arena;
1359 return;
1360 }
1361 SharedDtor();
1362 }
1363
SharedDtor()1364 inline void FtraceConfig_PrintFilter::SharedDtor() {
1365 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1366 _impl_.rules_.~RepeatedPtrField();
1367 }
1368
SetCachedSize(int size) const1369 void FtraceConfig_PrintFilter::SetCachedSize(int size) const {
1370 _impl_._cached_size_.Set(size);
1371 }
1372
Clear()1373 void FtraceConfig_PrintFilter::Clear() {
1374 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceConfig.PrintFilter)
1375 ::uint32_t cached_has_bits = 0;
1376 // Prevent compiler warnings about cached_has_bits being unused
1377 (void) cached_has_bits;
1378
1379 _impl_.rules_.Clear();
1380 _internal_metadata_.Clear<std::string>();
1381 }
1382
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1383 const char* FtraceConfig_PrintFilter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1384 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1385 while (!ctx->Done(&ptr)) {
1386 ::uint32_t tag;
1387 ptr = ::_pbi::ReadTag(ptr, &tag);
1388 switch (tag >> 3) {
1389 // repeated .perfetto.protos.FtraceConfig.PrintFilter.Rule rules = 1;
1390 case 1:
1391 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1392 ptr -= 1;
1393 do {
1394 ptr += 1;
1395 ptr = ctx->ParseMessage(_internal_add_rules(), ptr);
1396 CHK_(ptr);
1397 if (!ctx->DataAvailable(ptr)) break;
1398 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1399 } else {
1400 goto handle_unusual;
1401 }
1402 continue;
1403 default:
1404 goto handle_unusual;
1405 } // switch
1406 handle_unusual:
1407 if ((tag == 0) || ((tag & 7) == 4)) {
1408 CHK_(ptr);
1409 ctx->SetLastTag(tag);
1410 goto message_done;
1411 }
1412 ptr = UnknownFieldParse(
1413 tag,
1414 _internal_metadata_.mutable_unknown_fields<std::string>(),
1415 ptr, ctx);
1416 CHK_(ptr != nullptr);
1417 } // while
1418 message_done:
1419 return ptr;
1420 failure:
1421 ptr = nullptr;
1422 goto message_done;
1423 #undef CHK_
1424 }
1425
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1426 ::uint8_t* FtraceConfig_PrintFilter::_InternalSerialize(
1427 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1428 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceConfig.PrintFilter)
1429 ::uint32_t cached_has_bits = 0;
1430 (void) cached_has_bits;
1431
1432 // repeated .perfetto.protos.FtraceConfig.PrintFilter.Rule rules = 1;
1433 for (unsigned i = 0,
1434 n = static_cast<unsigned>(this->_internal_rules_size()); i < n; i++) {
1435 const auto& repfield = this->_internal_rules(i);
1436 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1437 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
1438 }
1439
1440 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1441 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1442 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1443 }
1444 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceConfig.PrintFilter)
1445 return target;
1446 }
1447
ByteSizeLong() const1448 size_t FtraceConfig_PrintFilter::ByteSizeLong() const {
1449 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceConfig.PrintFilter)
1450 size_t total_size = 0;
1451
1452 ::uint32_t cached_has_bits = 0;
1453 // Prevent compiler warnings about cached_has_bits being unused
1454 (void) cached_has_bits;
1455
1456 // repeated .perfetto.protos.FtraceConfig.PrintFilter.Rule rules = 1;
1457 total_size += 1UL * this->_internal_rules_size();
1458 for (const auto& msg : this->_impl_.rules_) {
1459 total_size +=
1460 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1461 }
1462
1463 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1464 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1465 }
1466 int cached_size = ::_pbi::ToCachedSize(total_size);
1467 SetCachedSize(cached_size);
1468 return total_size;
1469 }
1470
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1471 void FtraceConfig_PrintFilter::CheckTypeAndMergeFrom(
1472 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1473 MergeFrom(*::_pbi::DownCast<const FtraceConfig_PrintFilter*>(
1474 &from));
1475 }
1476
MergeFrom(const FtraceConfig_PrintFilter & from)1477 void FtraceConfig_PrintFilter::MergeFrom(const FtraceConfig_PrintFilter& from) {
1478 FtraceConfig_PrintFilter* const _this = this;
1479 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceConfig.PrintFilter)
1480 GOOGLE_DCHECK_NE(&from, _this);
1481 ::uint32_t cached_has_bits = 0;
1482 (void) cached_has_bits;
1483
1484 _this->_impl_.rules_.MergeFrom(from._impl_.rules_);
1485 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1486 }
1487
CopyFrom(const FtraceConfig_PrintFilter & from)1488 void FtraceConfig_PrintFilter::CopyFrom(const FtraceConfig_PrintFilter& from) {
1489 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceConfig.PrintFilter)
1490 if (&from == this) return;
1491 Clear();
1492 MergeFrom(from);
1493 }
1494
IsInitialized() const1495 bool FtraceConfig_PrintFilter::IsInitialized() const {
1496 return true;
1497 }
1498
InternalSwap(FtraceConfig_PrintFilter * other)1499 void FtraceConfig_PrintFilter::InternalSwap(FtraceConfig_PrintFilter* other) {
1500 using std::swap;
1501 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1502 _impl_.rules_.InternalSwap(&other->_impl_.rules_);
1503 }
1504
GetTypeName() const1505 std::string FtraceConfig_PrintFilter::GetTypeName() const {
1506 return "perfetto.protos.FtraceConfig.PrintFilter";
1507 }
1508
1509
1510 // ===================================================================
1511
1512 class FtraceConfig::_Internal {
1513 public:
1514 using HasBits = decltype(std::declval<FtraceConfig>()._impl_._has_bits_);
set_has_buffer_size_kb(HasBits * has_bits)1515 static void set_has_buffer_size_kb(HasBits* has_bits) {
1516 (*has_bits)[0] |= 8u;
1517 }
set_has_drain_period_ms(HasBits * has_bits)1518 static void set_has_drain_period_ms(HasBits* has_bits) {
1519 (*has_bits)[0] |= 16u;
1520 }
set_has_drain_buffer_percent(HasBits * has_bits)1521 static void set_has_drain_buffer_percent(HasBits* has_bits) {
1522 (*has_bits)[0] |= 16384u;
1523 }
1524 static const ::perfetto::protos::FtraceConfig_CompactSchedConfig& compact_sched(const FtraceConfig* msg);
set_has_compact_sched(HasBits * has_bits)1525 static void set_has_compact_sched(HasBits* has_bits) {
1526 (*has_bits)[0] |= 2u;
1527 }
1528 static const ::perfetto::protos::FtraceConfig_PrintFilter& print_filter(const FtraceConfig* msg);
set_has_print_filter(HasBits * has_bits)1529 static void set_has_print_filter(HasBits* has_bits) {
1530 (*has_bits)[0] |= 4u;
1531 }
set_has_symbolize_ksyms(HasBits * has_bits)1532 static void set_has_symbolize_ksyms(HasBits* has_bits) {
1533 (*has_bits)[0] |= 32u;
1534 }
set_has_ksyms_mem_policy(HasBits * has_bits)1535 static void set_has_ksyms_mem_policy(HasBits* has_bits) {
1536 (*has_bits)[0] |= 512u;
1537 }
set_has_initialize_ksyms_synchronously_for_testing(HasBits * has_bits)1538 static void set_has_initialize_ksyms_synchronously_for_testing(HasBits* has_bits) {
1539 (*has_bits)[0] |= 64u;
1540 }
set_has_throttle_rss_stat(HasBits * has_bits)1541 static void set_has_throttle_rss_stat(HasBits* has_bits) {
1542 (*has_bits)[0] |= 128u;
1543 }
set_has_disable_generic_events(HasBits * has_bits)1544 static void set_has_disable_generic_events(HasBits* has_bits) {
1545 (*has_bits)[0] |= 256u;
1546 }
set_has_enable_function_graph(HasBits * has_bits)1547 static void set_has_enable_function_graph(HasBits* has_bits) {
1548 (*has_bits)[0] |= 1024u;
1549 }
set_has_preserve_ftrace_buffer(HasBits * has_bits)1550 static void set_has_preserve_ftrace_buffer(HasBits* has_bits) {
1551 (*has_bits)[0] |= 2048u;
1552 }
set_has_use_monotonic_raw_clock(HasBits * has_bits)1553 static void set_has_use_monotonic_raw_clock(HasBits* has_bits) {
1554 (*has_bits)[0] |= 4096u;
1555 }
set_has_instance_name(HasBits * has_bits)1556 static void set_has_instance_name(HasBits* has_bits) {
1557 (*has_bits)[0] |= 1u;
1558 }
set_has_buffer_size_lower_bound(HasBits * has_bits)1559 static void set_has_buffer_size_lower_bound(HasBits* has_bits) {
1560 (*has_bits)[0] |= 8192u;
1561 }
1562 };
1563
1564 const ::perfetto::protos::FtraceConfig_CompactSchedConfig&
compact_sched(const FtraceConfig * msg)1565 FtraceConfig::_Internal::compact_sched(const FtraceConfig* msg) {
1566 return *msg->_impl_.compact_sched_;
1567 }
1568 const ::perfetto::protos::FtraceConfig_PrintFilter&
print_filter(const FtraceConfig * msg)1569 FtraceConfig::_Internal::print_filter(const FtraceConfig* msg) {
1570 return *msg->_impl_.print_filter_;
1571 }
FtraceConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1572 FtraceConfig::FtraceConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1573 bool is_message_owned)
1574 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1575 SharedCtor(arena, is_message_owned);
1576 // @@protoc_insertion_point(arena_constructor:perfetto.protos.FtraceConfig)
1577 }
FtraceConfig(const FtraceConfig & from)1578 FtraceConfig::FtraceConfig(const FtraceConfig& from)
1579 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1580 FtraceConfig* const _this = this; (void)_this;
1581 new (&_impl_) Impl_{
1582 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1583 , /*decltype(_impl_._cached_size_)*/{}
1584 , decltype(_impl_.ftrace_events_){from._impl_.ftrace_events_}
1585 , decltype(_impl_.atrace_categories_){from._impl_.atrace_categories_}
1586 , decltype(_impl_.atrace_apps_){from._impl_.atrace_apps_}
1587 , decltype(_impl_.syscall_events_){from._impl_.syscall_events_}
1588 , decltype(_impl_.function_filters_){from._impl_.function_filters_}
1589 , decltype(_impl_.function_graph_roots_){from._impl_.function_graph_roots_}
1590 , decltype(_impl_.atrace_categories_prefer_sdk_){from._impl_.atrace_categories_prefer_sdk_}
1591 , decltype(_impl_.kprobe_events_){from._impl_.kprobe_events_}
1592 , decltype(_impl_.instance_name_){}
1593 , decltype(_impl_.compact_sched_){nullptr}
1594 , decltype(_impl_.print_filter_){nullptr}
1595 , decltype(_impl_.buffer_size_kb_){}
1596 , decltype(_impl_.drain_period_ms_){}
1597 , decltype(_impl_.symbolize_ksyms_){}
1598 , decltype(_impl_.initialize_ksyms_synchronously_for_testing_){}
1599 , decltype(_impl_.throttle_rss_stat_){}
1600 , decltype(_impl_.disable_generic_events_){}
1601 , decltype(_impl_.ksyms_mem_policy_){}
1602 , decltype(_impl_.enable_function_graph_){}
1603 , decltype(_impl_.preserve_ftrace_buffer_){}
1604 , decltype(_impl_.use_monotonic_raw_clock_){}
1605 , decltype(_impl_.buffer_size_lower_bound_){}
1606 , decltype(_impl_.drain_buffer_percent_){}};
1607
1608 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1609 _impl_.instance_name_.InitDefault();
1610 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1611 _impl_.instance_name_.Set("", GetArenaForAllocation());
1612 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1613 if (from._internal_has_instance_name()) {
1614 _this->_impl_.instance_name_.Set(from._internal_instance_name(),
1615 _this->GetArenaForAllocation());
1616 }
1617 if (from._internal_has_compact_sched()) {
1618 _this->_impl_.compact_sched_ = new ::perfetto::protos::FtraceConfig_CompactSchedConfig(*from._impl_.compact_sched_);
1619 }
1620 if (from._internal_has_print_filter()) {
1621 _this->_impl_.print_filter_ = new ::perfetto::protos::FtraceConfig_PrintFilter(*from._impl_.print_filter_);
1622 }
1623 ::memcpy(&_impl_.buffer_size_kb_, &from._impl_.buffer_size_kb_,
1624 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.drain_buffer_percent_) -
1625 reinterpret_cast<char*>(&_impl_.buffer_size_kb_)) + sizeof(_impl_.drain_buffer_percent_));
1626 // @@protoc_insertion_point(copy_constructor:perfetto.protos.FtraceConfig)
1627 }
1628
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1629 inline void FtraceConfig::SharedCtor(
1630 ::_pb::Arena* arena, bool is_message_owned) {
1631 (void)arena;
1632 (void)is_message_owned;
1633 new (&_impl_) Impl_{
1634 decltype(_impl_._has_bits_){}
1635 , /*decltype(_impl_._cached_size_)*/{}
1636 , decltype(_impl_.ftrace_events_){arena}
1637 , decltype(_impl_.atrace_categories_){arena}
1638 , decltype(_impl_.atrace_apps_){arena}
1639 , decltype(_impl_.syscall_events_){arena}
1640 , decltype(_impl_.function_filters_){arena}
1641 , decltype(_impl_.function_graph_roots_){arena}
1642 , decltype(_impl_.atrace_categories_prefer_sdk_){arena}
1643 , decltype(_impl_.kprobe_events_){arena}
1644 , decltype(_impl_.instance_name_){}
1645 , decltype(_impl_.compact_sched_){nullptr}
1646 , decltype(_impl_.print_filter_){nullptr}
1647 , decltype(_impl_.buffer_size_kb_){0u}
1648 , decltype(_impl_.drain_period_ms_){0u}
1649 , decltype(_impl_.symbolize_ksyms_){false}
1650 , decltype(_impl_.initialize_ksyms_synchronously_for_testing_){false}
1651 , decltype(_impl_.throttle_rss_stat_){false}
1652 , decltype(_impl_.disable_generic_events_){false}
1653 , decltype(_impl_.ksyms_mem_policy_){0}
1654 , decltype(_impl_.enable_function_graph_){false}
1655 , decltype(_impl_.preserve_ftrace_buffer_){false}
1656 , decltype(_impl_.use_monotonic_raw_clock_){false}
1657 , decltype(_impl_.buffer_size_lower_bound_){false}
1658 , decltype(_impl_.drain_buffer_percent_){0u}
1659 };
1660 _impl_.instance_name_.InitDefault();
1661 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1662 _impl_.instance_name_.Set("", GetArenaForAllocation());
1663 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1664 }
1665
~FtraceConfig()1666 FtraceConfig::~FtraceConfig() {
1667 // @@protoc_insertion_point(destructor:perfetto.protos.FtraceConfig)
1668 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1669 (void)arena;
1670 return;
1671 }
1672 SharedDtor();
1673 }
1674
SharedDtor()1675 inline void FtraceConfig::SharedDtor() {
1676 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1677 _impl_.ftrace_events_.~RepeatedPtrField();
1678 _impl_.atrace_categories_.~RepeatedPtrField();
1679 _impl_.atrace_apps_.~RepeatedPtrField();
1680 _impl_.syscall_events_.~RepeatedPtrField();
1681 _impl_.function_filters_.~RepeatedPtrField();
1682 _impl_.function_graph_roots_.~RepeatedPtrField();
1683 _impl_.atrace_categories_prefer_sdk_.~RepeatedPtrField();
1684 _impl_.kprobe_events_.~RepeatedPtrField();
1685 _impl_.instance_name_.Destroy();
1686 if (this != internal_default_instance()) delete _impl_.compact_sched_;
1687 if (this != internal_default_instance()) delete _impl_.print_filter_;
1688 }
1689
SetCachedSize(int size) const1690 void FtraceConfig::SetCachedSize(int size) const {
1691 _impl_._cached_size_.Set(size);
1692 }
1693
Clear()1694 void FtraceConfig::Clear() {
1695 // @@protoc_insertion_point(message_clear_start:perfetto.protos.FtraceConfig)
1696 ::uint32_t cached_has_bits = 0;
1697 // Prevent compiler warnings about cached_has_bits being unused
1698 (void) cached_has_bits;
1699
1700 _impl_.ftrace_events_.Clear();
1701 _impl_.atrace_categories_.Clear();
1702 _impl_.atrace_apps_.Clear();
1703 _impl_.syscall_events_.Clear();
1704 _impl_.function_filters_.Clear();
1705 _impl_.function_graph_roots_.Clear();
1706 _impl_.atrace_categories_prefer_sdk_.Clear();
1707 _impl_.kprobe_events_.Clear();
1708 cached_has_bits = _impl_._has_bits_[0];
1709 if (cached_has_bits & 0x00000007u) {
1710 if (cached_has_bits & 0x00000001u) {
1711 _impl_.instance_name_.ClearNonDefaultToEmpty();
1712 }
1713 if (cached_has_bits & 0x00000002u) {
1714 GOOGLE_DCHECK(_impl_.compact_sched_ != nullptr);
1715 _impl_.compact_sched_->Clear();
1716 }
1717 if (cached_has_bits & 0x00000004u) {
1718 GOOGLE_DCHECK(_impl_.print_filter_ != nullptr);
1719 _impl_.print_filter_->Clear();
1720 }
1721 }
1722 if (cached_has_bits & 0x000000f8u) {
1723 ::memset(&_impl_.buffer_size_kb_, 0, static_cast<size_t>(
1724 reinterpret_cast<char*>(&_impl_.throttle_rss_stat_) -
1725 reinterpret_cast<char*>(&_impl_.buffer_size_kb_)) + sizeof(_impl_.throttle_rss_stat_));
1726 }
1727 if (cached_has_bits & 0x00007f00u) {
1728 ::memset(&_impl_.disable_generic_events_, 0, static_cast<size_t>(
1729 reinterpret_cast<char*>(&_impl_.drain_buffer_percent_) -
1730 reinterpret_cast<char*>(&_impl_.disable_generic_events_)) + sizeof(_impl_.drain_buffer_percent_));
1731 }
1732 _impl_._has_bits_.Clear();
1733 _internal_metadata_.Clear<std::string>();
1734 }
1735
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1736 const char* FtraceConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1737 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1738 _Internal::HasBits has_bits{};
1739 while (!ctx->Done(&ptr)) {
1740 ::uint32_t tag;
1741 ptr = ::_pbi::ReadTag(ptr, &tag);
1742 switch (tag >> 3) {
1743 // repeated string ftrace_events = 1;
1744 case 1:
1745 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1746 ptr -= 1;
1747 do {
1748 ptr += 1;
1749 auto str = _internal_add_ftrace_events();
1750 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1751 CHK_(ptr);
1752 if (!ctx->DataAvailable(ptr)) break;
1753 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1754 } else {
1755 goto handle_unusual;
1756 }
1757 continue;
1758 // repeated string atrace_categories = 2;
1759 case 2:
1760 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1761 ptr -= 1;
1762 do {
1763 ptr += 1;
1764 auto str = _internal_add_atrace_categories();
1765 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1766 CHK_(ptr);
1767 if (!ctx->DataAvailable(ptr)) break;
1768 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1769 } else {
1770 goto handle_unusual;
1771 }
1772 continue;
1773 // repeated string atrace_apps = 3;
1774 case 3:
1775 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1776 ptr -= 1;
1777 do {
1778 ptr += 1;
1779 auto str = _internal_add_atrace_apps();
1780 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1781 CHK_(ptr);
1782 if (!ctx->DataAvailable(ptr)) break;
1783 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1784 } else {
1785 goto handle_unusual;
1786 }
1787 continue;
1788 // optional uint32 buffer_size_kb = 10;
1789 case 10:
1790 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
1791 _Internal::set_has_buffer_size_kb(&has_bits);
1792 _impl_.buffer_size_kb_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1793 CHK_(ptr);
1794 } else {
1795 goto handle_unusual;
1796 }
1797 continue;
1798 // optional uint32 drain_period_ms = 11;
1799 case 11:
1800 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
1801 _Internal::set_has_drain_period_ms(&has_bits);
1802 _impl_.drain_period_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1803 CHK_(ptr);
1804 } else {
1805 goto handle_unusual;
1806 }
1807 continue;
1808 // optional .perfetto.protos.FtraceConfig.CompactSchedConfig compact_sched = 12;
1809 case 12:
1810 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
1811 ptr = ctx->ParseMessage(_internal_mutable_compact_sched(), ptr);
1812 CHK_(ptr);
1813 } else {
1814 goto handle_unusual;
1815 }
1816 continue;
1817 // optional bool symbolize_ksyms = 13;
1818 case 13:
1819 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
1820 _Internal::set_has_symbolize_ksyms(&has_bits);
1821 _impl_.symbolize_ksyms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1822 CHK_(ptr);
1823 } else {
1824 goto handle_unusual;
1825 }
1826 continue;
1827 // optional bool initialize_ksyms_synchronously_for_testing = 14 [deprecated = true];
1828 case 14:
1829 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
1830 _Internal::set_has_initialize_ksyms_synchronously_for_testing(&has_bits);
1831 _impl_.initialize_ksyms_synchronously_for_testing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1832 CHK_(ptr);
1833 } else {
1834 goto handle_unusual;
1835 }
1836 continue;
1837 // optional bool throttle_rss_stat = 15;
1838 case 15:
1839 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
1840 _Internal::set_has_throttle_rss_stat(&has_bits);
1841 _impl_.throttle_rss_stat_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1842 CHK_(ptr);
1843 } else {
1844 goto handle_unusual;
1845 }
1846 continue;
1847 // optional bool disable_generic_events = 16;
1848 case 16:
1849 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
1850 _Internal::set_has_disable_generic_events(&has_bits);
1851 _impl_.disable_generic_events_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1852 CHK_(ptr);
1853 } else {
1854 goto handle_unusual;
1855 }
1856 continue;
1857 // optional .perfetto.protos.FtraceConfig.KsymsMemPolicy ksyms_mem_policy = 17;
1858 case 17:
1859 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
1860 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1861 CHK_(ptr);
1862 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::FtraceConfig_KsymsMemPolicy_IsValid(val))) {
1863 _internal_set_ksyms_mem_policy(static_cast<::perfetto::protos::FtraceConfig_KsymsMemPolicy>(val));
1864 } else {
1865 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(17, val, mutable_unknown_fields());
1866 }
1867 } else {
1868 goto handle_unusual;
1869 }
1870 continue;
1871 // repeated string syscall_events = 18;
1872 case 18:
1873 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 146)) {
1874 ptr -= 2;
1875 do {
1876 ptr += 2;
1877 auto str = _internal_add_syscall_events();
1878 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1879 CHK_(ptr);
1880 if (!ctx->DataAvailable(ptr)) break;
1881 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<146>(ptr));
1882 } else {
1883 goto handle_unusual;
1884 }
1885 continue;
1886 // optional bool enable_function_graph = 19;
1887 case 19:
1888 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 152)) {
1889 _Internal::set_has_enable_function_graph(&has_bits);
1890 _impl_.enable_function_graph_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1891 CHK_(ptr);
1892 } else {
1893 goto handle_unusual;
1894 }
1895 continue;
1896 // repeated string function_filters = 20;
1897 case 20:
1898 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
1899 ptr -= 2;
1900 do {
1901 ptr += 2;
1902 auto str = _internal_add_function_filters();
1903 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1904 CHK_(ptr);
1905 if (!ctx->DataAvailable(ptr)) break;
1906 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<162>(ptr));
1907 } else {
1908 goto handle_unusual;
1909 }
1910 continue;
1911 // repeated string function_graph_roots = 21;
1912 case 21:
1913 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 170)) {
1914 ptr -= 2;
1915 do {
1916 ptr += 2;
1917 auto str = _internal_add_function_graph_roots();
1918 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1919 CHK_(ptr);
1920 if (!ctx->DataAvailable(ptr)) break;
1921 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<170>(ptr));
1922 } else {
1923 goto handle_unusual;
1924 }
1925 continue;
1926 // optional .perfetto.protos.FtraceConfig.PrintFilter print_filter = 22;
1927 case 22:
1928 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 178)) {
1929 ptr = ctx->ParseMessage(_internal_mutable_print_filter(), ptr);
1930 CHK_(ptr);
1931 } else {
1932 goto handle_unusual;
1933 }
1934 continue;
1935 // optional bool preserve_ftrace_buffer = 23;
1936 case 23:
1937 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 184)) {
1938 _Internal::set_has_preserve_ftrace_buffer(&has_bits);
1939 _impl_.preserve_ftrace_buffer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1940 CHK_(ptr);
1941 } else {
1942 goto handle_unusual;
1943 }
1944 continue;
1945 // optional bool use_monotonic_raw_clock = 24;
1946 case 24:
1947 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 192)) {
1948 _Internal::set_has_use_monotonic_raw_clock(&has_bits);
1949 _impl_.use_monotonic_raw_clock_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1950 CHK_(ptr);
1951 } else {
1952 goto handle_unusual;
1953 }
1954 continue;
1955 // optional string instance_name = 25;
1956 case 25:
1957 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 202)) {
1958 auto str = _internal_mutable_instance_name();
1959 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1960 CHK_(ptr);
1961 } else {
1962 goto handle_unusual;
1963 }
1964 continue;
1965 // optional bool buffer_size_lower_bound = 27;
1966 case 27:
1967 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 216)) {
1968 _Internal::set_has_buffer_size_lower_bound(&has_bits);
1969 _impl_.buffer_size_lower_bound_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1970 CHK_(ptr);
1971 } else {
1972 goto handle_unusual;
1973 }
1974 continue;
1975 // repeated string atrace_categories_prefer_sdk = 28;
1976 case 28:
1977 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 226)) {
1978 ptr -= 2;
1979 do {
1980 ptr += 2;
1981 auto str = _internal_add_atrace_categories_prefer_sdk();
1982 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1983 CHK_(ptr);
1984 if (!ctx->DataAvailable(ptr)) break;
1985 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<226>(ptr));
1986 } else {
1987 goto handle_unusual;
1988 }
1989 continue;
1990 // optional uint32 drain_buffer_percent = 29;
1991 case 29:
1992 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 232)) {
1993 _Internal::set_has_drain_buffer_percent(&has_bits);
1994 _impl_.drain_buffer_percent_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1995 CHK_(ptr);
1996 } else {
1997 goto handle_unusual;
1998 }
1999 continue;
2000 // repeated .perfetto.protos.FtraceConfig.KprobeEvent kprobe_events = 30;
2001 case 30:
2002 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 242)) {
2003 ptr -= 2;
2004 do {
2005 ptr += 2;
2006 ptr = ctx->ParseMessage(_internal_add_kprobe_events(), ptr);
2007 CHK_(ptr);
2008 if (!ctx->DataAvailable(ptr)) break;
2009 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<242>(ptr));
2010 } else {
2011 goto handle_unusual;
2012 }
2013 continue;
2014 default:
2015 goto handle_unusual;
2016 } // switch
2017 handle_unusual:
2018 if ((tag == 0) || ((tag & 7) == 4)) {
2019 CHK_(ptr);
2020 ctx->SetLastTag(tag);
2021 goto message_done;
2022 }
2023 ptr = UnknownFieldParse(
2024 tag,
2025 _internal_metadata_.mutable_unknown_fields<std::string>(),
2026 ptr, ctx);
2027 CHK_(ptr != nullptr);
2028 } // while
2029 message_done:
2030 _impl_._has_bits_.Or(has_bits);
2031 return ptr;
2032 failure:
2033 ptr = nullptr;
2034 goto message_done;
2035 #undef CHK_
2036 }
2037
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2038 ::uint8_t* FtraceConfig::_InternalSerialize(
2039 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2040 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.FtraceConfig)
2041 ::uint32_t cached_has_bits = 0;
2042 (void) cached_has_bits;
2043
2044 // repeated string ftrace_events = 1;
2045 for (int i = 0, n = this->_internal_ftrace_events_size(); i < n; i++) {
2046 const auto& s = this->_internal_ftrace_events(i);
2047 target = stream->WriteString(1, s, target);
2048 }
2049
2050 // repeated string atrace_categories = 2;
2051 for (int i = 0, n = this->_internal_atrace_categories_size(); i < n; i++) {
2052 const auto& s = this->_internal_atrace_categories(i);
2053 target = stream->WriteString(2, s, target);
2054 }
2055
2056 // repeated string atrace_apps = 3;
2057 for (int i = 0, n = this->_internal_atrace_apps_size(); i < n; i++) {
2058 const auto& s = this->_internal_atrace_apps(i);
2059 target = stream->WriteString(3, s, target);
2060 }
2061
2062 cached_has_bits = _impl_._has_bits_[0];
2063 // optional uint32 buffer_size_kb = 10;
2064 if (cached_has_bits & 0x00000008u) {
2065 target = stream->EnsureSpace(target);
2066 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_buffer_size_kb(), target);
2067 }
2068
2069 // optional uint32 drain_period_ms = 11;
2070 if (cached_has_bits & 0x00000010u) {
2071 target = stream->EnsureSpace(target);
2072 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(11, this->_internal_drain_period_ms(), target);
2073 }
2074
2075 // optional .perfetto.protos.FtraceConfig.CompactSchedConfig compact_sched = 12;
2076 if (cached_has_bits & 0x00000002u) {
2077 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2078 InternalWriteMessage(12, _Internal::compact_sched(this),
2079 _Internal::compact_sched(this).GetCachedSize(), target, stream);
2080 }
2081
2082 // optional bool symbolize_ksyms = 13;
2083 if (cached_has_bits & 0x00000020u) {
2084 target = stream->EnsureSpace(target);
2085 target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_symbolize_ksyms(), target);
2086 }
2087
2088 // optional bool initialize_ksyms_synchronously_for_testing = 14 [deprecated = true];
2089 if (cached_has_bits & 0x00000040u) {
2090 target = stream->EnsureSpace(target);
2091 target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_initialize_ksyms_synchronously_for_testing(), target);
2092 }
2093
2094 // optional bool throttle_rss_stat = 15;
2095 if (cached_has_bits & 0x00000080u) {
2096 target = stream->EnsureSpace(target);
2097 target = ::_pbi::WireFormatLite::WriteBoolToArray(15, this->_internal_throttle_rss_stat(), target);
2098 }
2099
2100 // optional bool disable_generic_events = 16;
2101 if (cached_has_bits & 0x00000100u) {
2102 target = stream->EnsureSpace(target);
2103 target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_disable_generic_events(), target);
2104 }
2105
2106 // optional .perfetto.protos.FtraceConfig.KsymsMemPolicy ksyms_mem_policy = 17;
2107 if (cached_has_bits & 0x00000200u) {
2108 target = stream->EnsureSpace(target);
2109 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2110 17, this->_internal_ksyms_mem_policy(), target);
2111 }
2112
2113 // repeated string syscall_events = 18;
2114 for (int i = 0, n = this->_internal_syscall_events_size(); i < n; i++) {
2115 const auto& s = this->_internal_syscall_events(i);
2116 target = stream->WriteString(18, s, target);
2117 }
2118
2119 // optional bool enable_function_graph = 19;
2120 if (cached_has_bits & 0x00000400u) {
2121 target = stream->EnsureSpace(target);
2122 target = ::_pbi::WireFormatLite::WriteBoolToArray(19, this->_internal_enable_function_graph(), target);
2123 }
2124
2125 // repeated string function_filters = 20;
2126 for (int i = 0, n = this->_internal_function_filters_size(); i < n; i++) {
2127 const auto& s = this->_internal_function_filters(i);
2128 target = stream->WriteString(20, s, target);
2129 }
2130
2131 // repeated string function_graph_roots = 21;
2132 for (int i = 0, n = this->_internal_function_graph_roots_size(); i < n; i++) {
2133 const auto& s = this->_internal_function_graph_roots(i);
2134 target = stream->WriteString(21, s, target);
2135 }
2136
2137 // optional .perfetto.protos.FtraceConfig.PrintFilter print_filter = 22;
2138 if (cached_has_bits & 0x00000004u) {
2139 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2140 InternalWriteMessage(22, _Internal::print_filter(this),
2141 _Internal::print_filter(this).GetCachedSize(), target, stream);
2142 }
2143
2144 // optional bool preserve_ftrace_buffer = 23;
2145 if (cached_has_bits & 0x00000800u) {
2146 target = stream->EnsureSpace(target);
2147 target = ::_pbi::WireFormatLite::WriteBoolToArray(23, this->_internal_preserve_ftrace_buffer(), target);
2148 }
2149
2150 // optional bool use_monotonic_raw_clock = 24;
2151 if (cached_has_bits & 0x00001000u) {
2152 target = stream->EnsureSpace(target);
2153 target = ::_pbi::WireFormatLite::WriteBoolToArray(24, this->_internal_use_monotonic_raw_clock(), target);
2154 }
2155
2156 // optional string instance_name = 25;
2157 if (cached_has_bits & 0x00000001u) {
2158 target = stream->WriteStringMaybeAliased(
2159 25, this->_internal_instance_name(), target);
2160 }
2161
2162 // optional bool buffer_size_lower_bound = 27;
2163 if (cached_has_bits & 0x00002000u) {
2164 target = stream->EnsureSpace(target);
2165 target = ::_pbi::WireFormatLite::WriteBoolToArray(27, this->_internal_buffer_size_lower_bound(), target);
2166 }
2167
2168 // repeated string atrace_categories_prefer_sdk = 28;
2169 for (int i = 0, n = this->_internal_atrace_categories_prefer_sdk_size(); i < n; i++) {
2170 const auto& s = this->_internal_atrace_categories_prefer_sdk(i);
2171 target = stream->WriteString(28, s, target);
2172 }
2173
2174 // optional uint32 drain_buffer_percent = 29;
2175 if (cached_has_bits & 0x00004000u) {
2176 target = stream->EnsureSpace(target);
2177 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(29, this->_internal_drain_buffer_percent(), target);
2178 }
2179
2180 // repeated .perfetto.protos.FtraceConfig.KprobeEvent kprobe_events = 30;
2181 for (unsigned i = 0,
2182 n = static_cast<unsigned>(this->_internal_kprobe_events_size()); i < n; i++) {
2183 const auto& repfield = this->_internal_kprobe_events(i);
2184 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2185 InternalWriteMessage(30, repfield, repfield.GetCachedSize(), target, stream);
2186 }
2187
2188 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2189 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2190 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2191 }
2192 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.FtraceConfig)
2193 return target;
2194 }
2195
ByteSizeLong() const2196 size_t FtraceConfig::ByteSizeLong() const {
2197 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.FtraceConfig)
2198 size_t total_size = 0;
2199
2200 ::uint32_t cached_has_bits = 0;
2201 // Prevent compiler warnings about cached_has_bits being unused
2202 (void) cached_has_bits;
2203
2204 // repeated string ftrace_events = 1;
2205 total_size += 1 *
2206 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.ftrace_events_.size());
2207 for (int i = 0, n = _impl_.ftrace_events_.size(); i < n; i++) {
2208 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2209 _impl_.ftrace_events_.Get(i));
2210 }
2211
2212 // repeated string atrace_categories = 2;
2213 total_size += 1 *
2214 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.atrace_categories_.size());
2215 for (int i = 0, n = _impl_.atrace_categories_.size(); i < n; i++) {
2216 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2217 _impl_.atrace_categories_.Get(i));
2218 }
2219
2220 // repeated string atrace_apps = 3;
2221 total_size += 1 *
2222 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.atrace_apps_.size());
2223 for (int i = 0, n = _impl_.atrace_apps_.size(); i < n; i++) {
2224 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2225 _impl_.atrace_apps_.Get(i));
2226 }
2227
2228 // repeated string syscall_events = 18;
2229 total_size += 2 *
2230 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.syscall_events_.size());
2231 for (int i = 0, n = _impl_.syscall_events_.size(); i < n; i++) {
2232 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2233 _impl_.syscall_events_.Get(i));
2234 }
2235
2236 // repeated string function_filters = 20;
2237 total_size += 2 *
2238 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.function_filters_.size());
2239 for (int i = 0, n = _impl_.function_filters_.size(); i < n; i++) {
2240 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2241 _impl_.function_filters_.Get(i));
2242 }
2243
2244 // repeated string function_graph_roots = 21;
2245 total_size += 2 *
2246 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.function_graph_roots_.size());
2247 for (int i = 0, n = _impl_.function_graph_roots_.size(); i < n; i++) {
2248 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2249 _impl_.function_graph_roots_.Get(i));
2250 }
2251
2252 // repeated string atrace_categories_prefer_sdk = 28;
2253 total_size += 2 *
2254 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.atrace_categories_prefer_sdk_.size());
2255 for (int i = 0, n = _impl_.atrace_categories_prefer_sdk_.size(); i < n; i++) {
2256 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2257 _impl_.atrace_categories_prefer_sdk_.Get(i));
2258 }
2259
2260 // repeated .perfetto.protos.FtraceConfig.KprobeEvent kprobe_events = 30;
2261 total_size += 2UL * this->_internal_kprobe_events_size();
2262 for (const auto& msg : this->_impl_.kprobe_events_) {
2263 total_size +=
2264 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2265 }
2266
2267 cached_has_bits = _impl_._has_bits_[0];
2268 if (cached_has_bits & 0x000000ffu) {
2269 // optional string instance_name = 25;
2270 if (cached_has_bits & 0x00000001u) {
2271 total_size += 2 +
2272 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2273 this->_internal_instance_name());
2274 }
2275
2276 // optional .perfetto.protos.FtraceConfig.CompactSchedConfig compact_sched = 12;
2277 if (cached_has_bits & 0x00000002u) {
2278 total_size += 1 +
2279 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2280 *_impl_.compact_sched_);
2281 }
2282
2283 // optional .perfetto.protos.FtraceConfig.PrintFilter print_filter = 22;
2284 if (cached_has_bits & 0x00000004u) {
2285 total_size += 2 +
2286 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2287 *_impl_.print_filter_);
2288 }
2289
2290 // optional uint32 buffer_size_kb = 10;
2291 if (cached_has_bits & 0x00000008u) {
2292 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_buffer_size_kb());
2293 }
2294
2295 // optional uint32 drain_period_ms = 11;
2296 if (cached_has_bits & 0x00000010u) {
2297 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_drain_period_ms());
2298 }
2299
2300 // optional bool symbolize_ksyms = 13;
2301 if (cached_has_bits & 0x00000020u) {
2302 total_size += 1 + 1;
2303 }
2304
2305 // optional bool initialize_ksyms_synchronously_for_testing = 14 [deprecated = true];
2306 if (cached_has_bits & 0x00000040u) {
2307 total_size += 1 + 1;
2308 }
2309
2310 // optional bool throttle_rss_stat = 15;
2311 if (cached_has_bits & 0x00000080u) {
2312 total_size += 1 + 1;
2313 }
2314
2315 }
2316 if (cached_has_bits & 0x00007f00u) {
2317 // optional bool disable_generic_events = 16;
2318 if (cached_has_bits & 0x00000100u) {
2319 total_size += 2 + 1;
2320 }
2321
2322 // optional .perfetto.protos.FtraceConfig.KsymsMemPolicy ksyms_mem_policy = 17;
2323 if (cached_has_bits & 0x00000200u) {
2324 total_size += 2 +
2325 ::_pbi::WireFormatLite::EnumSize(this->_internal_ksyms_mem_policy());
2326 }
2327
2328 // optional bool enable_function_graph = 19;
2329 if (cached_has_bits & 0x00000400u) {
2330 total_size += 2 + 1;
2331 }
2332
2333 // optional bool preserve_ftrace_buffer = 23;
2334 if (cached_has_bits & 0x00000800u) {
2335 total_size += 2 + 1;
2336 }
2337
2338 // optional bool use_monotonic_raw_clock = 24;
2339 if (cached_has_bits & 0x00001000u) {
2340 total_size += 2 + 1;
2341 }
2342
2343 // optional bool buffer_size_lower_bound = 27;
2344 if (cached_has_bits & 0x00002000u) {
2345 total_size += 2 + 1;
2346 }
2347
2348 // optional uint32 drain_buffer_percent = 29;
2349 if (cached_has_bits & 0x00004000u) {
2350 total_size += 2 +
2351 ::_pbi::WireFormatLite::UInt32Size(
2352 this->_internal_drain_buffer_percent());
2353 }
2354
2355 }
2356 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2357 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2358 }
2359 int cached_size = ::_pbi::ToCachedSize(total_size);
2360 SetCachedSize(cached_size);
2361 return total_size;
2362 }
2363
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2364 void FtraceConfig::CheckTypeAndMergeFrom(
2365 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2366 MergeFrom(*::_pbi::DownCast<const FtraceConfig*>(
2367 &from));
2368 }
2369
MergeFrom(const FtraceConfig & from)2370 void FtraceConfig::MergeFrom(const FtraceConfig& from) {
2371 FtraceConfig* const _this = this;
2372 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.FtraceConfig)
2373 GOOGLE_DCHECK_NE(&from, _this);
2374 ::uint32_t cached_has_bits = 0;
2375 (void) cached_has_bits;
2376
2377 _this->_impl_.ftrace_events_.MergeFrom(from._impl_.ftrace_events_);
2378 _this->_impl_.atrace_categories_.MergeFrom(from._impl_.atrace_categories_);
2379 _this->_impl_.atrace_apps_.MergeFrom(from._impl_.atrace_apps_);
2380 _this->_impl_.syscall_events_.MergeFrom(from._impl_.syscall_events_);
2381 _this->_impl_.function_filters_.MergeFrom(from._impl_.function_filters_);
2382 _this->_impl_.function_graph_roots_.MergeFrom(from._impl_.function_graph_roots_);
2383 _this->_impl_.atrace_categories_prefer_sdk_.MergeFrom(from._impl_.atrace_categories_prefer_sdk_);
2384 _this->_impl_.kprobe_events_.MergeFrom(from._impl_.kprobe_events_);
2385 cached_has_bits = from._impl_._has_bits_[0];
2386 if (cached_has_bits & 0x000000ffu) {
2387 if (cached_has_bits & 0x00000001u) {
2388 _this->_internal_set_instance_name(from._internal_instance_name());
2389 }
2390 if (cached_has_bits & 0x00000002u) {
2391 _this->_internal_mutable_compact_sched()->::perfetto::protos::FtraceConfig_CompactSchedConfig::MergeFrom(
2392 from._internal_compact_sched());
2393 }
2394 if (cached_has_bits & 0x00000004u) {
2395 _this->_internal_mutable_print_filter()->::perfetto::protos::FtraceConfig_PrintFilter::MergeFrom(
2396 from._internal_print_filter());
2397 }
2398 if (cached_has_bits & 0x00000008u) {
2399 _this->_impl_.buffer_size_kb_ = from._impl_.buffer_size_kb_;
2400 }
2401 if (cached_has_bits & 0x00000010u) {
2402 _this->_impl_.drain_period_ms_ = from._impl_.drain_period_ms_;
2403 }
2404 if (cached_has_bits & 0x00000020u) {
2405 _this->_impl_.symbolize_ksyms_ = from._impl_.symbolize_ksyms_;
2406 }
2407 if (cached_has_bits & 0x00000040u) {
2408 _this->_impl_.initialize_ksyms_synchronously_for_testing_ = from._impl_.initialize_ksyms_synchronously_for_testing_;
2409 }
2410 if (cached_has_bits & 0x00000080u) {
2411 _this->_impl_.throttle_rss_stat_ = from._impl_.throttle_rss_stat_;
2412 }
2413 _this->_impl_._has_bits_[0] |= cached_has_bits;
2414 }
2415 if (cached_has_bits & 0x00007f00u) {
2416 if (cached_has_bits & 0x00000100u) {
2417 _this->_impl_.disable_generic_events_ = from._impl_.disable_generic_events_;
2418 }
2419 if (cached_has_bits & 0x00000200u) {
2420 _this->_impl_.ksyms_mem_policy_ = from._impl_.ksyms_mem_policy_;
2421 }
2422 if (cached_has_bits & 0x00000400u) {
2423 _this->_impl_.enable_function_graph_ = from._impl_.enable_function_graph_;
2424 }
2425 if (cached_has_bits & 0x00000800u) {
2426 _this->_impl_.preserve_ftrace_buffer_ = from._impl_.preserve_ftrace_buffer_;
2427 }
2428 if (cached_has_bits & 0x00001000u) {
2429 _this->_impl_.use_monotonic_raw_clock_ = from._impl_.use_monotonic_raw_clock_;
2430 }
2431 if (cached_has_bits & 0x00002000u) {
2432 _this->_impl_.buffer_size_lower_bound_ = from._impl_.buffer_size_lower_bound_;
2433 }
2434 if (cached_has_bits & 0x00004000u) {
2435 _this->_impl_.drain_buffer_percent_ = from._impl_.drain_buffer_percent_;
2436 }
2437 _this->_impl_._has_bits_[0] |= cached_has_bits;
2438 }
2439 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2440 }
2441
CopyFrom(const FtraceConfig & from)2442 void FtraceConfig::CopyFrom(const FtraceConfig& from) {
2443 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.FtraceConfig)
2444 if (&from == this) return;
2445 Clear();
2446 MergeFrom(from);
2447 }
2448
IsInitialized() const2449 bool FtraceConfig::IsInitialized() const {
2450 return true;
2451 }
2452
InternalSwap(FtraceConfig * other)2453 void FtraceConfig::InternalSwap(FtraceConfig* other) {
2454 using std::swap;
2455 auto* lhs_arena = GetArenaForAllocation();
2456 auto* rhs_arena = other->GetArenaForAllocation();
2457 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2458 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2459 _impl_.ftrace_events_.InternalSwap(&other->_impl_.ftrace_events_);
2460 _impl_.atrace_categories_.InternalSwap(&other->_impl_.atrace_categories_);
2461 _impl_.atrace_apps_.InternalSwap(&other->_impl_.atrace_apps_);
2462 _impl_.syscall_events_.InternalSwap(&other->_impl_.syscall_events_);
2463 _impl_.function_filters_.InternalSwap(&other->_impl_.function_filters_);
2464 _impl_.function_graph_roots_.InternalSwap(&other->_impl_.function_graph_roots_);
2465 _impl_.atrace_categories_prefer_sdk_.InternalSwap(&other->_impl_.atrace_categories_prefer_sdk_);
2466 _impl_.kprobe_events_.InternalSwap(&other->_impl_.kprobe_events_);
2467 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2468 &_impl_.instance_name_, lhs_arena,
2469 &other->_impl_.instance_name_, rhs_arena
2470 );
2471 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2472 PROTOBUF_FIELD_OFFSET(FtraceConfig, _impl_.drain_buffer_percent_)
2473 + sizeof(FtraceConfig::_impl_.drain_buffer_percent_) // NOLINT
2474 - PROTOBUF_FIELD_OFFSET(FtraceConfig, _impl_.compact_sched_)>(
2475 reinterpret_cast<char*>(&_impl_.compact_sched_),
2476 reinterpret_cast<char*>(&other->_impl_.compact_sched_));
2477 }
2478
GetTypeName() const2479 std::string FtraceConfig::GetTypeName() const {
2480 return "perfetto.protos.FtraceConfig";
2481 }
2482
2483
2484 // @@protoc_insertion_point(namespace_scope)
2485 } // namespace protos
2486 } // namespace perfetto
2487 PROTOBUF_NAMESPACE_OPEN
2488 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceConfig_KprobeEvent*
CreateMaybeMessage(Arena * arena)2489 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceConfig_KprobeEvent >(Arena* arena) {
2490 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceConfig_KprobeEvent >(arena);
2491 }
2492 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceConfig_CompactSchedConfig*
CreateMaybeMessage(Arena * arena)2493 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceConfig_CompactSchedConfig >(Arena* arena) {
2494 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceConfig_CompactSchedConfig >(arena);
2495 }
2496 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage*
CreateMaybeMessage(Arena * arena)2497 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage >(Arena* arena) {
2498 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceConfig_PrintFilter_Rule_AtraceMessage >(arena);
2499 }
2500 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceConfig_PrintFilter_Rule*
CreateMaybeMessage(Arena * arena)2501 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceConfig_PrintFilter_Rule >(Arena* arena) {
2502 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceConfig_PrintFilter_Rule >(arena);
2503 }
2504 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceConfig_PrintFilter*
CreateMaybeMessage(Arena * arena)2505 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceConfig_PrintFilter >(Arena* arena) {
2506 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceConfig_PrintFilter >(arena);
2507 }
2508 template<> PROTOBUF_NOINLINE ::perfetto::protos::FtraceConfig*
CreateMaybeMessage(Arena * arena)2509 Arena::CreateMaybeMessage< ::perfetto::protos::FtraceConfig >(Arena* arena) {
2510 return Arena::CreateMessageInternal< ::perfetto::protos::FtraceConfig >(arena);
2511 }
2512 PROTOBUF_NAMESPACE_CLOSE
2513
2514 // @@protoc_insertion_point(global_scope)
2515 #include <google/protobuf/port_undef.inc>
2516