1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/sys_stats/sys_stats.proto
3
4 #include "protos/perfetto/trace/sys_stats/sys_stats.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace perfetto {
22 namespace protos {
SysStats_MeminfoValue(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR SysStats_MeminfoValue::SysStats_MeminfoValue(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.value_)*/::uint64_t{0u}
28 , /*decltype(_impl_.key_)*/0} {}
29 struct SysStats_MeminfoValueDefaultTypeInternal {
SysStats_MeminfoValueDefaultTypeInternalperfetto::protos::SysStats_MeminfoValueDefaultTypeInternal30 PROTOBUF_CONSTEXPR SysStats_MeminfoValueDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_MeminfoValueDefaultTypeInternalperfetto::protos::SysStats_MeminfoValueDefaultTypeInternal32 ~SysStats_MeminfoValueDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 SysStats_MeminfoValue _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_MeminfoValueDefaultTypeInternal _SysStats_MeminfoValue_default_instance_;
SysStats_VmstatValue(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR SysStats_VmstatValue::SysStats_VmstatValue(
39 ::_pbi::ConstantInitialized): _impl_{
40 /*decltype(_impl_._has_bits_)*/{}
41 , /*decltype(_impl_._cached_size_)*/{}
42 , /*decltype(_impl_.value_)*/::uint64_t{0u}
43 , /*decltype(_impl_.key_)*/0} {}
44 struct SysStats_VmstatValueDefaultTypeInternal {
SysStats_VmstatValueDefaultTypeInternalperfetto::protos::SysStats_VmstatValueDefaultTypeInternal45 PROTOBUF_CONSTEXPR SysStats_VmstatValueDefaultTypeInternal()
46 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_VmstatValueDefaultTypeInternalperfetto::protos::SysStats_VmstatValueDefaultTypeInternal47 ~SysStats_VmstatValueDefaultTypeInternal() {}
48 union { // NOLINT(misc-non-private-member-variables-in-classes)
49 SysStats_VmstatValue _instance;
50 };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_VmstatValueDefaultTypeInternal _SysStats_VmstatValue_default_instance_;
SysStats_CpuTimes(::_pbi::ConstantInitialized)53 PROTOBUF_CONSTEXPR SysStats_CpuTimes::SysStats_CpuTimes(
54 ::_pbi::ConstantInitialized): _impl_{
55 /*decltype(_impl_._has_bits_)*/{}
56 , /*decltype(_impl_._cached_size_)*/{}
57 , /*decltype(_impl_.user_ns_)*/::uint64_t{0u}
58 , /*decltype(_impl_.user_nice_ns_)*/::uint64_t{0u}
59 , /*decltype(_impl_.system_mode_ns_)*/::uint64_t{0u}
60 , /*decltype(_impl_.idle_ns_)*/::uint64_t{0u}
61 , /*decltype(_impl_.io_wait_ns_)*/::uint64_t{0u}
62 , /*decltype(_impl_.irq_ns_)*/::uint64_t{0u}
63 , /*decltype(_impl_.softirq_ns_)*/::uint64_t{0u}
64 , /*decltype(_impl_.cpu_id_)*/0u} {}
65 struct SysStats_CpuTimesDefaultTypeInternal {
SysStats_CpuTimesDefaultTypeInternalperfetto::protos::SysStats_CpuTimesDefaultTypeInternal66 PROTOBUF_CONSTEXPR SysStats_CpuTimesDefaultTypeInternal()
67 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_CpuTimesDefaultTypeInternalperfetto::protos::SysStats_CpuTimesDefaultTypeInternal68 ~SysStats_CpuTimesDefaultTypeInternal() {}
69 union { // NOLINT(misc-non-private-member-variables-in-classes)
70 SysStats_CpuTimes _instance;
71 };
72 };
73 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_CpuTimesDefaultTypeInternal _SysStats_CpuTimes_default_instance_;
SysStats_InterruptCount(::_pbi::ConstantInitialized)74 PROTOBUF_CONSTEXPR SysStats_InterruptCount::SysStats_InterruptCount(
75 ::_pbi::ConstantInitialized): _impl_{
76 /*decltype(_impl_._has_bits_)*/{}
77 , /*decltype(_impl_._cached_size_)*/{}
78 , /*decltype(_impl_.count_)*/::uint64_t{0u}
79 , /*decltype(_impl_.irq_)*/0} {}
80 struct SysStats_InterruptCountDefaultTypeInternal {
SysStats_InterruptCountDefaultTypeInternalperfetto::protos::SysStats_InterruptCountDefaultTypeInternal81 PROTOBUF_CONSTEXPR SysStats_InterruptCountDefaultTypeInternal()
82 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_InterruptCountDefaultTypeInternalperfetto::protos::SysStats_InterruptCountDefaultTypeInternal83 ~SysStats_InterruptCountDefaultTypeInternal() {}
84 union { // NOLINT(misc-non-private-member-variables-in-classes)
85 SysStats_InterruptCount _instance;
86 };
87 };
88 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_InterruptCountDefaultTypeInternal _SysStats_InterruptCount_default_instance_;
SysStats_DevfreqValue(::_pbi::ConstantInitialized)89 PROTOBUF_CONSTEXPR SysStats_DevfreqValue::SysStats_DevfreqValue(
90 ::_pbi::ConstantInitialized): _impl_{
91 /*decltype(_impl_._has_bits_)*/{}
92 , /*decltype(_impl_._cached_size_)*/{}
93 , /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
94 , /*decltype(_impl_.value_)*/::uint64_t{0u}} {}
95 struct SysStats_DevfreqValueDefaultTypeInternal {
SysStats_DevfreqValueDefaultTypeInternalperfetto::protos::SysStats_DevfreqValueDefaultTypeInternal96 PROTOBUF_CONSTEXPR SysStats_DevfreqValueDefaultTypeInternal()
97 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_DevfreqValueDefaultTypeInternalperfetto::protos::SysStats_DevfreqValueDefaultTypeInternal98 ~SysStats_DevfreqValueDefaultTypeInternal() {}
99 union { // NOLINT(misc-non-private-member-variables-in-classes)
100 SysStats_DevfreqValue _instance;
101 };
102 };
103 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_DevfreqValueDefaultTypeInternal _SysStats_DevfreqValue_default_instance_;
SysStats_BuddyInfo(::_pbi::ConstantInitialized)104 PROTOBUF_CONSTEXPR SysStats_BuddyInfo::SysStats_BuddyInfo(
105 ::_pbi::ConstantInitialized): _impl_{
106 /*decltype(_impl_._has_bits_)*/{}
107 , /*decltype(_impl_._cached_size_)*/{}
108 , /*decltype(_impl_.order_pages_)*/{}
109 , /*decltype(_impl_.node_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
110 , /*decltype(_impl_.zone_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
111 struct SysStats_BuddyInfoDefaultTypeInternal {
SysStats_BuddyInfoDefaultTypeInternalperfetto::protos::SysStats_BuddyInfoDefaultTypeInternal112 PROTOBUF_CONSTEXPR SysStats_BuddyInfoDefaultTypeInternal()
113 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_BuddyInfoDefaultTypeInternalperfetto::protos::SysStats_BuddyInfoDefaultTypeInternal114 ~SysStats_BuddyInfoDefaultTypeInternal() {}
115 union { // NOLINT(misc-non-private-member-variables-in-classes)
116 SysStats_BuddyInfo _instance;
117 };
118 };
119 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_BuddyInfoDefaultTypeInternal _SysStats_BuddyInfo_default_instance_;
SysStats_DiskStat(::_pbi::ConstantInitialized)120 PROTOBUF_CONSTEXPR SysStats_DiskStat::SysStats_DiskStat(
121 ::_pbi::ConstantInitialized): _impl_{
122 /*decltype(_impl_._has_bits_)*/{}
123 , /*decltype(_impl_._cached_size_)*/{}
124 , /*decltype(_impl_.device_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
125 , /*decltype(_impl_.read_sectors_)*/::uint64_t{0u}
126 , /*decltype(_impl_.read_time_ms_)*/::uint64_t{0u}
127 , /*decltype(_impl_.write_sectors_)*/::uint64_t{0u}
128 , /*decltype(_impl_.write_time_ms_)*/::uint64_t{0u}
129 , /*decltype(_impl_.discard_sectors_)*/::uint64_t{0u}
130 , /*decltype(_impl_.discard_time_ms_)*/::uint64_t{0u}
131 , /*decltype(_impl_.flush_count_)*/::uint64_t{0u}
132 , /*decltype(_impl_.flush_time_ms_)*/::uint64_t{0u}} {}
133 struct SysStats_DiskStatDefaultTypeInternal {
SysStats_DiskStatDefaultTypeInternalperfetto::protos::SysStats_DiskStatDefaultTypeInternal134 PROTOBUF_CONSTEXPR SysStats_DiskStatDefaultTypeInternal()
135 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_DiskStatDefaultTypeInternalperfetto::protos::SysStats_DiskStatDefaultTypeInternal136 ~SysStats_DiskStatDefaultTypeInternal() {}
137 union { // NOLINT(misc-non-private-member-variables-in-classes)
138 SysStats_DiskStat _instance;
139 };
140 };
141 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_DiskStatDefaultTypeInternal _SysStats_DiskStat_default_instance_;
SysStats_PsiSample(::_pbi::ConstantInitialized)142 PROTOBUF_CONSTEXPR SysStats_PsiSample::SysStats_PsiSample(
143 ::_pbi::ConstantInitialized): _impl_{
144 /*decltype(_impl_._has_bits_)*/{}
145 , /*decltype(_impl_._cached_size_)*/{}
146 , /*decltype(_impl_.total_ns_)*/::uint64_t{0u}
147 , /*decltype(_impl_.resource_)*/0} {}
148 struct SysStats_PsiSampleDefaultTypeInternal {
SysStats_PsiSampleDefaultTypeInternalperfetto::protos::SysStats_PsiSampleDefaultTypeInternal149 PROTOBUF_CONSTEXPR SysStats_PsiSampleDefaultTypeInternal()
150 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_PsiSampleDefaultTypeInternalperfetto::protos::SysStats_PsiSampleDefaultTypeInternal151 ~SysStats_PsiSampleDefaultTypeInternal() {}
152 union { // NOLINT(misc-non-private-member-variables-in-classes)
153 SysStats_PsiSample _instance;
154 };
155 };
156 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_PsiSampleDefaultTypeInternal _SysStats_PsiSample_default_instance_;
SysStats_ThermalZone(::_pbi::ConstantInitialized)157 PROTOBUF_CONSTEXPR SysStats_ThermalZone::SysStats_ThermalZone(
158 ::_pbi::ConstantInitialized): _impl_{
159 /*decltype(_impl_._has_bits_)*/{}
160 , /*decltype(_impl_._cached_size_)*/{}
161 , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
162 , /*decltype(_impl_.type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
163 , /*decltype(_impl_.temp_)*/::uint64_t{0u}} {}
164 struct SysStats_ThermalZoneDefaultTypeInternal {
SysStats_ThermalZoneDefaultTypeInternalperfetto::protos::SysStats_ThermalZoneDefaultTypeInternal165 PROTOBUF_CONSTEXPR SysStats_ThermalZoneDefaultTypeInternal()
166 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_ThermalZoneDefaultTypeInternalperfetto::protos::SysStats_ThermalZoneDefaultTypeInternal167 ~SysStats_ThermalZoneDefaultTypeInternal() {}
168 union { // NOLINT(misc-non-private-member-variables-in-classes)
169 SysStats_ThermalZone _instance;
170 };
171 };
172 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_ThermalZoneDefaultTypeInternal _SysStats_ThermalZone_default_instance_;
SysStats_CpuIdleStateEntry(::_pbi::ConstantInitialized)173 PROTOBUF_CONSTEXPR SysStats_CpuIdleStateEntry::SysStats_CpuIdleStateEntry(
174 ::_pbi::ConstantInitialized): _impl_{
175 /*decltype(_impl_._has_bits_)*/{}
176 , /*decltype(_impl_._cached_size_)*/{}
177 , /*decltype(_impl_.state_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
178 , /*decltype(_impl_.duration_us_)*/::uint64_t{0u}} {}
179 struct SysStats_CpuIdleStateEntryDefaultTypeInternal {
SysStats_CpuIdleStateEntryDefaultTypeInternalperfetto::protos::SysStats_CpuIdleStateEntryDefaultTypeInternal180 PROTOBUF_CONSTEXPR SysStats_CpuIdleStateEntryDefaultTypeInternal()
181 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_CpuIdleStateEntryDefaultTypeInternalperfetto::protos::SysStats_CpuIdleStateEntryDefaultTypeInternal182 ~SysStats_CpuIdleStateEntryDefaultTypeInternal() {}
183 union { // NOLINT(misc-non-private-member-variables-in-classes)
184 SysStats_CpuIdleStateEntry _instance;
185 };
186 };
187 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_CpuIdleStateEntryDefaultTypeInternal _SysStats_CpuIdleStateEntry_default_instance_;
SysStats_CpuIdleState(::_pbi::ConstantInitialized)188 PROTOBUF_CONSTEXPR SysStats_CpuIdleState::SysStats_CpuIdleState(
189 ::_pbi::ConstantInitialized): _impl_{
190 /*decltype(_impl_._has_bits_)*/{}
191 , /*decltype(_impl_._cached_size_)*/{}
192 , /*decltype(_impl_.cpuidle_state_entry_)*/{}
193 , /*decltype(_impl_.cpu_id_)*/0u} {}
194 struct SysStats_CpuIdleStateDefaultTypeInternal {
SysStats_CpuIdleStateDefaultTypeInternalperfetto::protos::SysStats_CpuIdleStateDefaultTypeInternal195 PROTOBUF_CONSTEXPR SysStats_CpuIdleStateDefaultTypeInternal()
196 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStats_CpuIdleStateDefaultTypeInternalperfetto::protos::SysStats_CpuIdleStateDefaultTypeInternal197 ~SysStats_CpuIdleStateDefaultTypeInternal() {}
198 union { // NOLINT(misc-non-private-member-variables-in-classes)
199 SysStats_CpuIdleState _instance;
200 };
201 };
202 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStats_CpuIdleStateDefaultTypeInternal _SysStats_CpuIdleState_default_instance_;
SysStats(::_pbi::ConstantInitialized)203 PROTOBUF_CONSTEXPR SysStats::SysStats(
204 ::_pbi::ConstantInitialized): _impl_{
205 /*decltype(_impl_._has_bits_)*/{}
206 , /*decltype(_impl_._cached_size_)*/{}
207 , /*decltype(_impl_.meminfo_)*/{}
208 , /*decltype(_impl_.vmstat_)*/{}
209 , /*decltype(_impl_.cpu_stat_)*/{}
210 , /*decltype(_impl_.num_irq_)*/{}
211 , /*decltype(_impl_.num_softirq_)*/{}
212 , /*decltype(_impl_.devfreq_)*/{}
213 , /*decltype(_impl_.cpufreq_khz_)*/{}
214 , /*decltype(_impl_.buddy_info_)*/{}
215 , /*decltype(_impl_.disk_stat_)*/{}
216 , /*decltype(_impl_.psi_)*/{}
217 , /*decltype(_impl_.thermal_zone_)*/{}
218 , /*decltype(_impl_.cpuidle_state_)*/{}
219 , /*decltype(_impl_.gpufreq_mhz_)*/{}
220 , /*decltype(_impl_.num_forks_)*/::uint64_t{0u}
221 , /*decltype(_impl_.num_irq_total_)*/::uint64_t{0u}
222 , /*decltype(_impl_.num_softirq_total_)*/::uint64_t{0u}
223 , /*decltype(_impl_.collection_end_timestamp_)*/::uint64_t{0u}} {}
224 struct SysStatsDefaultTypeInternal {
SysStatsDefaultTypeInternalperfetto::protos::SysStatsDefaultTypeInternal225 PROTOBUF_CONSTEXPR SysStatsDefaultTypeInternal()
226 : _instance(::_pbi::ConstantInitialized{}) {}
~SysStatsDefaultTypeInternalperfetto::protos::SysStatsDefaultTypeInternal227 ~SysStatsDefaultTypeInternal() {}
228 union { // NOLINT(misc-non-private-member-variables-in-classes)
229 SysStats _instance;
230 };
231 };
232 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SysStatsDefaultTypeInternal _SysStats_default_instance_;
233 } // namespace protos
234 } // namespace perfetto
235 namespace perfetto {
236 namespace protos {
SysStats_PsiSample_PsiResource_IsValid(int value)237 bool SysStats_PsiSample_PsiResource_IsValid(int value) {
238 switch (value) {
239 case 0:
240 case 1:
241 case 2:
242 case 3:
243 case 4:
244 case 5:
245 case 6:
246 return true;
247 default:
248 return false;
249 }
250 }
251
252 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> SysStats_PsiSample_PsiResource_strings[7] = {};
253
254 static const char SysStats_PsiSample_PsiResource_names[] =
255 "PSI_RESOURCE_CPU_FULL"
256 "PSI_RESOURCE_CPU_SOME"
257 "PSI_RESOURCE_IO_FULL"
258 "PSI_RESOURCE_IO_SOME"
259 "PSI_RESOURCE_MEMORY_FULL"
260 "PSI_RESOURCE_MEMORY_SOME"
261 "PSI_RESOURCE_UNSPECIFIED";
262
263 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SysStats_PsiSample_PsiResource_entries[] = {
264 { {SysStats_PsiSample_PsiResource_names + 0, 21}, 2 },
265 { {SysStats_PsiSample_PsiResource_names + 21, 21}, 1 },
266 { {SysStats_PsiSample_PsiResource_names + 42, 20}, 4 },
267 { {SysStats_PsiSample_PsiResource_names + 62, 20}, 3 },
268 { {SysStats_PsiSample_PsiResource_names + 82, 24}, 6 },
269 { {SysStats_PsiSample_PsiResource_names + 106, 24}, 5 },
270 { {SysStats_PsiSample_PsiResource_names + 130, 24}, 0 },
271 };
272
273 static const int SysStats_PsiSample_PsiResource_entries_by_number[] = {
274 6, // 0 -> PSI_RESOURCE_UNSPECIFIED
275 1, // 1 -> PSI_RESOURCE_CPU_SOME
276 0, // 2 -> PSI_RESOURCE_CPU_FULL
277 3, // 3 -> PSI_RESOURCE_IO_SOME
278 2, // 4 -> PSI_RESOURCE_IO_FULL
279 5, // 5 -> PSI_RESOURCE_MEMORY_SOME
280 4, // 6 -> PSI_RESOURCE_MEMORY_FULL
281 };
282
SysStats_PsiSample_PsiResource_Name(SysStats_PsiSample_PsiResource value)283 const std::string& SysStats_PsiSample_PsiResource_Name(
284 SysStats_PsiSample_PsiResource value) {
285 static const bool dummy =
286 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
287 SysStats_PsiSample_PsiResource_entries,
288 SysStats_PsiSample_PsiResource_entries_by_number,
289 7, SysStats_PsiSample_PsiResource_strings);
290 (void) dummy;
291 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
292 SysStats_PsiSample_PsiResource_entries,
293 SysStats_PsiSample_PsiResource_entries_by_number,
294 7, value);
295 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
296 SysStats_PsiSample_PsiResource_strings[idx].get();
297 }
SysStats_PsiSample_PsiResource_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,SysStats_PsiSample_PsiResource * value)298 bool SysStats_PsiSample_PsiResource_Parse(
299 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SysStats_PsiSample_PsiResource* value) {
300 int int_value;
301 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
302 SysStats_PsiSample_PsiResource_entries, 7, name, &int_value);
303 if (success) {
304 *value = static_cast<SysStats_PsiSample_PsiResource>(int_value);
305 }
306 return success;
307 }
308 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
309 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PSI_RESOURCE_UNSPECIFIED;
310 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PSI_RESOURCE_CPU_SOME;
311 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PSI_RESOURCE_CPU_FULL;
312 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PSI_RESOURCE_IO_SOME;
313 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PSI_RESOURCE_IO_FULL;
314 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PSI_RESOURCE_MEMORY_SOME;
315 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PSI_RESOURCE_MEMORY_FULL;
316 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PsiResource_MIN;
317 constexpr SysStats_PsiSample_PsiResource SysStats_PsiSample::PsiResource_MAX;
318 constexpr int SysStats_PsiSample::PsiResource_ARRAYSIZE;
319 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
320
321 // ===================================================================
322
323 class SysStats_MeminfoValue::_Internal {
324 public:
325 using HasBits = decltype(std::declval<SysStats_MeminfoValue>()._impl_._has_bits_);
set_has_key(HasBits * has_bits)326 static void set_has_key(HasBits* has_bits) {
327 (*has_bits)[0] |= 2u;
328 }
set_has_value(HasBits * has_bits)329 static void set_has_value(HasBits* has_bits) {
330 (*has_bits)[0] |= 1u;
331 }
332 };
333
SysStats_MeminfoValue(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)334 SysStats_MeminfoValue::SysStats_MeminfoValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
335 bool is_message_owned)
336 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
337 SharedCtor(arena, is_message_owned);
338 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.MeminfoValue)
339 }
SysStats_MeminfoValue(const SysStats_MeminfoValue & from)340 SysStats_MeminfoValue::SysStats_MeminfoValue(const SysStats_MeminfoValue& from)
341 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
342 SysStats_MeminfoValue* const _this = this; (void)_this;
343 new (&_impl_) Impl_{
344 decltype(_impl_._has_bits_){from._impl_._has_bits_}
345 , /*decltype(_impl_._cached_size_)*/{}
346 , decltype(_impl_.value_){}
347 , decltype(_impl_.key_){}};
348
349 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
350 ::memcpy(&_impl_.value_, &from._impl_.value_,
351 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.key_) -
352 reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.key_));
353 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.MeminfoValue)
354 }
355
SharedCtor(::_pb::Arena * arena,bool is_message_owned)356 inline void SysStats_MeminfoValue::SharedCtor(
357 ::_pb::Arena* arena, bool is_message_owned) {
358 (void)arena;
359 (void)is_message_owned;
360 new (&_impl_) Impl_{
361 decltype(_impl_._has_bits_){}
362 , /*decltype(_impl_._cached_size_)*/{}
363 , decltype(_impl_.value_){::uint64_t{0u}}
364 , decltype(_impl_.key_){0}
365 };
366 }
367
~SysStats_MeminfoValue()368 SysStats_MeminfoValue::~SysStats_MeminfoValue() {
369 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.MeminfoValue)
370 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
371 (void)arena;
372 return;
373 }
374 SharedDtor();
375 }
376
SharedDtor()377 inline void SysStats_MeminfoValue::SharedDtor() {
378 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
379 }
380
SetCachedSize(int size) const381 void SysStats_MeminfoValue::SetCachedSize(int size) const {
382 _impl_._cached_size_.Set(size);
383 }
384
Clear()385 void SysStats_MeminfoValue::Clear() {
386 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.MeminfoValue)
387 ::uint32_t cached_has_bits = 0;
388 // Prevent compiler warnings about cached_has_bits being unused
389 (void) cached_has_bits;
390
391 cached_has_bits = _impl_._has_bits_[0];
392 if (cached_has_bits & 0x00000003u) {
393 ::memset(&_impl_.value_, 0, static_cast<size_t>(
394 reinterpret_cast<char*>(&_impl_.key_) -
395 reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.key_));
396 }
397 _impl_._has_bits_.Clear();
398 _internal_metadata_.Clear<std::string>();
399 }
400
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)401 const char* SysStats_MeminfoValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
402 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
403 _Internal::HasBits has_bits{};
404 while (!ctx->Done(&ptr)) {
405 ::uint32_t tag;
406 ptr = ::_pbi::ReadTag(ptr, &tag);
407 switch (tag >> 3) {
408 // optional .perfetto.protos.MeminfoCounters key = 1;
409 case 1:
410 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
411 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
412 CHK_(ptr);
413 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::MeminfoCounters_IsValid(val))) {
414 _internal_set_key(static_cast<::perfetto::protos::MeminfoCounters>(val));
415 } else {
416 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
417 }
418 } else {
419 goto handle_unusual;
420 }
421 continue;
422 // optional uint64 value = 2;
423 case 2:
424 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
425 _Internal::set_has_value(&has_bits);
426 _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
427 CHK_(ptr);
428 } else {
429 goto handle_unusual;
430 }
431 continue;
432 default:
433 goto handle_unusual;
434 } // switch
435 handle_unusual:
436 if ((tag == 0) || ((tag & 7) == 4)) {
437 CHK_(ptr);
438 ctx->SetLastTag(tag);
439 goto message_done;
440 }
441 ptr = UnknownFieldParse(
442 tag,
443 _internal_metadata_.mutable_unknown_fields<std::string>(),
444 ptr, ctx);
445 CHK_(ptr != nullptr);
446 } // while
447 message_done:
448 _impl_._has_bits_.Or(has_bits);
449 return ptr;
450 failure:
451 ptr = nullptr;
452 goto message_done;
453 #undef CHK_
454 }
455
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const456 ::uint8_t* SysStats_MeminfoValue::_InternalSerialize(
457 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
458 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.MeminfoValue)
459 ::uint32_t cached_has_bits = 0;
460 (void) cached_has_bits;
461
462 cached_has_bits = _impl_._has_bits_[0];
463 // optional .perfetto.protos.MeminfoCounters key = 1;
464 if (cached_has_bits & 0x00000002u) {
465 target = stream->EnsureSpace(target);
466 target = ::_pbi::WireFormatLite::WriteEnumToArray(
467 1, this->_internal_key(), target);
468 }
469
470 // optional uint64 value = 2;
471 if (cached_has_bits & 0x00000001u) {
472 target = stream->EnsureSpace(target);
473 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_value(), target);
474 }
475
476 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
477 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
478 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
479 }
480 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.MeminfoValue)
481 return target;
482 }
483
ByteSizeLong() const484 size_t SysStats_MeminfoValue::ByteSizeLong() const {
485 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.MeminfoValue)
486 size_t total_size = 0;
487
488 ::uint32_t cached_has_bits = 0;
489 // Prevent compiler warnings about cached_has_bits being unused
490 (void) cached_has_bits;
491
492 cached_has_bits = _impl_._has_bits_[0];
493 if (cached_has_bits & 0x00000003u) {
494 // optional uint64 value = 2;
495 if (cached_has_bits & 0x00000001u) {
496 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_value());
497 }
498
499 // optional .perfetto.protos.MeminfoCounters key = 1;
500 if (cached_has_bits & 0x00000002u) {
501 total_size += 1 +
502 ::_pbi::WireFormatLite::EnumSize(this->_internal_key());
503 }
504
505 }
506 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
507 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
508 }
509 int cached_size = ::_pbi::ToCachedSize(total_size);
510 SetCachedSize(cached_size);
511 return total_size;
512 }
513
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)514 void SysStats_MeminfoValue::CheckTypeAndMergeFrom(
515 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
516 MergeFrom(*::_pbi::DownCast<const SysStats_MeminfoValue*>(
517 &from));
518 }
519
MergeFrom(const SysStats_MeminfoValue & from)520 void SysStats_MeminfoValue::MergeFrom(const SysStats_MeminfoValue& from) {
521 SysStats_MeminfoValue* const _this = this;
522 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.MeminfoValue)
523 GOOGLE_DCHECK_NE(&from, _this);
524 ::uint32_t cached_has_bits = 0;
525 (void) cached_has_bits;
526
527 cached_has_bits = from._impl_._has_bits_[0];
528 if (cached_has_bits & 0x00000003u) {
529 if (cached_has_bits & 0x00000001u) {
530 _this->_impl_.value_ = from._impl_.value_;
531 }
532 if (cached_has_bits & 0x00000002u) {
533 _this->_impl_.key_ = from._impl_.key_;
534 }
535 _this->_impl_._has_bits_[0] |= cached_has_bits;
536 }
537 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
538 }
539
CopyFrom(const SysStats_MeminfoValue & from)540 void SysStats_MeminfoValue::CopyFrom(const SysStats_MeminfoValue& from) {
541 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.MeminfoValue)
542 if (&from == this) return;
543 Clear();
544 MergeFrom(from);
545 }
546
IsInitialized() const547 bool SysStats_MeminfoValue::IsInitialized() const {
548 return true;
549 }
550
InternalSwap(SysStats_MeminfoValue * other)551 void SysStats_MeminfoValue::InternalSwap(SysStats_MeminfoValue* other) {
552 using std::swap;
553 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
554 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
555 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
556 PROTOBUF_FIELD_OFFSET(SysStats_MeminfoValue, _impl_.key_)
557 + sizeof(SysStats_MeminfoValue::_impl_.key_) // NOLINT
558 - PROTOBUF_FIELD_OFFSET(SysStats_MeminfoValue, _impl_.value_)>(
559 reinterpret_cast<char*>(&_impl_.value_),
560 reinterpret_cast<char*>(&other->_impl_.value_));
561 }
562
GetTypeName() const563 std::string SysStats_MeminfoValue::GetTypeName() const {
564 return "perfetto.protos.SysStats.MeminfoValue";
565 }
566
567
568 // ===================================================================
569
570 class SysStats_VmstatValue::_Internal {
571 public:
572 using HasBits = decltype(std::declval<SysStats_VmstatValue>()._impl_._has_bits_);
set_has_key(HasBits * has_bits)573 static void set_has_key(HasBits* has_bits) {
574 (*has_bits)[0] |= 2u;
575 }
set_has_value(HasBits * has_bits)576 static void set_has_value(HasBits* has_bits) {
577 (*has_bits)[0] |= 1u;
578 }
579 };
580
SysStats_VmstatValue(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)581 SysStats_VmstatValue::SysStats_VmstatValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
582 bool is_message_owned)
583 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
584 SharedCtor(arena, is_message_owned);
585 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.VmstatValue)
586 }
SysStats_VmstatValue(const SysStats_VmstatValue & from)587 SysStats_VmstatValue::SysStats_VmstatValue(const SysStats_VmstatValue& from)
588 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
589 SysStats_VmstatValue* const _this = this; (void)_this;
590 new (&_impl_) Impl_{
591 decltype(_impl_._has_bits_){from._impl_._has_bits_}
592 , /*decltype(_impl_._cached_size_)*/{}
593 , decltype(_impl_.value_){}
594 , decltype(_impl_.key_){}};
595
596 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
597 ::memcpy(&_impl_.value_, &from._impl_.value_,
598 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.key_) -
599 reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.key_));
600 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.VmstatValue)
601 }
602
SharedCtor(::_pb::Arena * arena,bool is_message_owned)603 inline void SysStats_VmstatValue::SharedCtor(
604 ::_pb::Arena* arena, bool is_message_owned) {
605 (void)arena;
606 (void)is_message_owned;
607 new (&_impl_) Impl_{
608 decltype(_impl_._has_bits_){}
609 , /*decltype(_impl_._cached_size_)*/{}
610 , decltype(_impl_.value_){::uint64_t{0u}}
611 , decltype(_impl_.key_){0}
612 };
613 }
614
~SysStats_VmstatValue()615 SysStats_VmstatValue::~SysStats_VmstatValue() {
616 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.VmstatValue)
617 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
618 (void)arena;
619 return;
620 }
621 SharedDtor();
622 }
623
SharedDtor()624 inline void SysStats_VmstatValue::SharedDtor() {
625 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
626 }
627
SetCachedSize(int size) const628 void SysStats_VmstatValue::SetCachedSize(int size) const {
629 _impl_._cached_size_.Set(size);
630 }
631
Clear()632 void SysStats_VmstatValue::Clear() {
633 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.VmstatValue)
634 ::uint32_t cached_has_bits = 0;
635 // Prevent compiler warnings about cached_has_bits being unused
636 (void) cached_has_bits;
637
638 cached_has_bits = _impl_._has_bits_[0];
639 if (cached_has_bits & 0x00000003u) {
640 ::memset(&_impl_.value_, 0, static_cast<size_t>(
641 reinterpret_cast<char*>(&_impl_.key_) -
642 reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.key_));
643 }
644 _impl_._has_bits_.Clear();
645 _internal_metadata_.Clear<std::string>();
646 }
647
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)648 const char* SysStats_VmstatValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
649 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
650 _Internal::HasBits has_bits{};
651 while (!ctx->Done(&ptr)) {
652 ::uint32_t tag;
653 ptr = ::_pbi::ReadTag(ptr, &tag);
654 switch (tag >> 3) {
655 // optional .perfetto.protos.VmstatCounters key = 1;
656 case 1:
657 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
658 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
659 CHK_(ptr);
660 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::VmstatCounters_IsValid(val))) {
661 _internal_set_key(static_cast<::perfetto::protos::VmstatCounters>(val));
662 } else {
663 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
664 }
665 } else {
666 goto handle_unusual;
667 }
668 continue;
669 // optional uint64 value = 2;
670 case 2:
671 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
672 _Internal::set_has_value(&has_bits);
673 _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
674 CHK_(ptr);
675 } else {
676 goto handle_unusual;
677 }
678 continue;
679 default:
680 goto handle_unusual;
681 } // switch
682 handle_unusual:
683 if ((tag == 0) || ((tag & 7) == 4)) {
684 CHK_(ptr);
685 ctx->SetLastTag(tag);
686 goto message_done;
687 }
688 ptr = UnknownFieldParse(
689 tag,
690 _internal_metadata_.mutable_unknown_fields<std::string>(),
691 ptr, ctx);
692 CHK_(ptr != nullptr);
693 } // while
694 message_done:
695 _impl_._has_bits_.Or(has_bits);
696 return ptr;
697 failure:
698 ptr = nullptr;
699 goto message_done;
700 #undef CHK_
701 }
702
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const703 ::uint8_t* SysStats_VmstatValue::_InternalSerialize(
704 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
705 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.VmstatValue)
706 ::uint32_t cached_has_bits = 0;
707 (void) cached_has_bits;
708
709 cached_has_bits = _impl_._has_bits_[0];
710 // optional .perfetto.protos.VmstatCounters key = 1;
711 if (cached_has_bits & 0x00000002u) {
712 target = stream->EnsureSpace(target);
713 target = ::_pbi::WireFormatLite::WriteEnumToArray(
714 1, this->_internal_key(), target);
715 }
716
717 // optional uint64 value = 2;
718 if (cached_has_bits & 0x00000001u) {
719 target = stream->EnsureSpace(target);
720 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_value(), target);
721 }
722
723 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
724 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
725 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
726 }
727 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.VmstatValue)
728 return target;
729 }
730
ByteSizeLong() const731 size_t SysStats_VmstatValue::ByteSizeLong() const {
732 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.VmstatValue)
733 size_t total_size = 0;
734
735 ::uint32_t cached_has_bits = 0;
736 // Prevent compiler warnings about cached_has_bits being unused
737 (void) cached_has_bits;
738
739 cached_has_bits = _impl_._has_bits_[0];
740 if (cached_has_bits & 0x00000003u) {
741 // optional uint64 value = 2;
742 if (cached_has_bits & 0x00000001u) {
743 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_value());
744 }
745
746 // optional .perfetto.protos.VmstatCounters key = 1;
747 if (cached_has_bits & 0x00000002u) {
748 total_size += 1 +
749 ::_pbi::WireFormatLite::EnumSize(this->_internal_key());
750 }
751
752 }
753 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
754 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
755 }
756 int cached_size = ::_pbi::ToCachedSize(total_size);
757 SetCachedSize(cached_size);
758 return total_size;
759 }
760
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)761 void SysStats_VmstatValue::CheckTypeAndMergeFrom(
762 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
763 MergeFrom(*::_pbi::DownCast<const SysStats_VmstatValue*>(
764 &from));
765 }
766
MergeFrom(const SysStats_VmstatValue & from)767 void SysStats_VmstatValue::MergeFrom(const SysStats_VmstatValue& from) {
768 SysStats_VmstatValue* const _this = this;
769 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.VmstatValue)
770 GOOGLE_DCHECK_NE(&from, _this);
771 ::uint32_t cached_has_bits = 0;
772 (void) cached_has_bits;
773
774 cached_has_bits = from._impl_._has_bits_[0];
775 if (cached_has_bits & 0x00000003u) {
776 if (cached_has_bits & 0x00000001u) {
777 _this->_impl_.value_ = from._impl_.value_;
778 }
779 if (cached_has_bits & 0x00000002u) {
780 _this->_impl_.key_ = from._impl_.key_;
781 }
782 _this->_impl_._has_bits_[0] |= cached_has_bits;
783 }
784 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
785 }
786
CopyFrom(const SysStats_VmstatValue & from)787 void SysStats_VmstatValue::CopyFrom(const SysStats_VmstatValue& from) {
788 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.VmstatValue)
789 if (&from == this) return;
790 Clear();
791 MergeFrom(from);
792 }
793
IsInitialized() const794 bool SysStats_VmstatValue::IsInitialized() const {
795 return true;
796 }
797
InternalSwap(SysStats_VmstatValue * other)798 void SysStats_VmstatValue::InternalSwap(SysStats_VmstatValue* other) {
799 using std::swap;
800 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
801 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
802 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
803 PROTOBUF_FIELD_OFFSET(SysStats_VmstatValue, _impl_.key_)
804 + sizeof(SysStats_VmstatValue::_impl_.key_) // NOLINT
805 - PROTOBUF_FIELD_OFFSET(SysStats_VmstatValue, _impl_.value_)>(
806 reinterpret_cast<char*>(&_impl_.value_),
807 reinterpret_cast<char*>(&other->_impl_.value_));
808 }
809
GetTypeName() const810 std::string SysStats_VmstatValue::GetTypeName() const {
811 return "perfetto.protos.SysStats.VmstatValue";
812 }
813
814
815 // ===================================================================
816
817 class SysStats_CpuTimes::_Internal {
818 public:
819 using HasBits = decltype(std::declval<SysStats_CpuTimes>()._impl_._has_bits_);
set_has_cpu_id(HasBits * has_bits)820 static void set_has_cpu_id(HasBits* has_bits) {
821 (*has_bits)[0] |= 128u;
822 }
set_has_user_ns(HasBits * has_bits)823 static void set_has_user_ns(HasBits* has_bits) {
824 (*has_bits)[0] |= 1u;
825 }
set_has_user_nice_ns(HasBits * has_bits)826 static void set_has_user_nice_ns(HasBits* has_bits) {
827 (*has_bits)[0] |= 2u;
828 }
set_has_system_mode_ns(HasBits * has_bits)829 static void set_has_system_mode_ns(HasBits* has_bits) {
830 (*has_bits)[0] |= 4u;
831 }
set_has_idle_ns(HasBits * has_bits)832 static void set_has_idle_ns(HasBits* has_bits) {
833 (*has_bits)[0] |= 8u;
834 }
set_has_io_wait_ns(HasBits * has_bits)835 static void set_has_io_wait_ns(HasBits* has_bits) {
836 (*has_bits)[0] |= 16u;
837 }
set_has_irq_ns(HasBits * has_bits)838 static void set_has_irq_ns(HasBits* has_bits) {
839 (*has_bits)[0] |= 32u;
840 }
set_has_softirq_ns(HasBits * has_bits)841 static void set_has_softirq_ns(HasBits* has_bits) {
842 (*has_bits)[0] |= 64u;
843 }
844 };
845
SysStats_CpuTimes(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)846 SysStats_CpuTimes::SysStats_CpuTimes(::PROTOBUF_NAMESPACE_ID::Arena* arena,
847 bool is_message_owned)
848 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
849 SharedCtor(arena, is_message_owned);
850 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.CpuTimes)
851 }
SysStats_CpuTimes(const SysStats_CpuTimes & from)852 SysStats_CpuTimes::SysStats_CpuTimes(const SysStats_CpuTimes& from)
853 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
854 SysStats_CpuTimes* const _this = this; (void)_this;
855 new (&_impl_) Impl_{
856 decltype(_impl_._has_bits_){from._impl_._has_bits_}
857 , /*decltype(_impl_._cached_size_)*/{}
858 , decltype(_impl_.user_ns_){}
859 , decltype(_impl_.user_nice_ns_){}
860 , decltype(_impl_.system_mode_ns_){}
861 , decltype(_impl_.idle_ns_){}
862 , decltype(_impl_.io_wait_ns_){}
863 , decltype(_impl_.irq_ns_){}
864 , decltype(_impl_.softirq_ns_){}
865 , decltype(_impl_.cpu_id_){}};
866
867 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
868 ::memcpy(&_impl_.user_ns_, &from._impl_.user_ns_,
869 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.cpu_id_) -
870 reinterpret_cast<char*>(&_impl_.user_ns_)) + sizeof(_impl_.cpu_id_));
871 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.CpuTimes)
872 }
873
SharedCtor(::_pb::Arena * arena,bool is_message_owned)874 inline void SysStats_CpuTimes::SharedCtor(
875 ::_pb::Arena* arena, bool is_message_owned) {
876 (void)arena;
877 (void)is_message_owned;
878 new (&_impl_) Impl_{
879 decltype(_impl_._has_bits_){}
880 , /*decltype(_impl_._cached_size_)*/{}
881 , decltype(_impl_.user_ns_){::uint64_t{0u}}
882 , decltype(_impl_.user_nice_ns_){::uint64_t{0u}}
883 , decltype(_impl_.system_mode_ns_){::uint64_t{0u}}
884 , decltype(_impl_.idle_ns_){::uint64_t{0u}}
885 , decltype(_impl_.io_wait_ns_){::uint64_t{0u}}
886 , decltype(_impl_.irq_ns_){::uint64_t{0u}}
887 , decltype(_impl_.softirq_ns_){::uint64_t{0u}}
888 , decltype(_impl_.cpu_id_){0u}
889 };
890 }
891
~SysStats_CpuTimes()892 SysStats_CpuTimes::~SysStats_CpuTimes() {
893 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.CpuTimes)
894 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
895 (void)arena;
896 return;
897 }
898 SharedDtor();
899 }
900
SharedDtor()901 inline void SysStats_CpuTimes::SharedDtor() {
902 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
903 }
904
SetCachedSize(int size) const905 void SysStats_CpuTimes::SetCachedSize(int size) const {
906 _impl_._cached_size_.Set(size);
907 }
908
Clear()909 void SysStats_CpuTimes::Clear() {
910 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.CpuTimes)
911 ::uint32_t cached_has_bits = 0;
912 // Prevent compiler warnings about cached_has_bits being unused
913 (void) cached_has_bits;
914
915 cached_has_bits = _impl_._has_bits_[0];
916 if (cached_has_bits & 0x000000ffu) {
917 ::memset(&_impl_.user_ns_, 0, static_cast<size_t>(
918 reinterpret_cast<char*>(&_impl_.cpu_id_) -
919 reinterpret_cast<char*>(&_impl_.user_ns_)) + sizeof(_impl_.cpu_id_));
920 }
921 _impl_._has_bits_.Clear();
922 _internal_metadata_.Clear<std::string>();
923 }
924
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)925 const char* SysStats_CpuTimes::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
926 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
927 _Internal::HasBits has_bits{};
928 while (!ctx->Done(&ptr)) {
929 ::uint32_t tag;
930 ptr = ::_pbi::ReadTag(ptr, &tag);
931 switch (tag >> 3) {
932 // optional uint32 cpu_id = 1;
933 case 1:
934 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
935 _Internal::set_has_cpu_id(&has_bits);
936 _impl_.cpu_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
937 CHK_(ptr);
938 } else {
939 goto handle_unusual;
940 }
941 continue;
942 // optional uint64 user_ns = 2;
943 case 2:
944 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
945 _Internal::set_has_user_ns(&has_bits);
946 _impl_.user_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
947 CHK_(ptr);
948 } else {
949 goto handle_unusual;
950 }
951 continue;
952 // optional uint64 user_nice_ns = 3;
953 case 3:
954 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
955 _Internal::set_has_user_nice_ns(&has_bits);
956 _impl_.user_nice_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
957 CHK_(ptr);
958 } else {
959 goto handle_unusual;
960 }
961 continue;
962 // optional uint64 system_mode_ns = 4;
963 case 4:
964 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
965 _Internal::set_has_system_mode_ns(&has_bits);
966 _impl_.system_mode_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
967 CHK_(ptr);
968 } else {
969 goto handle_unusual;
970 }
971 continue;
972 // optional uint64 idle_ns = 5;
973 case 5:
974 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
975 _Internal::set_has_idle_ns(&has_bits);
976 _impl_.idle_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
977 CHK_(ptr);
978 } else {
979 goto handle_unusual;
980 }
981 continue;
982 // optional uint64 io_wait_ns = 6;
983 case 6:
984 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
985 _Internal::set_has_io_wait_ns(&has_bits);
986 _impl_.io_wait_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
987 CHK_(ptr);
988 } else {
989 goto handle_unusual;
990 }
991 continue;
992 // optional uint64 irq_ns = 7;
993 case 7:
994 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
995 _Internal::set_has_irq_ns(&has_bits);
996 _impl_.irq_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
997 CHK_(ptr);
998 } else {
999 goto handle_unusual;
1000 }
1001 continue;
1002 // optional uint64 softirq_ns = 8;
1003 case 8:
1004 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1005 _Internal::set_has_softirq_ns(&has_bits);
1006 _impl_.softirq_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1007 CHK_(ptr);
1008 } else {
1009 goto handle_unusual;
1010 }
1011 continue;
1012 default:
1013 goto handle_unusual;
1014 } // switch
1015 handle_unusual:
1016 if ((tag == 0) || ((tag & 7) == 4)) {
1017 CHK_(ptr);
1018 ctx->SetLastTag(tag);
1019 goto message_done;
1020 }
1021 ptr = UnknownFieldParse(
1022 tag,
1023 _internal_metadata_.mutable_unknown_fields<std::string>(),
1024 ptr, ctx);
1025 CHK_(ptr != nullptr);
1026 } // while
1027 message_done:
1028 _impl_._has_bits_.Or(has_bits);
1029 return ptr;
1030 failure:
1031 ptr = nullptr;
1032 goto message_done;
1033 #undef CHK_
1034 }
1035
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1036 ::uint8_t* SysStats_CpuTimes::_InternalSerialize(
1037 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1038 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.CpuTimes)
1039 ::uint32_t cached_has_bits = 0;
1040 (void) cached_has_bits;
1041
1042 cached_has_bits = _impl_._has_bits_[0];
1043 // optional uint32 cpu_id = 1;
1044 if (cached_has_bits & 0x00000080u) {
1045 target = stream->EnsureSpace(target);
1046 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cpu_id(), target);
1047 }
1048
1049 // optional uint64 user_ns = 2;
1050 if (cached_has_bits & 0x00000001u) {
1051 target = stream->EnsureSpace(target);
1052 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_user_ns(), target);
1053 }
1054
1055 // optional uint64 user_nice_ns = 3;
1056 if (cached_has_bits & 0x00000002u) {
1057 target = stream->EnsureSpace(target);
1058 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_user_nice_ns(), target);
1059 }
1060
1061 // optional uint64 system_mode_ns = 4;
1062 if (cached_has_bits & 0x00000004u) {
1063 target = stream->EnsureSpace(target);
1064 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_system_mode_ns(), target);
1065 }
1066
1067 // optional uint64 idle_ns = 5;
1068 if (cached_has_bits & 0x00000008u) {
1069 target = stream->EnsureSpace(target);
1070 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_idle_ns(), target);
1071 }
1072
1073 // optional uint64 io_wait_ns = 6;
1074 if (cached_has_bits & 0x00000010u) {
1075 target = stream->EnsureSpace(target);
1076 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_io_wait_ns(), target);
1077 }
1078
1079 // optional uint64 irq_ns = 7;
1080 if (cached_has_bits & 0x00000020u) {
1081 target = stream->EnsureSpace(target);
1082 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_irq_ns(), target);
1083 }
1084
1085 // optional uint64 softirq_ns = 8;
1086 if (cached_has_bits & 0x00000040u) {
1087 target = stream->EnsureSpace(target);
1088 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_softirq_ns(), target);
1089 }
1090
1091 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1092 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1093 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1094 }
1095 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.CpuTimes)
1096 return target;
1097 }
1098
ByteSizeLong() const1099 size_t SysStats_CpuTimes::ByteSizeLong() const {
1100 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.CpuTimes)
1101 size_t total_size = 0;
1102
1103 ::uint32_t cached_has_bits = 0;
1104 // Prevent compiler warnings about cached_has_bits being unused
1105 (void) cached_has_bits;
1106
1107 cached_has_bits = _impl_._has_bits_[0];
1108 if (cached_has_bits & 0x000000ffu) {
1109 // optional uint64 user_ns = 2;
1110 if (cached_has_bits & 0x00000001u) {
1111 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_user_ns());
1112 }
1113
1114 // optional uint64 user_nice_ns = 3;
1115 if (cached_has_bits & 0x00000002u) {
1116 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_user_nice_ns());
1117 }
1118
1119 // optional uint64 system_mode_ns = 4;
1120 if (cached_has_bits & 0x00000004u) {
1121 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_system_mode_ns());
1122 }
1123
1124 // optional uint64 idle_ns = 5;
1125 if (cached_has_bits & 0x00000008u) {
1126 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_idle_ns());
1127 }
1128
1129 // optional uint64 io_wait_ns = 6;
1130 if (cached_has_bits & 0x00000010u) {
1131 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_io_wait_ns());
1132 }
1133
1134 // optional uint64 irq_ns = 7;
1135 if (cached_has_bits & 0x00000020u) {
1136 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_irq_ns());
1137 }
1138
1139 // optional uint64 softirq_ns = 8;
1140 if (cached_has_bits & 0x00000040u) {
1141 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_softirq_ns());
1142 }
1143
1144 // optional uint32 cpu_id = 1;
1145 if (cached_has_bits & 0x00000080u) {
1146 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpu_id());
1147 }
1148
1149 }
1150 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1151 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1152 }
1153 int cached_size = ::_pbi::ToCachedSize(total_size);
1154 SetCachedSize(cached_size);
1155 return total_size;
1156 }
1157
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1158 void SysStats_CpuTimes::CheckTypeAndMergeFrom(
1159 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1160 MergeFrom(*::_pbi::DownCast<const SysStats_CpuTimes*>(
1161 &from));
1162 }
1163
MergeFrom(const SysStats_CpuTimes & from)1164 void SysStats_CpuTimes::MergeFrom(const SysStats_CpuTimes& from) {
1165 SysStats_CpuTimes* const _this = this;
1166 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.CpuTimes)
1167 GOOGLE_DCHECK_NE(&from, _this);
1168 ::uint32_t cached_has_bits = 0;
1169 (void) cached_has_bits;
1170
1171 cached_has_bits = from._impl_._has_bits_[0];
1172 if (cached_has_bits & 0x000000ffu) {
1173 if (cached_has_bits & 0x00000001u) {
1174 _this->_impl_.user_ns_ = from._impl_.user_ns_;
1175 }
1176 if (cached_has_bits & 0x00000002u) {
1177 _this->_impl_.user_nice_ns_ = from._impl_.user_nice_ns_;
1178 }
1179 if (cached_has_bits & 0x00000004u) {
1180 _this->_impl_.system_mode_ns_ = from._impl_.system_mode_ns_;
1181 }
1182 if (cached_has_bits & 0x00000008u) {
1183 _this->_impl_.idle_ns_ = from._impl_.idle_ns_;
1184 }
1185 if (cached_has_bits & 0x00000010u) {
1186 _this->_impl_.io_wait_ns_ = from._impl_.io_wait_ns_;
1187 }
1188 if (cached_has_bits & 0x00000020u) {
1189 _this->_impl_.irq_ns_ = from._impl_.irq_ns_;
1190 }
1191 if (cached_has_bits & 0x00000040u) {
1192 _this->_impl_.softirq_ns_ = from._impl_.softirq_ns_;
1193 }
1194 if (cached_has_bits & 0x00000080u) {
1195 _this->_impl_.cpu_id_ = from._impl_.cpu_id_;
1196 }
1197 _this->_impl_._has_bits_[0] |= cached_has_bits;
1198 }
1199 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1200 }
1201
CopyFrom(const SysStats_CpuTimes & from)1202 void SysStats_CpuTimes::CopyFrom(const SysStats_CpuTimes& from) {
1203 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.CpuTimes)
1204 if (&from == this) return;
1205 Clear();
1206 MergeFrom(from);
1207 }
1208
IsInitialized() const1209 bool SysStats_CpuTimes::IsInitialized() const {
1210 return true;
1211 }
1212
InternalSwap(SysStats_CpuTimes * other)1213 void SysStats_CpuTimes::InternalSwap(SysStats_CpuTimes* other) {
1214 using std::swap;
1215 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1216 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1217 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1218 PROTOBUF_FIELD_OFFSET(SysStats_CpuTimes, _impl_.cpu_id_)
1219 + sizeof(SysStats_CpuTimes::_impl_.cpu_id_) // NOLINT
1220 - PROTOBUF_FIELD_OFFSET(SysStats_CpuTimes, _impl_.user_ns_)>(
1221 reinterpret_cast<char*>(&_impl_.user_ns_),
1222 reinterpret_cast<char*>(&other->_impl_.user_ns_));
1223 }
1224
GetTypeName() const1225 std::string SysStats_CpuTimes::GetTypeName() const {
1226 return "perfetto.protos.SysStats.CpuTimes";
1227 }
1228
1229
1230 // ===================================================================
1231
1232 class SysStats_InterruptCount::_Internal {
1233 public:
1234 using HasBits = decltype(std::declval<SysStats_InterruptCount>()._impl_._has_bits_);
set_has_irq(HasBits * has_bits)1235 static void set_has_irq(HasBits* has_bits) {
1236 (*has_bits)[0] |= 2u;
1237 }
set_has_count(HasBits * has_bits)1238 static void set_has_count(HasBits* has_bits) {
1239 (*has_bits)[0] |= 1u;
1240 }
1241 };
1242
SysStats_InterruptCount(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1243 SysStats_InterruptCount::SysStats_InterruptCount(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1244 bool is_message_owned)
1245 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1246 SharedCtor(arena, is_message_owned);
1247 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.InterruptCount)
1248 }
SysStats_InterruptCount(const SysStats_InterruptCount & from)1249 SysStats_InterruptCount::SysStats_InterruptCount(const SysStats_InterruptCount& from)
1250 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1251 SysStats_InterruptCount* const _this = this; (void)_this;
1252 new (&_impl_) Impl_{
1253 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1254 , /*decltype(_impl_._cached_size_)*/{}
1255 , decltype(_impl_.count_){}
1256 , decltype(_impl_.irq_){}};
1257
1258 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1259 ::memcpy(&_impl_.count_, &from._impl_.count_,
1260 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.irq_) -
1261 reinterpret_cast<char*>(&_impl_.count_)) + sizeof(_impl_.irq_));
1262 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.InterruptCount)
1263 }
1264
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1265 inline void SysStats_InterruptCount::SharedCtor(
1266 ::_pb::Arena* arena, bool is_message_owned) {
1267 (void)arena;
1268 (void)is_message_owned;
1269 new (&_impl_) Impl_{
1270 decltype(_impl_._has_bits_){}
1271 , /*decltype(_impl_._cached_size_)*/{}
1272 , decltype(_impl_.count_){::uint64_t{0u}}
1273 , decltype(_impl_.irq_){0}
1274 };
1275 }
1276
~SysStats_InterruptCount()1277 SysStats_InterruptCount::~SysStats_InterruptCount() {
1278 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.InterruptCount)
1279 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1280 (void)arena;
1281 return;
1282 }
1283 SharedDtor();
1284 }
1285
SharedDtor()1286 inline void SysStats_InterruptCount::SharedDtor() {
1287 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1288 }
1289
SetCachedSize(int size) const1290 void SysStats_InterruptCount::SetCachedSize(int size) const {
1291 _impl_._cached_size_.Set(size);
1292 }
1293
Clear()1294 void SysStats_InterruptCount::Clear() {
1295 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.InterruptCount)
1296 ::uint32_t cached_has_bits = 0;
1297 // Prevent compiler warnings about cached_has_bits being unused
1298 (void) cached_has_bits;
1299
1300 cached_has_bits = _impl_._has_bits_[0];
1301 if (cached_has_bits & 0x00000003u) {
1302 ::memset(&_impl_.count_, 0, static_cast<size_t>(
1303 reinterpret_cast<char*>(&_impl_.irq_) -
1304 reinterpret_cast<char*>(&_impl_.count_)) + sizeof(_impl_.irq_));
1305 }
1306 _impl_._has_bits_.Clear();
1307 _internal_metadata_.Clear<std::string>();
1308 }
1309
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1310 const char* SysStats_InterruptCount::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1311 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1312 _Internal::HasBits has_bits{};
1313 while (!ctx->Done(&ptr)) {
1314 ::uint32_t tag;
1315 ptr = ::_pbi::ReadTag(ptr, &tag);
1316 switch (tag >> 3) {
1317 // optional int32 irq = 1;
1318 case 1:
1319 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1320 _Internal::set_has_irq(&has_bits);
1321 _impl_.irq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1322 CHK_(ptr);
1323 } else {
1324 goto handle_unusual;
1325 }
1326 continue;
1327 // optional uint64 count = 2;
1328 case 2:
1329 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1330 _Internal::set_has_count(&has_bits);
1331 _impl_.count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1332 CHK_(ptr);
1333 } else {
1334 goto handle_unusual;
1335 }
1336 continue;
1337 default:
1338 goto handle_unusual;
1339 } // switch
1340 handle_unusual:
1341 if ((tag == 0) || ((tag & 7) == 4)) {
1342 CHK_(ptr);
1343 ctx->SetLastTag(tag);
1344 goto message_done;
1345 }
1346 ptr = UnknownFieldParse(
1347 tag,
1348 _internal_metadata_.mutable_unknown_fields<std::string>(),
1349 ptr, ctx);
1350 CHK_(ptr != nullptr);
1351 } // while
1352 message_done:
1353 _impl_._has_bits_.Or(has_bits);
1354 return ptr;
1355 failure:
1356 ptr = nullptr;
1357 goto message_done;
1358 #undef CHK_
1359 }
1360
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1361 ::uint8_t* SysStats_InterruptCount::_InternalSerialize(
1362 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1363 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.InterruptCount)
1364 ::uint32_t cached_has_bits = 0;
1365 (void) cached_has_bits;
1366
1367 cached_has_bits = _impl_._has_bits_[0];
1368 // optional int32 irq = 1;
1369 if (cached_has_bits & 0x00000002u) {
1370 target = stream->EnsureSpace(target);
1371 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_irq(), target);
1372 }
1373
1374 // optional uint64 count = 2;
1375 if (cached_has_bits & 0x00000001u) {
1376 target = stream->EnsureSpace(target);
1377 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_count(), target);
1378 }
1379
1380 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1381 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1382 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1383 }
1384 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.InterruptCount)
1385 return target;
1386 }
1387
ByteSizeLong() const1388 size_t SysStats_InterruptCount::ByteSizeLong() const {
1389 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.InterruptCount)
1390 size_t total_size = 0;
1391
1392 ::uint32_t cached_has_bits = 0;
1393 // Prevent compiler warnings about cached_has_bits being unused
1394 (void) cached_has_bits;
1395
1396 cached_has_bits = _impl_._has_bits_[0];
1397 if (cached_has_bits & 0x00000003u) {
1398 // optional uint64 count = 2;
1399 if (cached_has_bits & 0x00000001u) {
1400 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_count());
1401 }
1402
1403 // optional int32 irq = 1;
1404 if (cached_has_bits & 0x00000002u) {
1405 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_irq());
1406 }
1407
1408 }
1409 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1410 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1411 }
1412 int cached_size = ::_pbi::ToCachedSize(total_size);
1413 SetCachedSize(cached_size);
1414 return total_size;
1415 }
1416
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1417 void SysStats_InterruptCount::CheckTypeAndMergeFrom(
1418 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1419 MergeFrom(*::_pbi::DownCast<const SysStats_InterruptCount*>(
1420 &from));
1421 }
1422
MergeFrom(const SysStats_InterruptCount & from)1423 void SysStats_InterruptCount::MergeFrom(const SysStats_InterruptCount& from) {
1424 SysStats_InterruptCount* const _this = this;
1425 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.InterruptCount)
1426 GOOGLE_DCHECK_NE(&from, _this);
1427 ::uint32_t cached_has_bits = 0;
1428 (void) cached_has_bits;
1429
1430 cached_has_bits = from._impl_._has_bits_[0];
1431 if (cached_has_bits & 0x00000003u) {
1432 if (cached_has_bits & 0x00000001u) {
1433 _this->_impl_.count_ = from._impl_.count_;
1434 }
1435 if (cached_has_bits & 0x00000002u) {
1436 _this->_impl_.irq_ = from._impl_.irq_;
1437 }
1438 _this->_impl_._has_bits_[0] |= cached_has_bits;
1439 }
1440 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1441 }
1442
CopyFrom(const SysStats_InterruptCount & from)1443 void SysStats_InterruptCount::CopyFrom(const SysStats_InterruptCount& from) {
1444 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.InterruptCount)
1445 if (&from == this) return;
1446 Clear();
1447 MergeFrom(from);
1448 }
1449
IsInitialized() const1450 bool SysStats_InterruptCount::IsInitialized() const {
1451 return true;
1452 }
1453
InternalSwap(SysStats_InterruptCount * other)1454 void SysStats_InterruptCount::InternalSwap(SysStats_InterruptCount* other) {
1455 using std::swap;
1456 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1457 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1458 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1459 PROTOBUF_FIELD_OFFSET(SysStats_InterruptCount, _impl_.irq_)
1460 + sizeof(SysStats_InterruptCount::_impl_.irq_) // NOLINT
1461 - PROTOBUF_FIELD_OFFSET(SysStats_InterruptCount, _impl_.count_)>(
1462 reinterpret_cast<char*>(&_impl_.count_),
1463 reinterpret_cast<char*>(&other->_impl_.count_));
1464 }
1465
GetTypeName() const1466 std::string SysStats_InterruptCount::GetTypeName() const {
1467 return "perfetto.protos.SysStats.InterruptCount";
1468 }
1469
1470
1471 // ===================================================================
1472
1473 class SysStats_DevfreqValue::_Internal {
1474 public:
1475 using HasBits = decltype(std::declval<SysStats_DevfreqValue>()._impl_._has_bits_);
set_has_key(HasBits * has_bits)1476 static void set_has_key(HasBits* has_bits) {
1477 (*has_bits)[0] |= 1u;
1478 }
set_has_value(HasBits * has_bits)1479 static void set_has_value(HasBits* has_bits) {
1480 (*has_bits)[0] |= 2u;
1481 }
1482 };
1483
SysStats_DevfreqValue(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1484 SysStats_DevfreqValue::SysStats_DevfreqValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1485 bool is_message_owned)
1486 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1487 SharedCtor(arena, is_message_owned);
1488 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.DevfreqValue)
1489 }
SysStats_DevfreqValue(const SysStats_DevfreqValue & from)1490 SysStats_DevfreqValue::SysStats_DevfreqValue(const SysStats_DevfreqValue& from)
1491 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1492 SysStats_DevfreqValue* const _this = this; (void)_this;
1493 new (&_impl_) Impl_{
1494 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1495 , /*decltype(_impl_._cached_size_)*/{}
1496 , decltype(_impl_.key_){}
1497 , decltype(_impl_.value_){}};
1498
1499 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1500 _impl_.key_.InitDefault();
1501 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1502 _impl_.key_.Set("", GetArenaForAllocation());
1503 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1504 if (from._internal_has_key()) {
1505 _this->_impl_.key_.Set(from._internal_key(),
1506 _this->GetArenaForAllocation());
1507 }
1508 _this->_impl_.value_ = from._impl_.value_;
1509 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.DevfreqValue)
1510 }
1511
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1512 inline void SysStats_DevfreqValue::SharedCtor(
1513 ::_pb::Arena* arena, bool is_message_owned) {
1514 (void)arena;
1515 (void)is_message_owned;
1516 new (&_impl_) Impl_{
1517 decltype(_impl_._has_bits_){}
1518 , /*decltype(_impl_._cached_size_)*/{}
1519 , decltype(_impl_.key_){}
1520 , decltype(_impl_.value_){::uint64_t{0u}}
1521 };
1522 _impl_.key_.InitDefault();
1523 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1524 _impl_.key_.Set("", GetArenaForAllocation());
1525 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1526 }
1527
~SysStats_DevfreqValue()1528 SysStats_DevfreqValue::~SysStats_DevfreqValue() {
1529 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.DevfreqValue)
1530 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1531 (void)arena;
1532 return;
1533 }
1534 SharedDtor();
1535 }
1536
SharedDtor()1537 inline void SysStats_DevfreqValue::SharedDtor() {
1538 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1539 _impl_.key_.Destroy();
1540 }
1541
SetCachedSize(int size) const1542 void SysStats_DevfreqValue::SetCachedSize(int size) const {
1543 _impl_._cached_size_.Set(size);
1544 }
1545
Clear()1546 void SysStats_DevfreqValue::Clear() {
1547 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.DevfreqValue)
1548 ::uint32_t cached_has_bits = 0;
1549 // Prevent compiler warnings about cached_has_bits being unused
1550 (void) cached_has_bits;
1551
1552 cached_has_bits = _impl_._has_bits_[0];
1553 if (cached_has_bits & 0x00000001u) {
1554 _impl_.key_.ClearNonDefaultToEmpty();
1555 }
1556 _impl_.value_ = ::uint64_t{0u};
1557 _impl_._has_bits_.Clear();
1558 _internal_metadata_.Clear<std::string>();
1559 }
1560
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1561 const char* SysStats_DevfreqValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1562 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1563 _Internal::HasBits has_bits{};
1564 while (!ctx->Done(&ptr)) {
1565 ::uint32_t tag;
1566 ptr = ::_pbi::ReadTag(ptr, &tag);
1567 switch (tag >> 3) {
1568 // optional string key = 1;
1569 case 1:
1570 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1571 auto str = _internal_mutable_key();
1572 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1573 CHK_(ptr);
1574 } else {
1575 goto handle_unusual;
1576 }
1577 continue;
1578 // optional uint64 value = 2;
1579 case 2:
1580 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1581 _Internal::set_has_value(&has_bits);
1582 _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1583 CHK_(ptr);
1584 } else {
1585 goto handle_unusual;
1586 }
1587 continue;
1588 default:
1589 goto handle_unusual;
1590 } // switch
1591 handle_unusual:
1592 if ((tag == 0) || ((tag & 7) == 4)) {
1593 CHK_(ptr);
1594 ctx->SetLastTag(tag);
1595 goto message_done;
1596 }
1597 ptr = UnknownFieldParse(
1598 tag,
1599 _internal_metadata_.mutable_unknown_fields<std::string>(),
1600 ptr, ctx);
1601 CHK_(ptr != nullptr);
1602 } // while
1603 message_done:
1604 _impl_._has_bits_.Or(has_bits);
1605 return ptr;
1606 failure:
1607 ptr = nullptr;
1608 goto message_done;
1609 #undef CHK_
1610 }
1611
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1612 ::uint8_t* SysStats_DevfreqValue::_InternalSerialize(
1613 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1614 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.DevfreqValue)
1615 ::uint32_t cached_has_bits = 0;
1616 (void) cached_has_bits;
1617
1618 cached_has_bits = _impl_._has_bits_[0];
1619 // optional string key = 1;
1620 if (cached_has_bits & 0x00000001u) {
1621 target = stream->WriteStringMaybeAliased(
1622 1, this->_internal_key(), target);
1623 }
1624
1625 // optional uint64 value = 2;
1626 if (cached_has_bits & 0x00000002u) {
1627 target = stream->EnsureSpace(target);
1628 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_value(), target);
1629 }
1630
1631 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1632 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1633 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1634 }
1635 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.DevfreqValue)
1636 return target;
1637 }
1638
ByteSizeLong() const1639 size_t SysStats_DevfreqValue::ByteSizeLong() const {
1640 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.DevfreqValue)
1641 size_t total_size = 0;
1642
1643 ::uint32_t cached_has_bits = 0;
1644 // Prevent compiler warnings about cached_has_bits being unused
1645 (void) cached_has_bits;
1646
1647 cached_has_bits = _impl_._has_bits_[0];
1648 if (cached_has_bits & 0x00000003u) {
1649 // optional string key = 1;
1650 if (cached_has_bits & 0x00000001u) {
1651 total_size += 1 +
1652 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1653 this->_internal_key());
1654 }
1655
1656 // optional uint64 value = 2;
1657 if (cached_has_bits & 0x00000002u) {
1658 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_value());
1659 }
1660
1661 }
1662 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1663 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1664 }
1665 int cached_size = ::_pbi::ToCachedSize(total_size);
1666 SetCachedSize(cached_size);
1667 return total_size;
1668 }
1669
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1670 void SysStats_DevfreqValue::CheckTypeAndMergeFrom(
1671 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1672 MergeFrom(*::_pbi::DownCast<const SysStats_DevfreqValue*>(
1673 &from));
1674 }
1675
MergeFrom(const SysStats_DevfreqValue & from)1676 void SysStats_DevfreqValue::MergeFrom(const SysStats_DevfreqValue& from) {
1677 SysStats_DevfreqValue* const _this = this;
1678 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.DevfreqValue)
1679 GOOGLE_DCHECK_NE(&from, _this);
1680 ::uint32_t cached_has_bits = 0;
1681 (void) cached_has_bits;
1682
1683 cached_has_bits = from._impl_._has_bits_[0];
1684 if (cached_has_bits & 0x00000003u) {
1685 if (cached_has_bits & 0x00000001u) {
1686 _this->_internal_set_key(from._internal_key());
1687 }
1688 if (cached_has_bits & 0x00000002u) {
1689 _this->_impl_.value_ = from._impl_.value_;
1690 }
1691 _this->_impl_._has_bits_[0] |= cached_has_bits;
1692 }
1693 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1694 }
1695
CopyFrom(const SysStats_DevfreqValue & from)1696 void SysStats_DevfreqValue::CopyFrom(const SysStats_DevfreqValue& from) {
1697 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.DevfreqValue)
1698 if (&from == this) return;
1699 Clear();
1700 MergeFrom(from);
1701 }
1702
IsInitialized() const1703 bool SysStats_DevfreqValue::IsInitialized() const {
1704 return true;
1705 }
1706
InternalSwap(SysStats_DevfreqValue * other)1707 void SysStats_DevfreqValue::InternalSwap(SysStats_DevfreqValue* other) {
1708 using std::swap;
1709 auto* lhs_arena = GetArenaForAllocation();
1710 auto* rhs_arena = other->GetArenaForAllocation();
1711 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1712 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1713 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1714 &_impl_.key_, lhs_arena,
1715 &other->_impl_.key_, rhs_arena
1716 );
1717 swap(_impl_.value_, other->_impl_.value_);
1718 }
1719
GetTypeName() const1720 std::string SysStats_DevfreqValue::GetTypeName() const {
1721 return "perfetto.protos.SysStats.DevfreqValue";
1722 }
1723
1724
1725 // ===================================================================
1726
1727 class SysStats_BuddyInfo::_Internal {
1728 public:
1729 using HasBits = decltype(std::declval<SysStats_BuddyInfo>()._impl_._has_bits_);
set_has_node(HasBits * has_bits)1730 static void set_has_node(HasBits* has_bits) {
1731 (*has_bits)[0] |= 1u;
1732 }
set_has_zone(HasBits * has_bits)1733 static void set_has_zone(HasBits* has_bits) {
1734 (*has_bits)[0] |= 2u;
1735 }
1736 };
1737
SysStats_BuddyInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1738 SysStats_BuddyInfo::SysStats_BuddyInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1739 bool is_message_owned)
1740 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1741 SharedCtor(arena, is_message_owned);
1742 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.BuddyInfo)
1743 }
SysStats_BuddyInfo(const SysStats_BuddyInfo & from)1744 SysStats_BuddyInfo::SysStats_BuddyInfo(const SysStats_BuddyInfo& from)
1745 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1746 SysStats_BuddyInfo* const _this = this; (void)_this;
1747 new (&_impl_) Impl_{
1748 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1749 , /*decltype(_impl_._cached_size_)*/{}
1750 , decltype(_impl_.order_pages_){from._impl_.order_pages_}
1751 , decltype(_impl_.node_){}
1752 , decltype(_impl_.zone_){}};
1753
1754 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1755 _impl_.node_.InitDefault();
1756 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1757 _impl_.node_.Set("", GetArenaForAllocation());
1758 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1759 if (from._internal_has_node()) {
1760 _this->_impl_.node_.Set(from._internal_node(),
1761 _this->GetArenaForAllocation());
1762 }
1763 _impl_.zone_.InitDefault();
1764 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1765 _impl_.zone_.Set("", GetArenaForAllocation());
1766 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1767 if (from._internal_has_zone()) {
1768 _this->_impl_.zone_.Set(from._internal_zone(),
1769 _this->GetArenaForAllocation());
1770 }
1771 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.BuddyInfo)
1772 }
1773
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1774 inline void SysStats_BuddyInfo::SharedCtor(
1775 ::_pb::Arena* arena, bool is_message_owned) {
1776 (void)arena;
1777 (void)is_message_owned;
1778 new (&_impl_) Impl_{
1779 decltype(_impl_._has_bits_){}
1780 , /*decltype(_impl_._cached_size_)*/{}
1781 , decltype(_impl_.order_pages_){arena}
1782 , decltype(_impl_.node_){}
1783 , decltype(_impl_.zone_){}
1784 };
1785 _impl_.node_.InitDefault();
1786 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1787 _impl_.node_.Set("", GetArenaForAllocation());
1788 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1789 _impl_.zone_.InitDefault();
1790 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1791 _impl_.zone_.Set("", GetArenaForAllocation());
1792 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1793 }
1794
~SysStats_BuddyInfo()1795 SysStats_BuddyInfo::~SysStats_BuddyInfo() {
1796 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.BuddyInfo)
1797 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1798 (void)arena;
1799 return;
1800 }
1801 SharedDtor();
1802 }
1803
SharedDtor()1804 inline void SysStats_BuddyInfo::SharedDtor() {
1805 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1806 _impl_.order_pages_.~RepeatedField();
1807 _impl_.node_.Destroy();
1808 _impl_.zone_.Destroy();
1809 }
1810
SetCachedSize(int size) const1811 void SysStats_BuddyInfo::SetCachedSize(int size) const {
1812 _impl_._cached_size_.Set(size);
1813 }
1814
Clear()1815 void SysStats_BuddyInfo::Clear() {
1816 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.BuddyInfo)
1817 ::uint32_t cached_has_bits = 0;
1818 // Prevent compiler warnings about cached_has_bits being unused
1819 (void) cached_has_bits;
1820
1821 _impl_.order_pages_.Clear();
1822 cached_has_bits = _impl_._has_bits_[0];
1823 if (cached_has_bits & 0x00000003u) {
1824 if (cached_has_bits & 0x00000001u) {
1825 _impl_.node_.ClearNonDefaultToEmpty();
1826 }
1827 if (cached_has_bits & 0x00000002u) {
1828 _impl_.zone_.ClearNonDefaultToEmpty();
1829 }
1830 }
1831 _impl_._has_bits_.Clear();
1832 _internal_metadata_.Clear<std::string>();
1833 }
1834
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1835 const char* SysStats_BuddyInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1836 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1837 _Internal::HasBits has_bits{};
1838 while (!ctx->Done(&ptr)) {
1839 ::uint32_t tag;
1840 ptr = ::_pbi::ReadTag(ptr, &tag);
1841 switch (tag >> 3) {
1842 // optional string node = 1;
1843 case 1:
1844 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1845 auto str = _internal_mutable_node();
1846 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1847 CHK_(ptr);
1848 } else {
1849 goto handle_unusual;
1850 }
1851 continue;
1852 // optional string zone = 2;
1853 case 2:
1854 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1855 auto str = _internal_mutable_zone();
1856 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1857 CHK_(ptr);
1858 } else {
1859 goto handle_unusual;
1860 }
1861 continue;
1862 // repeated uint32 order_pages = 3;
1863 case 3:
1864 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1865 ptr -= 1;
1866 do {
1867 ptr += 1;
1868 _internal_add_order_pages(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
1869 CHK_(ptr);
1870 if (!ctx->DataAvailable(ptr)) break;
1871 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
1872 } else if (static_cast<::uint8_t>(tag) == 26) {
1873 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_order_pages(), ptr, ctx);
1874 CHK_(ptr);
1875 } else {
1876 goto handle_unusual;
1877 }
1878 continue;
1879 default:
1880 goto handle_unusual;
1881 } // switch
1882 handle_unusual:
1883 if ((tag == 0) || ((tag & 7) == 4)) {
1884 CHK_(ptr);
1885 ctx->SetLastTag(tag);
1886 goto message_done;
1887 }
1888 ptr = UnknownFieldParse(
1889 tag,
1890 _internal_metadata_.mutable_unknown_fields<std::string>(),
1891 ptr, ctx);
1892 CHK_(ptr != nullptr);
1893 } // while
1894 message_done:
1895 _impl_._has_bits_.Or(has_bits);
1896 return ptr;
1897 failure:
1898 ptr = nullptr;
1899 goto message_done;
1900 #undef CHK_
1901 }
1902
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1903 ::uint8_t* SysStats_BuddyInfo::_InternalSerialize(
1904 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1905 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.BuddyInfo)
1906 ::uint32_t cached_has_bits = 0;
1907 (void) cached_has_bits;
1908
1909 cached_has_bits = _impl_._has_bits_[0];
1910 // optional string node = 1;
1911 if (cached_has_bits & 0x00000001u) {
1912 target = stream->WriteStringMaybeAliased(
1913 1, this->_internal_node(), target);
1914 }
1915
1916 // optional string zone = 2;
1917 if (cached_has_bits & 0x00000002u) {
1918 target = stream->WriteStringMaybeAliased(
1919 2, this->_internal_zone(), target);
1920 }
1921
1922 // repeated uint32 order_pages = 3;
1923 for (int i = 0, n = this->_internal_order_pages_size(); i < n; i++) {
1924 target = stream->EnsureSpace(target);
1925 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_order_pages(i), target);
1926 }
1927
1928 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1929 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1930 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1931 }
1932 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.BuddyInfo)
1933 return target;
1934 }
1935
ByteSizeLong() const1936 size_t SysStats_BuddyInfo::ByteSizeLong() const {
1937 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.BuddyInfo)
1938 size_t total_size = 0;
1939
1940 ::uint32_t cached_has_bits = 0;
1941 // Prevent compiler warnings about cached_has_bits being unused
1942 (void) cached_has_bits;
1943
1944 // repeated uint32 order_pages = 3;
1945 {
1946 size_t data_size = ::_pbi::WireFormatLite::
1947 UInt32Size(this->_impl_.order_pages_);
1948 total_size += 1 *
1949 ::_pbi::FromIntSize(this->_internal_order_pages_size());
1950 total_size += data_size;
1951 }
1952
1953 cached_has_bits = _impl_._has_bits_[0];
1954 if (cached_has_bits & 0x00000003u) {
1955 // optional string node = 1;
1956 if (cached_has_bits & 0x00000001u) {
1957 total_size += 1 +
1958 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1959 this->_internal_node());
1960 }
1961
1962 // optional string zone = 2;
1963 if (cached_has_bits & 0x00000002u) {
1964 total_size += 1 +
1965 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1966 this->_internal_zone());
1967 }
1968
1969 }
1970 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1971 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1972 }
1973 int cached_size = ::_pbi::ToCachedSize(total_size);
1974 SetCachedSize(cached_size);
1975 return total_size;
1976 }
1977
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1978 void SysStats_BuddyInfo::CheckTypeAndMergeFrom(
1979 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1980 MergeFrom(*::_pbi::DownCast<const SysStats_BuddyInfo*>(
1981 &from));
1982 }
1983
MergeFrom(const SysStats_BuddyInfo & from)1984 void SysStats_BuddyInfo::MergeFrom(const SysStats_BuddyInfo& from) {
1985 SysStats_BuddyInfo* const _this = this;
1986 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.BuddyInfo)
1987 GOOGLE_DCHECK_NE(&from, _this);
1988 ::uint32_t cached_has_bits = 0;
1989 (void) cached_has_bits;
1990
1991 _this->_impl_.order_pages_.MergeFrom(from._impl_.order_pages_);
1992 cached_has_bits = from._impl_._has_bits_[0];
1993 if (cached_has_bits & 0x00000003u) {
1994 if (cached_has_bits & 0x00000001u) {
1995 _this->_internal_set_node(from._internal_node());
1996 }
1997 if (cached_has_bits & 0x00000002u) {
1998 _this->_internal_set_zone(from._internal_zone());
1999 }
2000 }
2001 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2002 }
2003
CopyFrom(const SysStats_BuddyInfo & from)2004 void SysStats_BuddyInfo::CopyFrom(const SysStats_BuddyInfo& from) {
2005 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.BuddyInfo)
2006 if (&from == this) return;
2007 Clear();
2008 MergeFrom(from);
2009 }
2010
IsInitialized() const2011 bool SysStats_BuddyInfo::IsInitialized() const {
2012 return true;
2013 }
2014
InternalSwap(SysStats_BuddyInfo * other)2015 void SysStats_BuddyInfo::InternalSwap(SysStats_BuddyInfo* other) {
2016 using std::swap;
2017 auto* lhs_arena = GetArenaForAllocation();
2018 auto* rhs_arena = other->GetArenaForAllocation();
2019 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2020 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2021 _impl_.order_pages_.InternalSwap(&other->_impl_.order_pages_);
2022 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2023 &_impl_.node_, lhs_arena,
2024 &other->_impl_.node_, rhs_arena
2025 );
2026 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2027 &_impl_.zone_, lhs_arena,
2028 &other->_impl_.zone_, rhs_arena
2029 );
2030 }
2031
GetTypeName() const2032 std::string SysStats_BuddyInfo::GetTypeName() const {
2033 return "perfetto.protos.SysStats.BuddyInfo";
2034 }
2035
2036
2037 // ===================================================================
2038
2039 class SysStats_DiskStat::_Internal {
2040 public:
2041 using HasBits = decltype(std::declval<SysStats_DiskStat>()._impl_._has_bits_);
set_has_device_name(HasBits * has_bits)2042 static void set_has_device_name(HasBits* has_bits) {
2043 (*has_bits)[0] |= 1u;
2044 }
set_has_read_sectors(HasBits * has_bits)2045 static void set_has_read_sectors(HasBits* has_bits) {
2046 (*has_bits)[0] |= 2u;
2047 }
set_has_read_time_ms(HasBits * has_bits)2048 static void set_has_read_time_ms(HasBits* has_bits) {
2049 (*has_bits)[0] |= 4u;
2050 }
set_has_write_sectors(HasBits * has_bits)2051 static void set_has_write_sectors(HasBits* has_bits) {
2052 (*has_bits)[0] |= 8u;
2053 }
set_has_write_time_ms(HasBits * has_bits)2054 static void set_has_write_time_ms(HasBits* has_bits) {
2055 (*has_bits)[0] |= 16u;
2056 }
set_has_discard_sectors(HasBits * has_bits)2057 static void set_has_discard_sectors(HasBits* has_bits) {
2058 (*has_bits)[0] |= 32u;
2059 }
set_has_discard_time_ms(HasBits * has_bits)2060 static void set_has_discard_time_ms(HasBits* has_bits) {
2061 (*has_bits)[0] |= 64u;
2062 }
set_has_flush_count(HasBits * has_bits)2063 static void set_has_flush_count(HasBits* has_bits) {
2064 (*has_bits)[0] |= 128u;
2065 }
set_has_flush_time_ms(HasBits * has_bits)2066 static void set_has_flush_time_ms(HasBits* has_bits) {
2067 (*has_bits)[0] |= 256u;
2068 }
2069 };
2070
SysStats_DiskStat(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2071 SysStats_DiskStat::SysStats_DiskStat(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2072 bool is_message_owned)
2073 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2074 SharedCtor(arena, is_message_owned);
2075 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.DiskStat)
2076 }
SysStats_DiskStat(const SysStats_DiskStat & from)2077 SysStats_DiskStat::SysStats_DiskStat(const SysStats_DiskStat& from)
2078 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2079 SysStats_DiskStat* const _this = this; (void)_this;
2080 new (&_impl_) Impl_{
2081 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2082 , /*decltype(_impl_._cached_size_)*/{}
2083 , decltype(_impl_.device_name_){}
2084 , decltype(_impl_.read_sectors_){}
2085 , decltype(_impl_.read_time_ms_){}
2086 , decltype(_impl_.write_sectors_){}
2087 , decltype(_impl_.write_time_ms_){}
2088 , decltype(_impl_.discard_sectors_){}
2089 , decltype(_impl_.discard_time_ms_){}
2090 , decltype(_impl_.flush_count_){}
2091 , decltype(_impl_.flush_time_ms_){}};
2092
2093 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2094 _impl_.device_name_.InitDefault();
2095 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2096 _impl_.device_name_.Set("", GetArenaForAllocation());
2097 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2098 if (from._internal_has_device_name()) {
2099 _this->_impl_.device_name_.Set(from._internal_device_name(),
2100 _this->GetArenaForAllocation());
2101 }
2102 ::memcpy(&_impl_.read_sectors_, &from._impl_.read_sectors_,
2103 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.flush_time_ms_) -
2104 reinterpret_cast<char*>(&_impl_.read_sectors_)) + sizeof(_impl_.flush_time_ms_));
2105 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.DiskStat)
2106 }
2107
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2108 inline void SysStats_DiskStat::SharedCtor(
2109 ::_pb::Arena* arena, bool is_message_owned) {
2110 (void)arena;
2111 (void)is_message_owned;
2112 new (&_impl_) Impl_{
2113 decltype(_impl_._has_bits_){}
2114 , /*decltype(_impl_._cached_size_)*/{}
2115 , decltype(_impl_.device_name_){}
2116 , decltype(_impl_.read_sectors_){::uint64_t{0u}}
2117 , decltype(_impl_.read_time_ms_){::uint64_t{0u}}
2118 , decltype(_impl_.write_sectors_){::uint64_t{0u}}
2119 , decltype(_impl_.write_time_ms_){::uint64_t{0u}}
2120 , decltype(_impl_.discard_sectors_){::uint64_t{0u}}
2121 , decltype(_impl_.discard_time_ms_){::uint64_t{0u}}
2122 , decltype(_impl_.flush_count_){::uint64_t{0u}}
2123 , decltype(_impl_.flush_time_ms_){::uint64_t{0u}}
2124 };
2125 _impl_.device_name_.InitDefault();
2126 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2127 _impl_.device_name_.Set("", GetArenaForAllocation());
2128 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2129 }
2130
~SysStats_DiskStat()2131 SysStats_DiskStat::~SysStats_DiskStat() {
2132 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.DiskStat)
2133 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2134 (void)arena;
2135 return;
2136 }
2137 SharedDtor();
2138 }
2139
SharedDtor()2140 inline void SysStats_DiskStat::SharedDtor() {
2141 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2142 _impl_.device_name_.Destroy();
2143 }
2144
SetCachedSize(int size) const2145 void SysStats_DiskStat::SetCachedSize(int size) const {
2146 _impl_._cached_size_.Set(size);
2147 }
2148
Clear()2149 void SysStats_DiskStat::Clear() {
2150 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.DiskStat)
2151 ::uint32_t cached_has_bits = 0;
2152 // Prevent compiler warnings about cached_has_bits being unused
2153 (void) cached_has_bits;
2154
2155 cached_has_bits = _impl_._has_bits_[0];
2156 if (cached_has_bits & 0x00000001u) {
2157 _impl_.device_name_.ClearNonDefaultToEmpty();
2158 }
2159 if (cached_has_bits & 0x000000feu) {
2160 ::memset(&_impl_.read_sectors_, 0, static_cast<size_t>(
2161 reinterpret_cast<char*>(&_impl_.flush_count_) -
2162 reinterpret_cast<char*>(&_impl_.read_sectors_)) + sizeof(_impl_.flush_count_));
2163 }
2164 _impl_.flush_time_ms_ = ::uint64_t{0u};
2165 _impl_._has_bits_.Clear();
2166 _internal_metadata_.Clear<std::string>();
2167 }
2168
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2169 const char* SysStats_DiskStat::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2170 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2171 _Internal::HasBits has_bits{};
2172 while (!ctx->Done(&ptr)) {
2173 ::uint32_t tag;
2174 ptr = ::_pbi::ReadTag(ptr, &tag);
2175 switch (tag >> 3) {
2176 // optional string device_name = 1;
2177 case 1:
2178 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2179 auto str = _internal_mutable_device_name();
2180 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2181 CHK_(ptr);
2182 } else {
2183 goto handle_unusual;
2184 }
2185 continue;
2186 // optional uint64 read_sectors = 2;
2187 case 2:
2188 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2189 _Internal::set_has_read_sectors(&has_bits);
2190 _impl_.read_sectors_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2191 CHK_(ptr);
2192 } else {
2193 goto handle_unusual;
2194 }
2195 continue;
2196 // optional uint64 read_time_ms = 3;
2197 case 3:
2198 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2199 _Internal::set_has_read_time_ms(&has_bits);
2200 _impl_.read_time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2201 CHK_(ptr);
2202 } else {
2203 goto handle_unusual;
2204 }
2205 continue;
2206 // optional uint64 write_sectors = 4;
2207 case 4:
2208 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2209 _Internal::set_has_write_sectors(&has_bits);
2210 _impl_.write_sectors_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2211 CHK_(ptr);
2212 } else {
2213 goto handle_unusual;
2214 }
2215 continue;
2216 // optional uint64 write_time_ms = 5;
2217 case 5:
2218 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
2219 _Internal::set_has_write_time_ms(&has_bits);
2220 _impl_.write_time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2221 CHK_(ptr);
2222 } else {
2223 goto handle_unusual;
2224 }
2225 continue;
2226 // optional uint64 discard_sectors = 6;
2227 case 6:
2228 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2229 _Internal::set_has_discard_sectors(&has_bits);
2230 _impl_.discard_sectors_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2231 CHK_(ptr);
2232 } else {
2233 goto handle_unusual;
2234 }
2235 continue;
2236 // optional uint64 discard_time_ms = 7;
2237 case 7:
2238 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2239 _Internal::set_has_discard_time_ms(&has_bits);
2240 _impl_.discard_time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2241 CHK_(ptr);
2242 } else {
2243 goto handle_unusual;
2244 }
2245 continue;
2246 // optional uint64 flush_count = 8;
2247 case 8:
2248 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
2249 _Internal::set_has_flush_count(&has_bits);
2250 _impl_.flush_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2251 CHK_(ptr);
2252 } else {
2253 goto handle_unusual;
2254 }
2255 continue;
2256 // optional uint64 flush_time_ms = 9;
2257 case 9:
2258 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2259 _Internal::set_has_flush_time_ms(&has_bits);
2260 _impl_.flush_time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2261 CHK_(ptr);
2262 } else {
2263 goto handle_unusual;
2264 }
2265 continue;
2266 default:
2267 goto handle_unusual;
2268 } // switch
2269 handle_unusual:
2270 if ((tag == 0) || ((tag & 7) == 4)) {
2271 CHK_(ptr);
2272 ctx->SetLastTag(tag);
2273 goto message_done;
2274 }
2275 ptr = UnknownFieldParse(
2276 tag,
2277 _internal_metadata_.mutable_unknown_fields<std::string>(),
2278 ptr, ctx);
2279 CHK_(ptr != nullptr);
2280 } // while
2281 message_done:
2282 _impl_._has_bits_.Or(has_bits);
2283 return ptr;
2284 failure:
2285 ptr = nullptr;
2286 goto message_done;
2287 #undef CHK_
2288 }
2289
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2290 ::uint8_t* SysStats_DiskStat::_InternalSerialize(
2291 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2292 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.DiskStat)
2293 ::uint32_t cached_has_bits = 0;
2294 (void) cached_has_bits;
2295
2296 cached_has_bits = _impl_._has_bits_[0];
2297 // optional string device_name = 1;
2298 if (cached_has_bits & 0x00000001u) {
2299 target = stream->WriteStringMaybeAliased(
2300 1, this->_internal_device_name(), target);
2301 }
2302
2303 // optional uint64 read_sectors = 2;
2304 if (cached_has_bits & 0x00000002u) {
2305 target = stream->EnsureSpace(target);
2306 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_read_sectors(), target);
2307 }
2308
2309 // optional uint64 read_time_ms = 3;
2310 if (cached_has_bits & 0x00000004u) {
2311 target = stream->EnsureSpace(target);
2312 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_read_time_ms(), target);
2313 }
2314
2315 // optional uint64 write_sectors = 4;
2316 if (cached_has_bits & 0x00000008u) {
2317 target = stream->EnsureSpace(target);
2318 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_write_sectors(), target);
2319 }
2320
2321 // optional uint64 write_time_ms = 5;
2322 if (cached_has_bits & 0x00000010u) {
2323 target = stream->EnsureSpace(target);
2324 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_write_time_ms(), target);
2325 }
2326
2327 // optional uint64 discard_sectors = 6;
2328 if (cached_has_bits & 0x00000020u) {
2329 target = stream->EnsureSpace(target);
2330 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_discard_sectors(), target);
2331 }
2332
2333 // optional uint64 discard_time_ms = 7;
2334 if (cached_has_bits & 0x00000040u) {
2335 target = stream->EnsureSpace(target);
2336 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_discard_time_ms(), target);
2337 }
2338
2339 // optional uint64 flush_count = 8;
2340 if (cached_has_bits & 0x00000080u) {
2341 target = stream->EnsureSpace(target);
2342 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_flush_count(), target);
2343 }
2344
2345 // optional uint64 flush_time_ms = 9;
2346 if (cached_has_bits & 0x00000100u) {
2347 target = stream->EnsureSpace(target);
2348 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(9, this->_internal_flush_time_ms(), target);
2349 }
2350
2351 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2352 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2353 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2354 }
2355 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.DiskStat)
2356 return target;
2357 }
2358
ByteSizeLong() const2359 size_t SysStats_DiskStat::ByteSizeLong() const {
2360 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.DiskStat)
2361 size_t total_size = 0;
2362
2363 ::uint32_t cached_has_bits = 0;
2364 // Prevent compiler warnings about cached_has_bits being unused
2365 (void) cached_has_bits;
2366
2367 cached_has_bits = _impl_._has_bits_[0];
2368 if (cached_has_bits & 0x000000ffu) {
2369 // optional string device_name = 1;
2370 if (cached_has_bits & 0x00000001u) {
2371 total_size += 1 +
2372 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2373 this->_internal_device_name());
2374 }
2375
2376 // optional uint64 read_sectors = 2;
2377 if (cached_has_bits & 0x00000002u) {
2378 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_read_sectors());
2379 }
2380
2381 // optional uint64 read_time_ms = 3;
2382 if (cached_has_bits & 0x00000004u) {
2383 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_read_time_ms());
2384 }
2385
2386 // optional uint64 write_sectors = 4;
2387 if (cached_has_bits & 0x00000008u) {
2388 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_write_sectors());
2389 }
2390
2391 // optional uint64 write_time_ms = 5;
2392 if (cached_has_bits & 0x00000010u) {
2393 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_write_time_ms());
2394 }
2395
2396 // optional uint64 discard_sectors = 6;
2397 if (cached_has_bits & 0x00000020u) {
2398 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_discard_sectors());
2399 }
2400
2401 // optional uint64 discard_time_ms = 7;
2402 if (cached_has_bits & 0x00000040u) {
2403 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_discard_time_ms());
2404 }
2405
2406 // optional uint64 flush_count = 8;
2407 if (cached_has_bits & 0x00000080u) {
2408 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_flush_count());
2409 }
2410
2411 }
2412 // optional uint64 flush_time_ms = 9;
2413 if (cached_has_bits & 0x00000100u) {
2414 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_flush_time_ms());
2415 }
2416
2417 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2418 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2419 }
2420 int cached_size = ::_pbi::ToCachedSize(total_size);
2421 SetCachedSize(cached_size);
2422 return total_size;
2423 }
2424
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2425 void SysStats_DiskStat::CheckTypeAndMergeFrom(
2426 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2427 MergeFrom(*::_pbi::DownCast<const SysStats_DiskStat*>(
2428 &from));
2429 }
2430
MergeFrom(const SysStats_DiskStat & from)2431 void SysStats_DiskStat::MergeFrom(const SysStats_DiskStat& from) {
2432 SysStats_DiskStat* const _this = this;
2433 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.DiskStat)
2434 GOOGLE_DCHECK_NE(&from, _this);
2435 ::uint32_t cached_has_bits = 0;
2436 (void) cached_has_bits;
2437
2438 cached_has_bits = from._impl_._has_bits_[0];
2439 if (cached_has_bits & 0x000000ffu) {
2440 if (cached_has_bits & 0x00000001u) {
2441 _this->_internal_set_device_name(from._internal_device_name());
2442 }
2443 if (cached_has_bits & 0x00000002u) {
2444 _this->_impl_.read_sectors_ = from._impl_.read_sectors_;
2445 }
2446 if (cached_has_bits & 0x00000004u) {
2447 _this->_impl_.read_time_ms_ = from._impl_.read_time_ms_;
2448 }
2449 if (cached_has_bits & 0x00000008u) {
2450 _this->_impl_.write_sectors_ = from._impl_.write_sectors_;
2451 }
2452 if (cached_has_bits & 0x00000010u) {
2453 _this->_impl_.write_time_ms_ = from._impl_.write_time_ms_;
2454 }
2455 if (cached_has_bits & 0x00000020u) {
2456 _this->_impl_.discard_sectors_ = from._impl_.discard_sectors_;
2457 }
2458 if (cached_has_bits & 0x00000040u) {
2459 _this->_impl_.discard_time_ms_ = from._impl_.discard_time_ms_;
2460 }
2461 if (cached_has_bits & 0x00000080u) {
2462 _this->_impl_.flush_count_ = from._impl_.flush_count_;
2463 }
2464 _this->_impl_._has_bits_[0] |= cached_has_bits;
2465 }
2466 if (cached_has_bits & 0x00000100u) {
2467 _this->_internal_set_flush_time_ms(from._internal_flush_time_ms());
2468 }
2469 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2470 }
2471
CopyFrom(const SysStats_DiskStat & from)2472 void SysStats_DiskStat::CopyFrom(const SysStats_DiskStat& from) {
2473 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.DiskStat)
2474 if (&from == this) return;
2475 Clear();
2476 MergeFrom(from);
2477 }
2478
IsInitialized() const2479 bool SysStats_DiskStat::IsInitialized() const {
2480 return true;
2481 }
2482
InternalSwap(SysStats_DiskStat * other)2483 void SysStats_DiskStat::InternalSwap(SysStats_DiskStat* other) {
2484 using std::swap;
2485 auto* lhs_arena = GetArenaForAllocation();
2486 auto* rhs_arena = other->GetArenaForAllocation();
2487 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2488 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2489 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2490 &_impl_.device_name_, lhs_arena,
2491 &other->_impl_.device_name_, rhs_arena
2492 );
2493 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2494 PROTOBUF_FIELD_OFFSET(SysStats_DiskStat, _impl_.flush_time_ms_)
2495 + sizeof(SysStats_DiskStat::_impl_.flush_time_ms_) // NOLINT
2496 - PROTOBUF_FIELD_OFFSET(SysStats_DiskStat, _impl_.read_sectors_)>(
2497 reinterpret_cast<char*>(&_impl_.read_sectors_),
2498 reinterpret_cast<char*>(&other->_impl_.read_sectors_));
2499 }
2500
GetTypeName() const2501 std::string SysStats_DiskStat::GetTypeName() const {
2502 return "perfetto.protos.SysStats.DiskStat";
2503 }
2504
2505
2506 // ===================================================================
2507
2508 class SysStats_PsiSample::_Internal {
2509 public:
2510 using HasBits = decltype(std::declval<SysStats_PsiSample>()._impl_._has_bits_);
set_has_resource(HasBits * has_bits)2511 static void set_has_resource(HasBits* has_bits) {
2512 (*has_bits)[0] |= 2u;
2513 }
set_has_total_ns(HasBits * has_bits)2514 static void set_has_total_ns(HasBits* has_bits) {
2515 (*has_bits)[0] |= 1u;
2516 }
2517 };
2518
SysStats_PsiSample(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2519 SysStats_PsiSample::SysStats_PsiSample(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2520 bool is_message_owned)
2521 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2522 SharedCtor(arena, is_message_owned);
2523 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.PsiSample)
2524 }
SysStats_PsiSample(const SysStats_PsiSample & from)2525 SysStats_PsiSample::SysStats_PsiSample(const SysStats_PsiSample& from)
2526 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2527 SysStats_PsiSample* const _this = this; (void)_this;
2528 new (&_impl_) Impl_{
2529 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2530 , /*decltype(_impl_._cached_size_)*/{}
2531 , decltype(_impl_.total_ns_){}
2532 , decltype(_impl_.resource_){}};
2533
2534 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2535 ::memcpy(&_impl_.total_ns_, &from._impl_.total_ns_,
2536 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.resource_) -
2537 reinterpret_cast<char*>(&_impl_.total_ns_)) + sizeof(_impl_.resource_));
2538 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.PsiSample)
2539 }
2540
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2541 inline void SysStats_PsiSample::SharedCtor(
2542 ::_pb::Arena* arena, bool is_message_owned) {
2543 (void)arena;
2544 (void)is_message_owned;
2545 new (&_impl_) Impl_{
2546 decltype(_impl_._has_bits_){}
2547 , /*decltype(_impl_._cached_size_)*/{}
2548 , decltype(_impl_.total_ns_){::uint64_t{0u}}
2549 , decltype(_impl_.resource_){0}
2550 };
2551 }
2552
~SysStats_PsiSample()2553 SysStats_PsiSample::~SysStats_PsiSample() {
2554 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.PsiSample)
2555 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2556 (void)arena;
2557 return;
2558 }
2559 SharedDtor();
2560 }
2561
SharedDtor()2562 inline void SysStats_PsiSample::SharedDtor() {
2563 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2564 }
2565
SetCachedSize(int size) const2566 void SysStats_PsiSample::SetCachedSize(int size) const {
2567 _impl_._cached_size_.Set(size);
2568 }
2569
Clear()2570 void SysStats_PsiSample::Clear() {
2571 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.PsiSample)
2572 ::uint32_t cached_has_bits = 0;
2573 // Prevent compiler warnings about cached_has_bits being unused
2574 (void) cached_has_bits;
2575
2576 cached_has_bits = _impl_._has_bits_[0];
2577 if (cached_has_bits & 0x00000003u) {
2578 ::memset(&_impl_.total_ns_, 0, static_cast<size_t>(
2579 reinterpret_cast<char*>(&_impl_.resource_) -
2580 reinterpret_cast<char*>(&_impl_.total_ns_)) + sizeof(_impl_.resource_));
2581 }
2582 _impl_._has_bits_.Clear();
2583 _internal_metadata_.Clear<std::string>();
2584 }
2585
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2586 const char* SysStats_PsiSample::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2587 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2588 _Internal::HasBits has_bits{};
2589 while (!ctx->Done(&ptr)) {
2590 ::uint32_t tag;
2591 ptr = ::_pbi::ReadTag(ptr, &tag);
2592 switch (tag >> 3) {
2593 // optional .perfetto.protos.SysStats.PsiSample.PsiResource resource = 1;
2594 case 1:
2595 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2596 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2597 CHK_(ptr);
2598 if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::SysStats_PsiSample_PsiResource_IsValid(val))) {
2599 _internal_set_resource(static_cast<::perfetto::protos::SysStats_PsiSample_PsiResource>(val));
2600 } else {
2601 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
2602 }
2603 } else {
2604 goto handle_unusual;
2605 }
2606 continue;
2607 // optional uint64 total_ns = 2;
2608 case 2:
2609 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2610 _Internal::set_has_total_ns(&has_bits);
2611 _impl_.total_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2612 CHK_(ptr);
2613 } else {
2614 goto handle_unusual;
2615 }
2616 continue;
2617 default:
2618 goto handle_unusual;
2619 } // switch
2620 handle_unusual:
2621 if ((tag == 0) || ((tag & 7) == 4)) {
2622 CHK_(ptr);
2623 ctx->SetLastTag(tag);
2624 goto message_done;
2625 }
2626 ptr = UnknownFieldParse(
2627 tag,
2628 _internal_metadata_.mutable_unknown_fields<std::string>(),
2629 ptr, ctx);
2630 CHK_(ptr != nullptr);
2631 } // while
2632 message_done:
2633 _impl_._has_bits_.Or(has_bits);
2634 return ptr;
2635 failure:
2636 ptr = nullptr;
2637 goto message_done;
2638 #undef CHK_
2639 }
2640
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2641 ::uint8_t* SysStats_PsiSample::_InternalSerialize(
2642 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2643 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.PsiSample)
2644 ::uint32_t cached_has_bits = 0;
2645 (void) cached_has_bits;
2646
2647 cached_has_bits = _impl_._has_bits_[0];
2648 // optional .perfetto.protos.SysStats.PsiSample.PsiResource resource = 1;
2649 if (cached_has_bits & 0x00000002u) {
2650 target = stream->EnsureSpace(target);
2651 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2652 1, this->_internal_resource(), target);
2653 }
2654
2655 // optional uint64 total_ns = 2;
2656 if (cached_has_bits & 0x00000001u) {
2657 target = stream->EnsureSpace(target);
2658 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_total_ns(), target);
2659 }
2660
2661 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2662 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2663 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2664 }
2665 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.PsiSample)
2666 return target;
2667 }
2668
ByteSizeLong() const2669 size_t SysStats_PsiSample::ByteSizeLong() const {
2670 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.PsiSample)
2671 size_t total_size = 0;
2672
2673 ::uint32_t cached_has_bits = 0;
2674 // Prevent compiler warnings about cached_has_bits being unused
2675 (void) cached_has_bits;
2676
2677 cached_has_bits = _impl_._has_bits_[0];
2678 if (cached_has_bits & 0x00000003u) {
2679 // optional uint64 total_ns = 2;
2680 if (cached_has_bits & 0x00000001u) {
2681 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_total_ns());
2682 }
2683
2684 // optional .perfetto.protos.SysStats.PsiSample.PsiResource resource = 1;
2685 if (cached_has_bits & 0x00000002u) {
2686 total_size += 1 +
2687 ::_pbi::WireFormatLite::EnumSize(this->_internal_resource());
2688 }
2689
2690 }
2691 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2692 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2693 }
2694 int cached_size = ::_pbi::ToCachedSize(total_size);
2695 SetCachedSize(cached_size);
2696 return total_size;
2697 }
2698
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2699 void SysStats_PsiSample::CheckTypeAndMergeFrom(
2700 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2701 MergeFrom(*::_pbi::DownCast<const SysStats_PsiSample*>(
2702 &from));
2703 }
2704
MergeFrom(const SysStats_PsiSample & from)2705 void SysStats_PsiSample::MergeFrom(const SysStats_PsiSample& from) {
2706 SysStats_PsiSample* const _this = this;
2707 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.PsiSample)
2708 GOOGLE_DCHECK_NE(&from, _this);
2709 ::uint32_t cached_has_bits = 0;
2710 (void) cached_has_bits;
2711
2712 cached_has_bits = from._impl_._has_bits_[0];
2713 if (cached_has_bits & 0x00000003u) {
2714 if (cached_has_bits & 0x00000001u) {
2715 _this->_impl_.total_ns_ = from._impl_.total_ns_;
2716 }
2717 if (cached_has_bits & 0x00000002u) {
2718 _this->_impl_.resource_ = from._impl_.resource_;
2719 }
2720 _this->_impl_._has_bits_[0] |= cached_has_bits;
2721 }
2722 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2723 }
2724
CopyFrom(const SysStats_PsiSample & from)2725 void SysStats_PsiSample::CopyFrom(const SysStats_PsiSample& from) {
2726 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.PsiSample)
2727 if (&from == this) return;
2728 Clear();
2729 MergeFrom(from);
2730 }
2731
IsInitialized() const2732 bool SysStats_PsiSample::IsInitialized() const {
2733 return true;
2734 }
2735
InternalSwap(SysStats_PsiSample * other)2736 void SysStats_PsiSample::InternalSwap(SysStats_PsiSample* other) {
2737 using std::swap;
2738 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2739 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2740 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2741 PROTOBUF_FIELD_OFFSET(SysStats_PsiSample, _impl_.resource_)
2742 + sizeof(SysStats_PsiSample::_impl_.resource_) // NOLINT
2743 - PROTOBUF_FIELD_OFFSET(SysStats_PsiSample, _impl_.total_ns_)>(
2744 reinterpret_cast<char*>(&_impl_.total_ns_),
2745 reinterpret_cast<char*>(&other->_impl_.total_ns_));
2746 }
2747
GetTypeName() const2748 std::string SysStats_PsiSample::GetTypeName() const {
2749 return "perfetto.protos.SysStats.PsiSample";
2750 }
2751
2752
2753 // ===================================================================
2754
2755 class SysStats_ThermalZone::_Internal {
2756 public:
2757 using HasBits = decltype(std::declval<SysStats_ThermalZone>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)2758 static void set_has_name(HasBits* has_bits) {
2759 (*has_bits)[0] |= 1u;
2760 }
set_has_temp(HasBits * has_bits)2761 static void set_has_temp(HasBits* has_bits) {
2762 (*has_bits)[0] |= 4u;
2763 }
set_has_type(HasBits * has_bits)2764 static void set_has_type(HasBits* has_bits) {
2765 (*has_bits)[0] |= 2u;
2766 }
2767 };
2768
SysStats_ThermalZone(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2769 SysStats_ThermalZone::SysStats_ThermalZone(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2770 bool is_message_owned)
2771 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2772 SharedCtor(arena, is_message_owned);
2773 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.ThermalZone)
2774 }
SysStats_ThermalZone(const SysStats_ThermalZone & from)2775 SysStats_ThermalZone::SysStats_ThermalZone(const SysStats_ThermalZone& from)
2776 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2777 SysStats_ThermalZone* const _this = this; (void)_this;
2778 new (&_impl_) Impl_{
2779 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2780 , /*decltype(_impl_._cached_size_)*/{}
2781 , decltype(_impl_.name_){}
2782 , decltype(_impl_.type_){}
2783 , decltype(_impl_.temp_){}};
2784
2785 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2786 _impl_.name_.InitDefault();
2787 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2788 _impl_.name_.Set("", GetArenaForAllocation());
2789 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2790 if (from._internal_has_name()) {
2791 _this->_impl_.name_.Set(from._internal_name(),
2792 _this->GetArenaForAllocation());
2793 }
2794 _impl_.type_.InitDefault();
2795 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2796 _impl_.type_.Set("", GetArenaForAllocation());
2797 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2798 if (from._internal_has_type()) {
2799 _this->_impl_.type_.Set(from._internal_type(),
2800 _this->GetArenaForAllocation());
2801 }
2802 _this->_impl_.temp_ = from._impl_.temp_;
2803 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.ThermalZone)
2804 }
2805
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2806 inline void SysStats_ThermalZone::SharedCtor(
2807 ::_pb::Arena* arena, bool is_message_owned) {
2808 (void)arena;
2809 (void)is_message_owned;
2810 new (&_impl_) Impl_{
2811 decltype(_impl_._has_bits_){}
2812 , /*decltype(_impl_._cached_size_)*/{}
2813 , decltype(_impl_.name_){}
2814 , decltype(_impl_.type_){}
2815 , decltype(_impl_.temp_){::uint64_t{0u}}
2816 };
2817 _impl_.name_.InitDefault();
2818 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2819 _impl_.name_.Set("", GetArenaForAllocation());
2820 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2821 _impl_.type_.InitDefault();
2822 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2823 _impl_.type_.Set("", GetArenaForAllocation());
2824 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2825 }
2826
~SysStats_ThermalZone()2827 SysStats_ThermalZone::~SysStats_ThermalZone() {
2828 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.ThermalZone)
2829 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2830 (void)arena;
2831 return;
2832 }
2833 SharedDtor();
2834 }
2835
SharedDtor()2836 inline void SysStats_ThermalZone::SharedDtor() {
2837 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2838 _impl_.name_.Destroy();
2839 _impl_.type_.Destroy();
2840 }
2841
SetCachedSize(int size) const2842 void SysStats_ThermalZone::SetCachedSize(int size) const {
2843 _impl_._cached_size_.Set(size);
2844 }
2845
Clear()2846 void SysStats_ThermalZone::Clear() {
2847 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.ThermalZone)
2848 ::uint32_t cached_has_bits = 0;
2849 // Prevent compiler warnings about cached_has_bits being unused
2850 (void) cached_has_bits;
2851
2852 cached_has_bits = _impl_._has_bits_[0];
2853 if (cached_has_bits & 0x00000003u) {
2854 if (cached_has_bits & 0x00000001u) {
2855 _impl_.name_.ClearNonDefaultToEmpty();
2856 }
2857 if (cached_has_bits & 0x00000002u) {
2858 _impl_.type_.ClearNonDefaultToEmpty();
2859 }
2860 }
2861 _impl_.temp_ = ::uint64_t{0u};
2862 _impl_._has_bits_.Clear();
2863 _internal_metadata_.Clear<std::string>();
2864 }
2865
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2866 const char* SysStats_ThermalZone::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2867 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2868 _Internal::HasBits has_bits{};
2869 while (!ctx->Done(&ptr)) {
2870 ::uint32_t tag;
2871 ptr = ::_pbi::ReadTag(ptr, &tag);
2872 switch (tag >> 3) {
2873 // optional string name = 1;
2874 case 1:
2875 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2876 auto str = _internal_mutable_name();
2877 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2878 CHK_(ptr);
2879 } else {
2880 goto handle_unusual;
2881 }
2882 continue;
2883 // optional uint64 temp = 2;
2884 case 2:
2885 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2886 _Internal::set_has_temp(&has_bits);
2887 _impl_.temp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2888 CHK_(ptr);
2889 } else {
2890 goto handle_unusual;
2891 }
2892 continue;
2893 // optional string type = 3;
2894 case 3:
2895 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2896 auto str = _internal_mutable_type();
2897 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2898 CHK_(ptr);
2899 } else {
2900 goto handle_unusual;
2901 }
2902 continue;
2903 default:
2904 goto handle_unusual;
2905 } // switch
2906 handle_unusual:
2907 if ((tag == 0) || ((tag & 7) == 4)) {
2908 CHK_(ptr);
2909 ctx->SetLastTag(tag);
2910 goto message_done;
2911 }
2912 ptr = UnknownFieldParse(
2913 tag,
2914 _internal_metadata_.mutable_unknown_fields<std::string>(),
2915 ptr, ctx);
2916 CHK_(ptr != nullptr);
2917 } // while
2918 message_done:
2919 _impl_._has_bits_.Or(has_bits);
2920 return ptr;
2921 failure:
2922 ptr = nullptr;
2923 goto message_done;
2924 #undef CHK_
2925 }
2926
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2927 ::uint8_t* SysStats_ThermalZone::_InternalSerialize(
2928 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2929 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.ThermalZone)
2930 ::uint32_t cached_has_bits = 0;
2931 (void) cached_has_bits;
2932
2933 cached_has_bits = _impl_._has_bits_[0];
2934 // optional string name = 1;
2935 if (cached_has_bits & 0x00000001u) {
2936 target = stream->WriteStringMaybeAliased(
2937 1, this->_internal_name(), target);
2938 }
2939
2940 // optional uint64 temp = 2;
2941 if (cached_has_bits & 0x00000004u) {
2942 target = stream->EnsureSpace(target);
2943 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_temp(), target);
2944 }
2945
2946 // optional string type = 3;
2947 if (cached_has_bits & 0x00000002u) {
2948 target = stream->WriteStringMaybeAliased(
2949 3, this->_internal_type(), target);
2950 }
2951
2952 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2953 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2954 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2955 }
2956 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.ThermalZone)
2957 return target;
2958 }
2959
ByteSizeLong() const2960 size_t SysStats_ThermalZone::ByteSizeLong() const {
2961 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.ThermalZone)
2962 size_t total_size = 0;
2963
2964 ::uint32_t cached_has_bits = 0;
2965 // Prevent compiler warnings about cached_has_bits being unused
2966 (void) cached_has_bits;
2967
2968 cached_has_bits = _impl_._has_bits_[0];
2969 if (cached_has_bits & 0x00000007u) {
2970 // optional string name = 1;
2971 if (cached_has_bits & 0x00000001u) {
2972 total_size += 1 +
2973 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2974 this->_internal_name());
2975 }
2976
2977 // optional string type = 3;
2978 if (cached_has_bits & 0x00000002u) {
2979 total_size += 1 +
2980 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2981 this->_internal_type());
2982 }
2983
2984 // optional uint64 temp = 2;
2985 if (cached_has_bits & 0x00000004u) {
2986 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_temp());
2987 }
2988
2989 }
2990 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2991 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2992 }
2993 int cached_size = ::_pbi::ToCachedSize(total_size);
2994 SetCachedSize(cached_size);
2995 return total_size;
2996 }
2997
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2998 void SysStats_ThermalZone::CheckTypeAndMergeFrom(
2999 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3000 MergeFrom(*::_pbi::DownCast<const SysStats_ThermalZone*>(
3001 &from));
3002 }
3003
MergeFrom(const SysStats_ThermalZone & from)3004 void SysStats_ThermalZone::MergeFrom(const SysStats_ThermalZone& from) {
3005 SysStats_ThermalZone* const _this = this;
3006 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.ThermalZone)
3007 GOOGLE_DCHECK_NE(&from, _this);
3008 ::uint32_t cached_has_bits = 0;
3009 (void) cached_has_bits;
3010
3011 cached_has_bits = from._impl_._has_bits_[0];
3012 if (cached_has_bits & 0x00000007u) {
3013 if (cached_has_bits & 0x00000001u) {
3014 _this->_internal_set_name(from._internal_name());
3015 }
3016 if (cached_has_bits & 0x00000002u) {
3017 _this->_internal_set_type(from._internal_type());
3018 }
3019 if (cached_has_bits & 0x00000004u) {
3020 _this->_impl_.temp_ = from._impl_.temp_;
3021 }
3022 _this->_impl_._has_bits_[0] |= cached_has_bits;
3023 }
3024 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3025 }
3026
CopyFrom(const SysStats_ThermalZone & from)3027 void SysStats_ThermalZone::CopyFrom(const SysStats_ThermalZone& from) {
3028 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.ThermalZone)
3029 if (&from == this) return;
3030 Clear();
3031 MergeFrom(from);
3032 }
3033
IsInitialized() const3034 bool SysStats_ThermalZone::IsInitialized() const {
3035 return true;
3036 }
3037
InternalSwap(SysStats_ThermalZone * other)3038 void SysStats_ThermalZone::InternalSwap(SysStats_ThermalZone* other) {
3039 using std::swap;
3040 auto* lhs_arena = GetArenaForAllocation();
3041 auto* rhs_arena = other->GetArenaForAllocation();
3042 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3043 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3044 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3045 &_impl_.name_, lhs_arena,
3046 &other->_impl_.name_, rhs_arena
3047 );
3048 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3049 &_impl_.type_, lhs_arena,
3050 &other->_impl_.type_, rhs_arena
3051 );
3052 swap(_impl_.temp_, other->_impl_.temp_);
3053 }
3054
GetTypeName() const3055 std::string SysStats_ThermalZone::GetTypeName() const {
3056 return "perfetto.protos.SysStats.ThermalZone";
3057 }
3058
3059
3060 // ===================================================================
3061
3062 class SysStats_CpuIdleStateEntry::_Internal {
3063 public:
3064 using HasBits = decltype(std::declval<SysStats_CpuIdleStateEntry>()._impl_._has_bits_);
set_has_state(HasBits * has_bits)3065 static void set_has_state(HasBits* has_bits) {
3066 (*has_bits)[0] |= 1u;
3067 }
set_has_duration_us(HasBits * has_bits)3068 static void set_has_duration_us(HasBits* has_bits) {
3069 (*has_bits)[0] |= 2u;
3070 }
3071 };
3072
SysStats_CpuIdleStateEntry(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3073 SysStats_CpuIdleStateEntry::SysStats_CpuIdleStateEntry(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3074 bool is_message_owned)
3075 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3076 SharedCtor(arena, is_message_owned);
3077 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.CpuIdleStateEntry)
3078 }
SysStats_CpuIdleStateEntry(const SysStats_CpuIdleStateEntry & from)3079 SysStats_CpuIdleStateEntry::SysStats_CpuIdleStateEntry(const SysStats_CpuIdleStateEntry& from)
3080 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3081 SysStats_CpuIdleStateEntry* const _this = this; (void)_this;
3082 new (&_impl_) Impl_{
3083 decltype(_impl_._has_bits_){from._impl_._has_bits_}
3084 , /*decltype(_impl_._cached_size_)*/{}
3085 , decltype(_impl_.state_){}
3086 , decltype(_impl_.duration_us_){}};
3087
3088 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3089 _impl_.state_.InitDefault();
3090 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3091 _impl_.state_.Set("", GetArenaForAllocation());
3092 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3093 if (from._internal_has_state()) {
3094 _this->_impl_.state_.Set(from._internal_state(),
3095 _this->GetArenaForAllocation());
3096 }
3097 _this->_impl_.duration_us_ = from._impl_.duration_us_;
3098 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.CpuIdleStateEntry)
3099 }
3100
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3101 inline void SysStats_CpuIdleStateEntry::SharedCtor(
3102 ::_pb::Arena* arena, bool is_message_owned) {
3103 (void)arena;
3104 (void)is_message_owned;
3105 new (&_impl_) Impl_{
3106 decltype(_impl_._has_bits_){}
3107 , /*decltype(_impl_._cached_size_)*/{}
3108 , decltype(_impl_.state_){}
3109 , decltype(_impl_.duration_us_){::uint64_t{0u}}
3110 };
3111 _impl_.state_.InitDefault();
3112 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3113 _impl_.state_.Set("", GetArenaForAllocation());
3114 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3115 }
3116
~SysStats_CpuIdleStateEntry()3117 SysStats_CpuIdleStateEntry::~SysStats_CpuIdleStateEntry() {
3118 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.CpuIdleStateEntry)
3119 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3120 (void)arena;
3121 return;
3122 }
3123 SharedDtor();
3124 }
3125
SharedDtor()3126 inline void SysStats_CpuIdleStateEntry::SharedDtor() {
3127 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3128 _impl_.state_.Destroy();
3129 }
3130
SetCachedSize(int size) const3131 void SysStats_CpuIdleStateEntry::SetCachedSize(int size) const {
3132 _impl_._cached_size_.Set(size);
3133 }
3134
Clear()3135 void SysStats_CpuIdleStateEntry::Clear() {
3136 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.CpuIdleStateEntry)
3137 ::uint32_t cached_has_bits = 0;
3138 // Prevent compiler warnings about cached_has_bits being unused
3139 (void) cached_has_bits;
3140
3141 cached_has_bits = _impl_._has_bits_[0];
3142 if (cached_has_bits & 0x00000001u) {
3143 _impl_.state_.ClearNonDefaultToEmpty();
3144 }
3145 _impl_.duration_us_ = ::uint64_t{0u};
3146 _impl_._has_bits_.Clear();
3147 _internal_metadata_.Clear<std::string>();
3148 }
3149
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3150 const char* SysStats_CpuIdleStateEntry::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3151 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3152 _Internal::HasBits has_bits{};
3153 while (!ctx->Done(&ptr)) {
3154 ::uint32_t tag;
3155 ptr = ::_pbi::ReadTag(ptr, &tag);
3156 switch (tag >> 3) {
3157 // optional string state = 1;
3158 case 1:
3159 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3160 auto str = _internal_mutable_state();
3161 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3162 CHK_(ptr);
3163 } else {
3164 goto handle_unusual;
3165 }
3166 continue;
3167 // optional uint64 duration_us = 2;
3168 case 2:
3169 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3170 _Internal::set_has_duration_us(&has_bits);
3171 _impl_.duration_us_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3172 CHK_(ptr);
3173 } else {
3174 goto handle_unusual;
3175 }
3176 continue;
3177 default:
3178 goto handle_unusual;
3179 } // switch
3180 handle_unusual:
3181 if ((tag == 0) || ((tag & 7) == 4)) {
3182 CHK_(ptr);
3183 ctx->SetLastTag(tag);
3184 goto message_done;
3185 }
3186 ptr = UnknownFieldParse(
3187 tag,
3188 _internal_metadata_.mutable_unknown_fields<std::string>(),
3189 ptr, ctx);
3190 CHK_(ptr != nullptr);
3191 } // while
3192 message_done:
3193 _impl_._has_bits_.Or(has_bits);
3194 return ptr;
3195 failure:
3196 ptr = nullptr;
3197 goto message_done;
3198 #undef CHK_
3199 }
3200
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3201 ::uint8_t* SysStats_CpuIdleStateEntry::_InternalSerialize(
3202 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3203 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.CpuIdleStateEntry)
3204 ::uint32_t cached_has_bits = 0;
3205 (void) cached_has_bits;
3206
3207 cached_has_bits = _impl_._has_bits_[0];
3208 // optional string state = 1;
3209 if (cached_has_bits & 0x00000001u) {
3210 target = stream->WriteStringMaybeAliased(
3211 1, this->_internal_state(), target);
3212 }
3213
3214 // optional uint64 duration_us = 2;
3215 if (cached_has_bits & 0x00000002u) {
3216 target = stream->EnsureSpace(target);
3217 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_duration_us(), target);
3218 }
3219
3220 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3221 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3222 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3223 }
3224 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.CpuIdleStateEntry)
3225 return target;
3226 }
3227
ByteSizeLong() const3228 size_t SysStats_CpuIdleStateEntry::ByteSizeLong() const {
3229 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.CpuIdleStateEntry)
3230 size_t total_size = 0;
3231
3232 ::uint32_t cached_has_bits = 0;
3233 // Prevent compiler warnings about cached_has_bits being unused
3234 (void) cached_has_bits;
3235
3236 cached_has_bits = _impl_._has_bits_[0];
3237 if (cached_has_bits & 0x00000003u) {
3238 // optional string state = 1;
3239 if (cached_has_bits & 0x00000001u) {
3240 total_size += 1 +
3241 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3242 this->_internal_state());
3243 }
3244
3245 // optional uint64 duration_us = 2;
3246 if (cached_has_bits & 0x00000002u) {
3247 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_duration_us());
3248 }
3249
3250 }
3251 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3252 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3253 }
3254 int cached_size = ::_pbi::ToCachedSize(total_size);
3255 SetCachedSize(cached_size);
3256 return total_size;
3257 }
3258
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3259 void SysStats_CpuIdleStateEntry::CheckTypeAndMergeFrom(
3260 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3261 MergeFrom(*::_pbi::DownCast<const SysStats_CpuIdleStateEntry*>(
3262 &from));
3263 }
3264
MergeFrom(const SysStats_CpuIdleStateEntry & from)3265 void SysStats_CpuIdleStateEntry::MergeFrom(const SysStats_CpuIdleStateEntry& from) {
3266 SysStats_CpuIdleStateEntry* const _this = this;
3267 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.CpuIdleStateEntry)
3268 GOOGLE_DCHECK_NE(&from, _this);
3269 ::uint32_t cached_has_bits = 0;
3270 (void) cached_has_bits;
3271
3272 cached_has_bits = from._impl_._has_bits_[0];
3273 if (cached_has_bits & 0x00000003u) {
3274 if (cached_has_bits & 0x00000001u) {
3275 _this->_internal_set_state(from._internal_state());
3276 }
3277 if (cached_has_bits & 0x00000002u) {
3278 _this->_impl_.duration_us_ = from._impl_.duration_us_;
3279 }
3280 _this->_impl_._has_bits_[0] |= cached_has_bits;
3281 }
3282 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3283 }
3284
CopyFrom(const SysStats_CpuIdleStateEntry & from)3285 void SysStats_CpuIdleStateEntry::CopyFrom(const SysStats_CpuIdleStateEntry& from) {
3286 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.CpuIdleStateEntry)
3287 if (&from == this) return;
3288 Clear();
3289 MergeFrom(from);
3290 }
3291
IsInitialized() const3292 bool SysStats_CpuIdleStateEntry::IsInitialized() const {
3293 return true;
3294 }
3295
InternalSwap(SysStats_CpuIdleStateEntry * other)3296 void SysStats_CpuIdleStateEntry::InternalSwap(SysStats_CpuIdleStateEntry* other) {
3297 using std::swap;
3298 auto* lhs_arena = GetArenaForAllocation();
3299 auto* rhs_arena = other->GetArenaForAllocation();
3300 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3301 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3302 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3303 &_impl_.state_, lhs_arena,
3304 &other->_impl_.state_, rhs_arena
3305 );
3306 swap(_impl_.duration_us_, other->_impl_.duration_us_);
3307 }
3308
GetTypeName() const3309 std::string SysStats_CpuIdleStateEntry::GetTypeName() const {
3310 return "perfetto.protos.SysStats.CpuIdleStateEntry";
3311 }
3312
3313
3314 // ===================================================================
3315
3316 class SysStats_CpuIdleState::_Internal {
3317 public:
3318 using HasBits = decltype(std::declval<SysStats_CpuIdleState>()._impl_._has_bits_);
set_has_cpu_id(HasBits * has_bits)3319 static void set_has_cpu_id(HasBits* has_bits) {
3320 (*has_bits)[0] |= 1u;
3321 }
3322 };
3323
SysStats_CpuIdleState(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3324 SysStats_CpuIdleState::SysStats_CpuIdleState(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3325 bool is_message_owned)
3326 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3327 SharedCtor(arena, is_message_owned);
3328 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats.CpuIdleState)
3329 }
SysStats_CpuIdleState(const SysStats_CpuIdleState & from)3330 SysStats_CpuIdleState::SysStats_CpuIdleState(const SysStats_CpuIdleState& from)
3331 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3332 SysStats_CpuIdleState* const _this = this; (void)_this;
3333 new (&_impl_) Impl_{
3334 decltype(_impl_._has_bits_){from._impl_._has_bits_}
3335 , /*decltype(_impl_._cached_size_)*/{}
3336 , decltype(_impl_.cpuidle_state_entry_){from._impl_.cpuidle_state_entry_}
3337 , decltype(_impl_.cpu_id_){}};
3338
3339 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3340 _this->_impl_.cpu_id_ = from._impl_.cpu_id_;
3341 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats.CpuIdleState)
3342 }
3343
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3344 inline void SysStats_CpuIdleState::SharedCtor(
3345 ::_pb::Arena* arena, bool is_message_owned) {
3346 (void)arena;
3347 (void)is_message_owned;
3348 new (&_impl_) Impl_{
3349 decltype(_impl_._has_bits_){}
3350 , /*decltype(_impl_._cached_size_)*/{}
3351 , decltype(_impl_.cpuidle_state_entry_){arena}
3352 , decltype(_impl_.cpu_id_){0u}
3353 };
3354 }
3355
~SysStats_CpuIdleState()3356 SysStats_CpuIdleState::~SysStats_CpuIdleState() {
3357 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats.CpuIdleState)
3358 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3359 (void)arena;
3360 return;
3361 }
3362 SharedDtor();
3363 }
3364
SharedDtor()3365 inline void SysStats_CpuIdleState::SharedDtor() {
3366 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3367 _impl_.cpuidle_state_entry_.~RepeatedPtrField();
3368 }
3369
SetCachedSize(int size) const3370 void SysStats_CpuIdleState::SetCachedSize(int size) const {
3371 _impl_._cached_size_.Set(size);
3372 }
3373
Clear()3374 void SysStats_CpuIdleState::Clear() {
3375 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats.CpuIdleState)
3376 ::uint32_t cached_has_bits = 0;
3377 // Prevent compiler warnings about cached_has_bits being unused
3378 (void) cached_has_bits;
3379
3380 _impl_.cpuidle_state_entry_.Clear();
3381 _impl_.cpu_id_ = 0u;
3382 _impl_._has_bits_.Clear();
3383 _internal_metadata_.Clear<std::string>();
3384 }
3385
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3386 const char* SysStats_CpuIdleState::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3387 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3388 _Internal::HasBits has_bits{};
3389 while (!ctx->Done(&ptr)) {
3390 ::uint32_t tag;
3391 ptr = ::_pbi::ReadTag(ptr, &tag);
3392 switch (tag >> 3) {
3393 // optional uint32 cpu_id = 1;
3394 case 1:
3395 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3396 _Internal::set_has_cpu_id(&has_bits);
3397 _impl_.cpu_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3398 CHK_(ptr);
3399 } else {
3400 goto handle_unusual;
3401 }
3402 continue;
3403 // repeated .perfetto.protos.SysStats.CpuIdleStateEntry cpuidle_state_entry = 2;
3404 case 2:
3405 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3406 ptr -= 1;
3407 do {
3408 ptr += 1;
3409 ptr = ctx->ParseMessage(_internal_add_cpuidle_state_entry(), ptr);
3410 CHK_(ptr);
3411 if (!ctx->DataAvailable(ptr)) break;
3412 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
3413 } else {
3414 goto handle_unusual;
3415 }
3416 continue;
3417 default:
3418 goto handle_unusual;
3419 } // switch
3420 handle_unusual:
3421 if ((tag == 0) || ((tag & 7) == 4)) {
3422 CHK_(ptr);
3423 ctx->SetLastTag(tag);
3424 goto message_done;
3425 }
3426 ptr = UnknownFieldParse(
3427 tag,
3428 _internal_metadata_.mutable_unknown_fields<std::string>(),
3429 ptr, ctx);
3430 CHK_(ptr != nullptr);
3431 } // while
3432 message_done:
3433 _impl_._has_bits_.Or(has_bits);
3434 return ptr;
3435 failure:
3436 ptr = nullptr;
3437 goto message_done;
3438 #undef CHK_
3439 }
3440
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3441 ::uint8_t* SysStats_CpuIdleState::_InternalSerialize(
3442 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3443 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats.CpuIdleState)
3444 ::uint32_t cached_has_bits = 0;
3445 (void) cached_has_bits;
3446
3447 cached_has_bits = _impl_._has_bits_[0];
3448 // optional uint32 cpu_id = 1;
3449 if (cached_has_bits & 0x00000001u) {
3450 target = stream->EnsureSpace(target);
3451 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_cpu_id(), target);
3452 }
3453
3454 // repeated .perfetto.protos.SysStats.CpuIdleStateEntry cpuidle_state_entry = 2;
3455 for (unsigned i = 0,
3456 n = static_cast<unsigned>(this->_internal_cpuidle_state_entry_size()); i < n; i++) {
3457 const auto& repfield = this->_internal_cpuidle_state_entry(i);
3458 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3459 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
3460 }
3461
3462 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3463 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3464 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3465 }
3466 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats.CpuIdleState)
3467 return target;
3468 }
3469
ByteSizeLong() const3470 size_t SysStats_CpuIdleState::ByteSizeLong() const {
3471 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats.CpuIdleState)
3472 size_t total_size = 0;
3473
3474 ::uint32_t cached_has_bits = 0;
3475 // Prevent compiler warnings about cached_has_bits being unused
3476 (void) cached_has_bits;
3477
3478 // repeated .perfetto.protos.SysStats.CpuIdleStateEntry cpuidle_state_entry = 2;
3479 total_size += 1UL * this->_internal_cpuidle_state_entry_size();
3480 for (const auto& msg : this->_impl_.cpuidle_state_entry_) {
3481 total_size +=
3482 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3483 }
3484
3485 // optional uint32 cpu_id = 1;
3486 cached_has_bits = _impl_._has_bits_[0];
3487 if (cached_has_bits & 0x00000001u) {
3488 total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpu_id());
3489 }
3490
3491 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3492 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3493 }
3494 int cached_size = ::_pbi::ToCachedSize(total_size);
3495 SetCachedSize(cached_size);
3496 return total_size;
3497 }
3498
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3499 void SysStats_CpuIdleState::CheckTypeAndMergeFrom(
3500 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3501 MergeFrom(*::_pbi::DownCast<const SysStats_CpuIdleState*>(
3502 &from));
3503 }
3504
MergeFrom(const SysStats_CpuIdleState & from)3505 void SysStats_CpuIdleState::MergeFrom(const SysStats_CpuIdleState& from) {
3506 SysStats_CpuIdleState* const _this = this;
3507 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats.CpuIdleState)
3508 GOOGLE_DCHECK_NE(&from, _this);
3509 ::uint32_t cached_has_bits = 0;
3510 (void) cached_has_bits;
3511
3512 _this->_impl_.cpuidle_state_entry_.MergeFrom(from._impl_.cpuidle_state_entry_);
3513 if (from._internal_has_cpu_id()) {
3514 _this->_internal_set_cpu_id(from._internal_cpu_id());
3515 }
3516 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3517 }
3518
CopyFrom(const SysStats_CpuIdleState & from)3519 void SysStats_CpuIdleState::CopyFrom(const SysStats_CpuIdleState& from) {
3520 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats.CpuIdleState)
3521 if (&from == this) return;
3522 Clear();
3523 MergeFrom(from);
3524 }
3525
IsInitialized() const3526 bool SysStats_CpuIdleState::IsInitialized() const {
3527 return true;
3528 }
3529
InternalSwap(SysStats_CpuIdleState * other)3530 void SysStats_CpuIdleState::InternalSwap(SysStats_CpuIdleState* other) {
3531 using std::swap;
3532 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3533 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3534 _impl_.cpuidle_state_entry_.InternalSwap(&other->_impl_.cpuidle_state_entry_);
3535 swap(_impl_.cpu_id_, other->_impl_.cpu_id_);
3536 }
3537
GetTypeName() const3538 std::string SysStats_CpuIdleState::GetTypeName() const {
3539 return "perfetto.protos.SysStats.CpuIdleState";
3540 }
3541
3542
3543 // ===================================================================
3544
3545 class SysStats::_Internal {
3546 public:
3547 using HasBits = decltype(std::declval<SysStats>()._impl_._has_bits_);
set_has_num_forks(HasBits * has_bits)3548 static void set_has_num_forks(HasBits* has_bits) {
3549 (*has_bits)[0] |= 1u;
3550 }
set_has_num_irq_total(HasBits * has_bits)3551 static void set_has_num_irq_total(HasBits* has_bits) {
3552 (*has_bits)[0] |= 2u;
3553 }
set_has_num_softirq_total(HasBits * has_bits)3554 static void set_has_num_softirq_total(HasBits* has_bits) {
3555 (*has_bits)[0] |= 4u;
3556 }
set_has_collection_end_timestamp(HasBits * has_bits)3557 static void set_has_collection_end_timestamp(HasBits* has_bits) {
3558 (*has_bits)[0] |= 8u;
3559 }
3560 };
3561
SysStats(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3562 SysStats::SysStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3563 bool is_message_owned)
3564 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3565 SharedCtor(arena, is_message_owned);
3566 // @@protoc_insertion_point(arena_constructor:perfetto.protos.SysStats)
3567 }
SysStats(const SysStats & from)3568 SysStats::SysStats(const SysStats& from)
3569 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3570 SysStats* const _this = this; (void)_this;
3571 new (&_impl_) Impl_{
3572 decltype(_impl_._has_bits_){from._impl_._has_bits_}
3573 , /*decltype(_impl_._cached_size_)*/{}
3574 , decltype(_impl_.meminfo_){from._impl_.meminfo_}
3575 , decltype(_impl_.vmstat_){from._impl_.vmstat_}
3576 , decltype(_impl_.cpu_stat_){from._impl_.cpu_stat_}
3577 , decltype(_impl_.num_irq_){from._impl_.num_irq_}
3578 , decltype(_impl_.num_softirq_){from._impl_.num_softirq_}
3579 , decltype(_impl_.devfreq_){from._impl_.devfreq_}
3580 , decltype(_impl_.cpufreq_khz_){from._impl_.cpufreq_khz_}
3581 , decltype(_impl_.buddy_info_){from._impl_.buddy_info_}
3582 , decltype(_impl_.disk_stat_){from._impl_.disk_stat_}
3583 , decltype(_impl_.psi_){from._impl_.psi_}
3584 , decltype(_impl_.thermal_zone_){from._impl_.thermal_zone_}
3585 , decltype(_impl_.cpuidle_state_){from._impl_.cpuidle_state_}
3586 , decltype(_impl_.gpufreq_mhz_){from._impl_.gpufreq_mhz_}
3587 , decltype(_impl_.num_forks_){}
3588 , decltype(_impl_.num_irq_total_){}
3589 , decltype(_impl_.num_softirq_total_){}
3590 , decltype(_impl_.collection_end_timestamp_){}};
3591
3592 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3593 ::memcpy(&_impl_.num_forks_, &from._impl_.num_forks_,
3594 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.collection_end_timestamp_) -
3595 reinterpret_cast<char*>(&_impl_.num_forks_)) + sizeof(_impl_.collection_end_timestamp_));
3596 // @@protoc_insertion_point(copy_constructor:perfetto.protos.SysStats)
3597 }
3598
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3599 inline void SysStats::SharedCtor(
3600 ::_pb::Arena* arena, bool is_message_owned) {
3601 (void)arena;
3602 (void)is_message_owned;
3603 new (&_impl_) Impl_{
3604 decltype(_impl_._has_bits_){}
3605 , /*decltype(_impl_._cached_size_)*/{}
3606 , decltype(_impl_.meminfo_){arena}
3607 , decltype(_impl_.vmstat_){arena}
3608 , decltype(_impl_.cpu_stat_){arena}
3609 , decltype(_impl_.num_irq_){arena}
3610 , decltype(_impl_.num_softirq_){arena}
3611 , decltype(_impl_.devfreq_){arena}
3612 , decltype(_impl_.cpufreq_khz_){arena}
3613 , decltype(_impl_.buddy_info_){arena}
3614 , decltype(_impl_.disk_stat_){arena}
3615 , decltype(_impl_.psi_){arena}
3616 , decltype(_impl_.thermal_zone_){arena}
3617 , decltype(_impl_.cpuidle_state_){arena}
3618 , decltype(_impl_.gpufreq_mhz_){arena}
3619 , decltype(_impl_.num_forks_){::uint64_t{0u}}
3620 , decltype(_impl_.num_irq_total_){::uint64_t{0u}}
3621 , decltype(_impl_.num_softirq_total_){::uint64_t{0u}}
3622 , decltype(_impl_.collection_end_timestamp_){::uint64_t{0u}}
3623 };
3624 }
3625
~SysStats()3626 SysStats::~SysStats() {
3627 // @@protoc_insertion_point(destructor:perfetto.protos.SysStats)
3628 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3629 (void)arena;
3630 return;
3631 }
3632 SharedDtor();
3633 }
3634
SharedDtor()3635 inline void SysStats::SharedDtor() {
3636 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3637 _impl_.meminfo_.~RepeatedPtrField();
3638 _impl_.vmstat_.~RepeatedPtrField();
3639 _impl_.cpu_stat_.~RepeatedPtrField();
3640 _impl_.num_irq_.~RepeatedPtrField();
3641 _impl_.num_softirq_.~RepeatedPtrField();
3642 _impl_.devfreq_.~RepeatedPtrField();
3643 _impl_.cpufreq_khz_.~RepeatedField();
3644 _impl_.buddy_info_.~RepeatedPtrField();
3645 _impl_.disk_stat_.~RepeatedPtrField();
3646 _impl_.psi_.~RepeatedPtrField();
3647 _impl_.thermal_zone_.~RepeatedPtrField();
3648 _impl_.cpuidle_state_.~RepeatedPtrField();
3649 _impl_.gpufreq_mhz_.~RepeatedField();
3650 }
3651
SetCachedSize(int size) const3652 void SysStats::SetCachedSize(int size) const {
3653 _impl_._cached_size_.Set(size);
3654 }
3655
Clear()3656 void SysStats::Clear() {
3657 // @@protoc_insertion_point(message_clear_start:perfetto.protos.SysStats)
3658 ::uint32_t cached_has_bits = 0;
3659 // Prevent compiler warnings about cached_has_bits being unused
3660 (void) cached_has_bits;
3661
3662 _impl_.meminfo_.Clear();
3663 _impl_.vmstat_.Clear();
3664 _impl_.cpu_stat_.Clear();
3665 _impl_.num_irq_.Clear();
3666 _impl_.num_softirq_.Clear();
3667 _impl_.devfreq_.Clear();
3668 _impl_.cpufreq_khz_.Clear();
3669 _impl_.buddy_info_.Clear();
3670 _impl_.disk_stat_.Clear();
3671 _impl_.psi_.Clear();
3672 _impl_.thermal_zone_.Clear();
3673 _impl_.cpuidle_state_.Clear();
3674 _impl_.gpufreq_mhz_.Clear();
3675 cached_has_bits = _impl_._has_bits_[0];
3676 if (cached_has_bits & 0x0000000fu) {
3677 ::memset(&_impl_.num_forks_, 0, static_cast<size_t>(
3678 reinterpret_cast<char*>(&_impl_.collection_end_timestamp_) -
3679 reinterpret_cast<char*>(&_impl_.num_forks_)) + sizeof(_impl_.collection_end_timestamp_));
3680 }
3681 _impl_._has_bits_.Clear();
3682 _internal_metadata_.Clear<std::string>();
3683 }
3684
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3685 const char* SysStats::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3686 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3687 _Internal::HasBits has_bits{};
3688 while (!ctx->Done(&ptr)) {
3689 ::uint32_t tag;
3690 ptr = ::_pbi::ReadTag(ptr, &tag);
3691 switch (tag >> 3) {
3692 // repeated .perfetto.protos.SysStats.MeminfoValue meminfo = 1;
3693 case 1:
3694 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3695 ptr -= 1;
3696 do {
3697 ptr += 1;
3698 ptr = ctx->ParseMessage(_internal_add_meminfo(), ptr);
3699 CHK_(ptr);
3700 if (!ctx->DataAvailable(ptr)) break;
3701 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
3702 } else {
3703 goto handle_unusual;
3704 }
3705 continue;
3706 // repeated .perfetto.protos.SysStats.VmstatValue vmstat = 2;
3707 case 2:
3708 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3709 ptr -= 1;
3710 do {
3711 ptr += 1;
3712 ptr = ctx->ParseMessage(_internal_add_vmstat(), ptr);
3713 CHK_(ptr);
3714 if (!ctx->DataAvailable(ptr)) break;
3715 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
3716 } else {
3717 goto handle_unusual;
3718 }
3719 continue;
3720 // repeated .perfetto.protos.SysStats.CpuTimes cpu_stat = 3;
3721 case 3:
3722 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
3723 ptr -= 1;
3724 do {
3725 ptr += 1;
3726 ptr = ctx->ParseMessage(_internal_add_cpu_stat(), ptr);
3727 CHK_(ptr);
3728 if (!ctx->DataAvailable(ptr)) break;
3729 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
3730 } else {
3731 goto handle_unusual;
3732 }
3733 continue;
3734 // optional uint64 num_forks = 4;
3735 case 4:
3736 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
3737 _Internal::set_has_num_forks(&has_bits);
3738 _impl_.num_forks_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3739 CHK_(ptr);
3740 } else {
3741 goto handle_unusual;
3742 }
3743 continue;
3744 // optional uint64 num_irq_total = 5;
3745 case 5:
3746 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
3747 _Internal::set_has_num_irq_total(&has_bits);
3748 _impl_.num_irq_total_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3749 CHK_(ptr);
3750 } else {
3751 goto handle_unusual;
3752 }
3753 continue;
3754 // repeated .perfetto.protos.SysStats.InterruptCount num_irq = 6;
3755 case 6:
3756 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
3757 ptr -= 1;
3758 do {
3759 ptr += 1;
3760 ptr = ctx->ParseMessage(_internal_add_num_irq(), ptr);
3761 CHK_(ptr);
3762 if (!ctx->DataAvailable(ptr)) break;
3763 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
3764 } else {
3765 goto handle_unusual;
3766 }
3767 continue;
3768 // optional uint64 num_softirq_total = 7;
3769 case 7:
3770 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
3771 _Internal::set_has_num_softirq_total(&has_bits);
3772 _impl_.num_softirq_total_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3773 CHK_(ptr);
3774 } else {
3775 goto handle_unusual;
3776 }
3777 continue;
3778 // repeated .perfetto.protos.SysStats.InterruptCount num_softirq = 8;
3779 case 8:
3780 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
3781 ptr -= 1;
3782 do {
3783 ptr += 1;
3784 ptr = ctx->ParseMessage(_internal_add_num_softirq(), ptr);
3785 CHK_(ptr);
3786 if (!ctx->DataAvailable(ptr)) break;
3787 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
3788 } else {
3789 goto handle_unusual;
3790 }
3791 continue;
3792 // optional uint64 collection_end_timestamp = 9;
3793 case 9:
3794 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
3795 _Internal::set_has_collection_end_timestamp(&has_bits);
3796 _impl_.collection_end_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3797 CHK_(ptr);
3798 } else {
3799 goto handle_unusual;
3800 }
3801 continue;
3802 // repeated .perfetto.protos.SysStats.DevfreqValue devfreq = 10;
3803 case 10:
3804 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
3805 ptr -= 1;
3806 do {
3807 ptr += 1;
3808 ptr = ctx->ParseMessage(_internal_add_devfreq(), ptr);
3809 CHK_(ptr);
3810 if (!ctx->DataAvailable(ptr)) break;
3811 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
3812 } else {
3813 goto handle_unusual;
3814 }
3815 continue;
3816 // repeated uint32 cpufreq_khz = 11;
3817 case 11:
3818 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
3819 ptr -= 1;
3820 do {
3821 ptr += 1;
3822 _internal_add_cpufreq_khz(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
3823 CHK_(ptr);
3824 if (!ctx->DataAvailable(ptr)) break;
3825 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<88>(ptr));
3826 } else if (static_cast<::uint8_t>(tag) == 90) {
3827 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_cpufreq_khz(), ptr, ctx);
3828 CHK_(ptr);
3829 } else {
3830 goto handle_unusual;
3831 }
3832 continue;
3833 // repeated .perfetto.protos.SysStats.BuddyInfo buddy_info = 12;
3834 case 12:
3835 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
3836 ptr -= 1;
3837 do {
3838 ptr += 1;
3839 ptr = ctx->ParseMessage(_internal_add_buddy_info(), ptr);
3840 CHK_(ptr);
3841 if (!ctx->DataAvailable(ptr)) break;
3842 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
3843 } else {
3844 goto handle_unusual;
3845 }
3846 continue;
3847 // repeated .perfetto.protos.SysStats.DiskStat disk_stat = 13;
3848 case 13:
3849 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
3850 ptr -= 1;
3851 do {
3852 ptr += 1;
3853 ptr = ctx->ParseMessage(_internal_add_disk_stat(), ptr);
3854 CHK_(ptr);
3855 if (!ctx->DataAvailable(ptr)) break;
3856 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr));
3857 } else {
3858 goto handle_unusual;
3859 }
3860 continue;
3861 // repeated .perfetto.protos.SysStats.PsiSample psi = 14;
3862 case 14:
3863 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
3864 ptr -= 1;
3865 do {
3866 ptr += 1;
3867 ptr = ctx->ParseMessage(_internal_add_psi(), ptr);
3868 CHK_(ptr);
3869 if (!ctx->DataAvailable(ptr)) break;
3870 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
3871 } else {
3872 goto handle_unusual;
3873 }
3874 continue;
3875 // repeated .perfetto.protos.SysStats.ThermalZone thermal_zone = 15;
3876 case 15:
3877 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
3878 ptr -= 1;
3879 do {
3880 ptr += 1;
3881 ptr = ctx->ParseMessage(_internal_add_thermal_zone(), ptr);
3882 CHK_(ptr);
3883 if (!ctx->DataAvailable(ptr)) break;
3884 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr));
3885 } else {
3886 goto handle_unusual;
3887 }
3888 continue;
3889 // repeated .perfetto.protos.SysStats.CpuIdleState cpuidle_state = 16;
3890 case 16:
3891 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
3892 ptr -= 2;
3893 do {
3894 ptr += 2;
3895 ptr = ctx->ParseMessage(_internal_add_cpuidle_state(), ptr);
3896 CHK_(ptr);
3897 if (!ctx->DataAvailable(ptr)) break;
3898 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<130>(ptr));
3899 } else {
3900 goto handle_unusual;
3901 }
3902 continue;
3903 // repeated uint64 gpufreq_mhz = 17;
3904 case 17:
3905 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
3906 ptr -= 2;
3907 do {
3908 ptr += 2;
3909 _internal_add_gpufreq_mhz(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3910 CHK_(ptr);
3911 if (!ctx->DataAvailable(ptr)) break;
3912 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<136>(ptr));
3913 } else if (static_cast<::uint8_t>(tag) == 138) {
3914 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_gpufreq_mhz(), ptr, ctx);
3915 CHK_(ptr);
3916 } else {
3917 goto handle_unusual;
3918 }
3919 continue;
3920 default:
3921 goto handle_unusual;
3922 } // switch
3923 handle_unusual:
3924 if ((tag == 0) || ((tag & 7) == 4)) {
3925 CHK_(ptr);
3926 ctx->SetLastTag(tag);
3927 goto message_done;
3928 }
3929 ptr = UnknownFieldParse(
3930 tag,
3931 _internal_metadata_.mutable_unknown_fields<std::string>(),
3932 ptr, ctx);
3933 CHK_(ptr != nullptr);
3934 } // while
3935 message_done:
3936 _impl_._has_bits_.Or(has_bits);
3937 return ptr;
3938 failure:
3939 ptr = nullptr;
3940 goto message_done;
3941 #undef CHK_
3942 }
3943
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3944 ::uint8_t* SysStats::_InternalSerialize(
3945 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3946 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.SysStats)
3947 ::uint32_t cached_has_bits = 0;
3948 (void) cached_has_bits;
3949
3950 // repeated .perfetto.protos.SysStats.MeminfoValue meminfo = 1;
3951 for (unsigned i = 0,
3952 n = static_cast<unsigned>(this->_internal_meminfo_size()); i < n; i++) {
3953 const auto& repfield = this->_internal_meminfo(i);
3954 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3955 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
3956 }
3957
3958 // repeated .perfetto.protos.SysStats.VmstatValue vmstat = 2;
3959 for (unsigned i = 0,
3960 n = static_cast<unsigned>(this->_internal_vmstat_size()); i < n; i++) {
3961 const auto& repfield = this->_internal_vmstat(i);
3962 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3963 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
3964 }
3965
3966 // repeated .perfetto.protos.SysStats.CpuTimes cpu_stat = 3;
3967 for (unsigned i = 0,
3968 n = static_cast<unsigned>(this->_internal_cpu_stat_size()); i < n; i++) {
3969 const auto& repfield = this->_internal_cpu_stat(i);
3970 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3971 InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
3972 }
3973
3974 cached_has_bits = _impl_._has_bits_[0];
3975 // optional uint64 num_forks = 4;
3976 if (cached_has_bits & 0x00000001u) {
3977 target = stream->EnsureSpace(target);
3978 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_num_forks(), target);
3979 }
3980
3981 // optional uint64 num_irq_total = 5;
3982 if (cached_has_bits & 0x00000002u) {
3983 target = stream->EnsureSpace(target);
3984 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_num_irq_total(), target);
3985 }
3986
3987 // repeated .perfetto.protos.SysStats.InterruptCount num_irq = 6;
3988 for (unsigned i = 0,
3989 n = static_cast<unsigned>(this->_internal_num_irq_size()); i < n; i++) {
3990 const auto& repfield = this->_internal_num_irq(i);
3991 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3992 InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
3993 }
3994
3995 // optional uint64 num_softirq_total = 7;
3996 if (cached_has_bits & 0x00000004u) {
3997 target = stream->EnsureSpace(target);
3998 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_num_softirq_total(), target);
3999 }
4000
4001 // repeated .perfetto.protos.SysStats.InterruptCount num_softirq = 8;
4002 for (unsigned i = 0,
4003 n = static_cast<unsigned>(this->_internal_num_softirq_size()); i < n; i++) {
4004 const auto& repfield = this->_internal_num_softirq(i);
4005 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4006 InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream);
4007 }
4008
4009 // optional uint64 collection_end_timestamp = 9;
4010 if (cached_has_bits & 0x00000008u) {
4011 target = stream->EnsureSpace(target);
4012 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(9, this->_internal_collection_end_timestamp(), target);
4013 }
4014
4015 // repeated .perfetto.protos.SysStats.DevfreqValue devfreq = 10;
4016 for (unsigned i = 0,
4017 n = static_cast<unsigned>(this->_internal_devfreq_size()); i < n; i++) {
4018 const auto& repfield = this->_internal_devfreq(i);
4019 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4020 InternalWriteMessage(10, repfield, repfield.GetCachedSize(), target, stream);
4021 }
4022
4023 // repeated uint32 cpufreq_khz = 11;
4024 for (int i = 0, n = this->_internal_cpufreq_khz_size(); i < n; i++) {
4025 target = stream->EnsureSpace(target);
4026 target = ::_pbi::WireFormatLite::WriteUInt32ToArray(11, this->_internal_cpufreq_khz(i), target);
4027 }
4028
4029 // repeated .perfetto.protos.SysStats.BuddyInfo buddy_info = 12;
4030 for (unsigned i = 0,
4031 n = static_cast<unsigned>(this->_internal_buddy_info_size()); i < n; i++) {
4032 const auto& repfield = this->_internal_buddy_info(i);
4033 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4034 InternalWriteMessage(12, repfield, repfield.GetCachedSize(), target, stream);
4035 }
4036
4037 // repeated .perfetto.protos.SysStats.DiskStat disk_stat = 13;
4038 for (unsigned i = 0,
4039 n = static_cast<unsigned>(this->_internal_disk_stat_size()); i < n; i++) {
4040 const auto& repfield = this->_internal_disk_stat(i);
4041 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4042 InternalWriteMessage(13, repfield, repfield.GetCachedSize(), target, stream);
4043 }
4044
4045 // repeated .perfetto.protos.SysStats.PsiSample psi = 14;
4046 for (unsigned i = 0,
4047 n = static_cast<unsigned>(this->_internal_psi_size()); i < n; i++) {
4048 const auto& repfield = this->_internal_psi(i);
4049 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4050 InternalWriteMessage(14, repfield, repfield.GetCachedSize(), target, stream);
4051 }
4052
4053 // repeated .perfetto.protos.SysStats.ThermalZone thermal_zone = 15;
4054 for (unsigned i = 0,
4055 n = static_cast<unsigned>(this->_internal_thermal_zone_size()); i < n; i++) {
4056 const auto& repfield = this->_internal_thermal_zone(i);
4057 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4058 InternalWriteMessage(15, repfield, repfield.GetCachedSize(), target, stream);
4059 }
4060
4061 // repeated .perfetto.protos.SysStats.CpuIdleState cpuidle_state = 16;
4062 for (unsigned i = 0,
4063 n = static_cast<unsigned>(this->_internal_cpuidle_state_size()); i < n; i++) {
4064 const auto& repfield = this->_internal_cpuidle_state(i);
4065 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4066 InternalWriteMessage(16, repfield, repfield.GetCachedSize(), target, stream);
4067 }
4068
4069 // repeated uint64 gpufreq_mhz = 17;
4070 for (int i = 0, n = this->_internal_gpufreq_mhz_size(); i < n; i++) {
4071 target = stream->EnsureSpace(target);
4072 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(17, this->_internal_gpufreq_mhz(i), target);
4073 }
4074
4075 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4076 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4077 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4078 }
4079 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.SysStats)
4080 return target;
4081 }
4082
ByteSizeLong() const4083 size_t SysStats::ByteSizeLong() const {
4084 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.SysStats)
4085 size_t total_size = 0;
4086
4087 ::uint32_t cached_has_bits = 0;
4088 // Prevent compiler warnings about cached_has_bits being unused
4089 (void) cached_has_bits;
4090
4091 // repeated .perfetto.protos.SysStats.MeminfoValue meminfo = 1;
4092 total_size += 1UL * this->_internal_meminfo_size();
4093 for (const auto& msg : this->_impl_.meminfo_) {
4094 total_size +=
4095 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4096 }
4097
4098 // repeated .perfetto.protos.SysStats.VmstatValue vmstat = 2;
4099 total_size += 1UL * this->_internal_vmstat_size();
4100 for (const auto& msg : this->_impl_.vmstat_) {
4101 total_size +=
4102 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4103 }
4104
4105 // repeated .perfetto.protos.SysStats.CpuTimes cpu_stat = 3;
4106 total_size += 1UL * this->_internal_cpu_stat_size();
4107 for (const auto& msg : this->_impl_.cpu_stat_) {
4108 total_size +=
4109 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4110 }
4111
4112 // repeated .perfetto.protos.SysStats.InterruptCount num_irq = 6;
4113 total_size += 1UL * this->_internal_num_irq_size();
4114 for (const auto& msg : this->_impl_.num_irq_) {
4115 total_size +=
4116 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4117 }
4118
4119 // repeated .perfetto.protos.SysStats.InterruptCount num_softirq = 8;
4120 total_size += 1UL * this->_internal_num_softirq_size();
4121 for (const auto& msg : this->_impl_.num_softirq_) {
4122 total_size +=
4123 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4124 }
4125
4126 // repeated .perfetto.protos.SysStats.DevfreqValue devfreq = 10;
4127 total_size += 1UL * this->_internal_devfreq_size();
4128 for (const auto& msg : this->_impl_.devfreq_) {
4129 total_size +=
4130 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4131 }
4132
4133 // repeated uint32 cpufreq_khz = 11;
4134 {
4135 size_t data_size = ::_pbi::WireFormatLite::
4136 UInt32Size(this->_impl_.cpufreq_khz_);
4137 total_size += 1 *
4138 ::_pbi::FromIntSize(this->_internal_cpufreq_khz_size());
4139 total_size += data_size;
4140 }
4141
4142 // repeated .perfetto.protos.SysStats.BuddyInfo buddy_info = 12;
4143 total_size += 1UL * this->_internal_buddy_info_size();
4144 for (const auto& msg : this->_impl_.buddy_info_) {
4145 total_size +=
4146 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4147 }
4148
4149 // repeated .perfetto.protos.SysStats.DiskStat disk_stat = 13;
4150 total_size += 1UL * this->_internal_disk_stat_size();
4151 for (const auto& msg : this->_impl_.disk_stat_) {
4152 total_size +=
4153 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4154 }
4155
4156 // repeated .perfetto.protos.SysStats.PsiSample psi = 14;
4157 total_size += 1UL * this->_internal_psi_size();
4158 for (const auto& msg : this->_impl_.psi_) {
4159 total_size +=
4160 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4161 }
4162
4163 // repeated .perfetto.protos.SysStats.ThermalZone thermal_zone = 15;
4164 total_size += 1UL * this->_internal_thermal_zone_size();
4165 for (const auto& msg : this->_impl_.thermal_zone_) {
4166 total_size +=
4167 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4168 }
4169
4170 // repeated .perfetto.protos.SysStats.CpuIdleState cpuidle_state = 16;
4171 total_size += 2UL * this->_internal_cpuidle_state_size();
4172 for (const auto& msg : this->_impl_.cpuidle_state_) {
4173 total_size +=
4174 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4175 }
4176
4177 // repeated uint64 gpufreq_mhz = 17;
4178 {
4179 size_t data_size = ::_pbi::WireFormatLite::
4180 UInt64Size(this->_impl_.gpufreq_mhz_);
4181 total_size += 2 *
4182 ::_pbi::FromIntSize(this->_internal_gpufreq_mhz_size());
4183 total_size += data_size;
4184 }
4185
4186 cached_has_bits = _impl_._has_bits_[0];
4187 if (cached_has_bits & 0x0000000fu) {
4188 // optional uint64 num_forks = 4;
4189 if (cached_has_bits & 0x00000001u) {
4190 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_num_forks());
4191 }
4192
4193 // optional uint64 num_irq_total = 5;
4194 if (cached_has_bits & 0x00000002u) {
4195 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_num_irq_total());
4196 }
4197
4198 // optional uint64 num_softirq_total = 7;
4199 if (cached_has_bits & 0x00000004u) {
4200 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_num_softirq_total());
4201 }
4202
4203 // optional uint64 collection_end_timestamp = 9;
4204 if (cached_has_bits & 0x00000008u) {
4205 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_collection_end_timestamp());
4206 }
4207
4208 }
4209 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4210 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4211 }
4212 int cached_size = ::_pbi::ToCachedSize(total_size);
4213 SetCachedSize(cached_size);
4214 return total_size;
4215 }
4216
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4217 void SysStats::CheckTypeAndMergeFrom(
4218 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4219 MergeFrom(*::_pbi::DownCast<const SysStats*>(
4220 &from));
4221 }
4222
MergeFrom(const SysStats & from)4223 void SysStats::MergeFrom(const SysStats& from) {
4224 SysStats* const _this = this;
4225 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.SysStats)
4226 GOOGLE_DCHECK_NE(&from, _this);
4227 ::uint32_t cached_has_bits = 0;
4228 (void) cached_has_bits;
4229
4230 _this->_impl_.meminfo_.MergeFrom(from._impl_.meminfo_);
4231 _this->_impl_.vmstat_.MergeFrom(from._impl_.vmstat_);
4232 _this->_impl_.cpu_stat_.MergeFrom(from._impl_.cpu_stat_);
4233 _this->_impl_.num_irq_.MergeFrom(from._impl_.num_irq_);
4234 _this->_impl_.num_softirq_.MergeFrom(from._impl_.num_softirq_);
4235 _this->_impl_.devfreq_.MergeFrom(from._impl_.devfreq_);
4236 _this->_impl_.cpufreq_khz_.MergeFrom(from._impl_.cpufreq_khz_);
4237 _this->_impl_.buddy_info_.MergeFrom(from._impl_.buddy_info_);
4238 _this->_impl_.disk_stat_.MergeFrom(from._impl_.disk_stat_);
4239 _this->_impl_.psi_.MergeFrom(from._impl_.psi_);
4240 _this->_impl_.thermal_zone_.MergeFrom(from._impl_.thermal_zone_);
4241 _this->_impl_.cpuidle_state_.MergeFrom(from._impl_.cpuidle_state_);
4242 _this->_impl_.gpufreq_mhz_.MergeFrom(from._impl_.gpufreq_mhz_);
4243 cached_has_bits = from._impl_._has_bits_[0];
4244 if (cached_has_bits & 0x0000000fu) {
4245 if (cached_has_bits & 0x00000001u) {
4246 _this->_impl_.num_forks_ = from._impl_.num_forks_;
4247 }
4248 if (cached_has_bits & 0x00000002u) {
4249 _this->_impl_.num_irq_total_ = from._impl_.num_irq_total_;
4250 }
4251 if (cached_has_bits & 0x00000004u) {
4252 _this->_impl_.num_softirq_total_ = from._impl_.num_softirq_total_;
4253 }
4254 if (cached_has_bits & 0x00000008u) {
4255 _this->_impl_.collection_end_timestamp_ = from._impl_.collection_end_timestamp_;
4256 }
4257 _this->_impl_._has_bits_[0] |= cached_has_bits;
4258 }
4259 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4260 }
4261
CopyFrom(const SysStats & from)4262 void SysStats::CopyFrom(const SysStats& from) {
4263 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.SysStats)
4264 if (&from == this) return;
4265 Clear();
4266 MergeFrom(from);
4267 }
4268
IsInitialized() const4269 bool SysStats::IsInitialized() const {
4270 return true;
4271 }
4272
InternalSwap(SysStats * other)4273 void SysStats::InternalSwap(SysStats* other) {
4274 using std::swap;
4275 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4276 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4277 _impl_.meminfo_.InternalSwap(&other->_impl_.meminfo_);
4278 _impl_.vmstat_.InternalSwap(&other->_impl_.vmstat_);
4279 _impl_.cpu_stat_.InternalSwap(&other->_impl_.cpu_stat_);
4280 _impl_.num_irq_.InternalSwap(&other->_impl_.num_irq_);
4281 _impl_.num_softirq_.InternalSwap(&other->_impl_.num_softirq_);
4282 _impl_.devfreq_.InternalSwap(&other->_impl_.devfreq_);
4283 _impl_.cpufreq_khz_.InternalSwap(&other->_impl_.cpufreq_khz_);
4284 _impl_.buddy_info_.InternalSwap(&other->_impl_.buddy_info_);
4285 _impl_.disk_stat_.InternalSwap(&other->_impl_.disk_stat_);
4286 _impl_.psi_.InternalSwap(&other->_impl_.psi_);
4287 _impl_.thermal_zone_.InternalSwap(&other->_impl_.thermal_zone_);
4288 _impl_.cpuidle_state_.InternalSwap(&other->_impl_.cpuidle_state_);
4289 _impl_.gpufreq_mhz_.InternalSwap(&other->_impl_.gpufreq_mhz_);
4290 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4291 PROTOBUF_FIELD_OFFSET(SysStats, _impl_.collection_end_timestamp_)
4292 + sizeof(SysStats::_impl_.collection_end_timestamp_) // NOLINT
4293 - PROTOBUF_FIELD_OFFSET(SysStats, _impl_.num_forks_)>(
4294 reinterpret_cast<char*>(&_impl_.num_forks_),
4295 reinterpret_cast<char*>(&other->_impl_.num_forks_));
4296 }
4297
GetTypeName() const4298 std::string SysStats::GetTypeName() const {
4299 return "perfetto.protos.SysStats";
4300 }
4301
4302
4303 // @@protoc_insertion_point(namespace_scope)
4304 } // namespace protos
4305 } // namespace perfetto
4306 PROTOBUF_NAMESPACE_OPEN
4307 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_MeminfoValue*
CreateMaybeMessage(Arena * arena)4308 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_MeminfoValue >(Arena* arena) {
4309 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_MeminfoValue >(arena);
4310 }
4311 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_VmstatValue*
CreateMaybeMessage(Arena * arena)4312 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_VmstatValue >(Arena* arena) {
4313 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_VmstatValue >(arena);
4314 }
4315 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_CpuTimes*
CreateMaybeMessage(Arena * arena)4316 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_CpuTimes >(Arena* arena) {
4317 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_CpuTimes >(arena);
4318 }
4319 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_InterruptCount*
CreateMaybeMessage(Arena * arena)4320 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_InterruptCount >(Arena* arena) {
4321 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_InterruptCount >(arena);
4322 }
4323 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_DevfreqValue*
CreateMaybeMessage(Arena * arena)4324 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_DevfreqValue >(Arena* arena) {
4325 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_DevfreqValue >(arena);
4326 }
4327 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_BuddyInfo*
CreateMaybeMessage(Arena * arena)4328 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_BuddyInfo >(Arena* arena) {
4329 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_BuddyInfo >(arena);
4330 }
4331 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_DiskStat*
CreateMaybeMessage(Arena * arena)4332 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_DiskStat >(Arena* arena) {
4333 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_DiskStat >(arena);
4334 }
4335 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_PsiSample*
CreateMaybeMessage(Arena * arena)4336 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_PsiSample >(Arena* arena) {
4337 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_PsiSample >(arena);
4338 }
4339 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_ThermalZone*
CreateMaybeMessage(Arena * arena)4340 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_ThermalZone >(Arena* arena) {
4341 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_ThermalZone >(arena);
4342 }
4343 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_CpuIdleStateEntry*
CreateMaybeMessage(Arena * arena)4344 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_CpuIdleStateEntry >(Arena* arena) {
4345 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_CpuIdleStateEntry >(arena);
4346 }
4347 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats_CpuIdleState*
CreateMaybeMessage(Arena * arena)4348 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats_CpuIdleState >(Arena* arena) {
4349 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats_CpuIdleState >(arena);
4350 }
4351 template<> PROTOBUF_NOINLINE ::perfetto::protos::SysStats*
CreateMaybeMessage(Arena * arena)4352 Arena::CreateMaybeMessage< ::perfetto::protos::SysStats >(Arena* arena) {
4353 return Arena::CreateMessageInternal< ::perfetto::protos::SysStats >(arena);
4354 }
4355 PROTOBUF_NAMESPACE_CLOSE
4356
4357 // @@protoc_insertion_point(global_scope)
4358 #include <google/protobuf/port_undef.inc>
4359