1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/profiler/profile.proto |
3 | |
4 | #include "tensorflow/core/profiler/profile.pb.h" |
5 | |
6 | #include <algorithm> |
7 | |
8 | #include <google/protobuf/stubs/common.h> |
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/descriptor.h> |
13 | #include <google/protobuf/generated_message_reflection.h> |
14 | #include <google/protobuf/reflection_ops.h> |
15 | #include <google/protobuf/wire_format.h> |
16 | // @@protoc_insertion_point(includes) |
17 | #include <google/protobuf/port_def.inc> |
18 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofile_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Function_tensorflow_2fcore_2fprofiler_2fprofile_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofile_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Label_tensorflow_2fcore_2fprofiler_2fprofile_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofile_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Line_tensorflow_2fcore_2fprofiler_2fprofile_2eproto; |
21 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofile_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Location_tensorflow_2fcore_2fprofiler_2fprofile_2eproto; |
22 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofile_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Mapping_tensorflow_2fcore_2fprofiler_2fprofile_2eproto; |
23 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofile_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Sample_tensorflow_2fcore_2fprofiler_2fprofile_2eproto; |
24 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2fprofile_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ValueType_tensorflow_2fcore_2fprofiler_2fprofile_2eproto; |
25 | namespace tensorflow { |
26 | namespace tfprof { |
27 | namespace pprof { |
28 | class ProfileDefaultTypeInternal { |
29 | public: |
30 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Profile> _instance; |
31 | } _Profile_default_instance_; |
32 | class ValueTypeDefaultTypeInternal { |
33 | public: |
34 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ValueType> _instance; |
35 | } _ValueType_default_instance_; |
36 | class SampleDefaultTypeInternal { |
37 | public: |
38 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Sample> _instance; |
39 | } _Sample_default_instance_; |
40 | class LabelDefaultTypeInternal { |
41 | public: |
42 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Label> _instance; |
43 | } _Label_default_instance_; |
44 | class MappingDefaultTypeInternal { |
45 | public: |
46 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Mapping> _instance; |
47 | } _Mapping_default_instance_; |
48 | class LocationDefaultTypeInternal { |
49 | public: |
50 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Location> _instance; |
51 | } _Location_default_instance_; |
52 | class LineDefaultTypeInternal { |
53 | public: |
54 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Line> _instance; |
55 | } _Line_default_instance_; |
56 | class FunctionDefaultTypeInternal { |
57 | public: |
58 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Function> _instance; |
59 | } _Function_default_instance_; |
60 | } // namespace pprof |
61 | } // namespace tfprof |
62 | } // namespace tensorflow |
63 | static void InitDefaultsscc_info_Function_tensorflow_2fcore_2fprofiler_2fprofile_2eproto() { |
64 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
65 | |
66 | { |
67 | void* ptr = &::tensorflow::tfprof::pprof::_Function_default_instance_; |
68 | new (ptr) ::tensorflow::tfprof::pprof::Function(); |
69 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
70 | } |
71 | ::tensorflow::tfprof::pprof::Function::InitAsDefaultInstance(); |
72 | } |
73 | |
74 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Function_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = |
75 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Function_tensorflow_2fcore_2fprofiler_2fprofile_2eproto}, {}}; |
76 | |
77 | static void InitDefaultsscc_info_Label_tensorflow_2fcore_2fprofiler_2fprofile_2eproto() { |
78 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
79 | |
80 | { |
81 | void* ptr = &::tensorflow::tfprof::pprof::_Label_default_instance_; |
82 | new (ptr) ::tensorflow::tfprof::pprof::Label(); |
83 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
84 | } |
85 | ::tensorflow::tfprof::pprof::Label::InitAsDefaultInstance(); |
86 | } |
87 | |
88 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Label_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = |
89 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Label_tensorflow_2fcore_2fprofiler_2fprofile_2eproto}, {}}; |
90 | |
91 | static void InitDefaultsscc_info_Line_tensorflow_2fcore_2fprofiler_2fprofile_2eproto() { |
92 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
93 | |
94 | { |
95 | void* ptr = &::tensorflow::tfprof::pprof::_Line_default_instance_; |
96 | new (ptr) ::tensorflow::tfprof::pprof::Line(); |
97 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
98 | } |
99 | ::tensorflow::tfprof::pprof::Line::InitAsDefaultInstance(); |
100 | } |
101 | |
102 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Line_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = |
103 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Line_tensorflow_2fcore_2fprofiler_2fprofile_2eproto}, {}}; |
104 | |
105 | static void InitDefaultsscc_info_Location_tensorflow_2fcore_2fprofiler_2fprofile_2eproto() { |
106 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
107 | |
108 | { |
109 | void* ptr = &::tensorflow::tfprof::pprof::_Location_default_instance_; |
110 | new (ptr) ::tensorflow::tfprof::pprof::Location(); |
111 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
112 | } |
113 | ::tensorflow::tfprof::pprof::Location::InitAsDefaultInstance(); |
114 | } |
115 | |
116 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Location_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = |
117 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Location_tensorflow_2fcore_2fprofiler_2fprofile_2eproto}, { |
118 | &scc_info_Line_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base,}}; |
119 | |
120 | static void InitDefaultsscc_info_Mapping_tensorflow_2fcore_2fprofiler_2fprofile_2eproto() { |
121 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
122 | |
123 | { |
124 | void* ptr = &::tensorflow::tfprof::pprof::_Mapping_default_instance_; |
125 | new (ptr) ::tensorflow::tfprof::pprof::Mapping(); |
126 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
127 | } |
128 | ::tensorflow::tfprof::pprof::Mapping::InitAsDefaultInstance(); |
129 | } |
130 | |
131 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Mapping_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = |
132 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Mapping_tensorflow_2fcore_2fprofiler_2fprofile_2eproto}, {}}; |
133 | |
134 | static void InitDefaultsscc_info_Profile_tensorflow_2fcore_2fprofiler_2fprofile_2eproto() { |
135 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
136 | |
137 | { |
138 | void* ptr = &::tensorflow::tfprof::pprof::_Profile_default_instance_; |
139 | new (ptr) ::tensorflow::tfprof::pprof::Profile(); |
140 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
141 | } |
142 | ::tensorflow::tfprof::pprof::Profile::InitAsDefaultInstance(); |
143 | } |
144 | |
145 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Profile_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = |
146 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, InitDefaultsscc_info_Profile_tensorflow_2fcore_2fprofiler_2fprofile_2eproto}, { |
147 | &scc_info_ValueType_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
148 | &scc_info_Sample_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
149 | &scc_info_Mapping_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
150 | &scc_info_Location_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
151 | &scc_info_Function_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base,}}; |
152 | |
153 | static void InitDefaultsscc_info_Sample_tensorflow_2fcore_2fprofiler_2fprofile_2eproto() { |
154 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
155 | |
156 | { |
157 | void* ptr = &::tensorflow::tfprof::pprof::_Sample_default_instance_; |
158 | new (ptr) ::tensorflow::tfprof::pprof::Sample(); |
159 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
160 | } |
161 | ::tensorflow::tfprof::pprof::Sample::InitAsDefaultInstance(); |
162 | } |
163 | |
164 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Sample_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = |
165 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Sample_tensorflow_2fcore_2fprofiler_2fprofile_2eproto}, { |
166 | &scc_info_Label_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base,}}; |
167 | |
168 | static void InitDefaultsscc_info_ValueType_tensorflow_2fcore_2fprofiler_2fprofile_2eproto() { |
169 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
170 | |
171 | { |
172 | void* ptr = &::tensorflow::tfprof::pprof::_ValueType_default_instance_; |
173 | new (ptr) ::tensorflow::tfprof::pprof::ValueType(); |
174 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
175 | } |
176 | ::tensorflow::tfprof::pprof::ValueType::InitAsDefaultInstance(); |
177 | } |
178 | |
179 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ValueType_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = |
180 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ValueType_tensorflow_2fcore_2fprofiler_2fprofile_2eproto}, {}}; |
181 | |
182 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprofiler_2fprofile_2eproto[8]; |
183 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = nullptr; |
184 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = nullptr; |
185 | |
186 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprofiler_2fprofile_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
187 | ~0u, // no _has_bits_ |
188 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, _internal_metadata_), |
189 | ~0u, // no _extensions_ |
190 | ~0u, // no _oneof_case_ |
191 | ~0u, // no _weak_field_map_ |
192 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, sample_type_), |
193 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, sample_), |
194 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, mapping_), |
195 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, location_), |
196 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, function_), |
197 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, string_table_), |
198 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, drop_frames_), |
199 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, keep_frames_), |
200 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, time_nanos_), |
201 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, duration_nanos_), |
202 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, period_type_), |
203 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, period_), |
204 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, comment_), |
205 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Profile, default_sample_type_), |
206 | ~0u, // no _has_bits_ |
207 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::ValueType, _internal_metadata_), |
208 | ~0u, // no _extensions_ |
209 | ~0u, // no _oneof_case_ |
210 | ~0u, // no _weak_field_map_ |
211 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::ValueType, type_), |
212 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::ValueType, unit_), |
213 | ~0u, // no _has_bits_ |
214 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Sample, _internal_metadata_), |
215 | ~0u, // no _extensions_ |
216 | ~0u, // no _oneof_case_ |
217 | ~0u, // no _weak_field_map_ |
218 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Sample, location_id_), |
219 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Sample, value_), |
220 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Sample, label_), |
221 | ~0u, // no _has_bits_ |
222 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Label, _internal_metadata_), |
223 | ~0u, // no _extensions_ |
224 | ~0u, // no _oneof_case_ |
225 | ~0u, // no _weak_field_map_ |
226 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Label, key_), |
227 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Label, str_), |
228 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Label, num_), |
229 | ~0u, // no _has_bits_ |
230 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, _internal_metadata_), |
231 | ~0u, // no _extensions_ |
232 | ~0u, // no _oneof_case_ |
233 | ~0u, // no _weak_field_map_ |
234 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, id_), |
235 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, memory_start_), |
236 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, memory_limit_), |
237 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, file_offset_), |
238 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, filename_), |
239 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, build_id_), |
240 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, has_functions_), |
241 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, has_filenames_), |
242 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, has_line_numbers_), |
243 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Mapping, has_inline_frames_), |
244 | ~0u, // no _has_bits_ |
245 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Location, _internal_metadata_), |
246 | ~0u, // no _extensions_ |
247 | ~0u, // no _oneof_case_ |
248 | ~0u, // no _weak_field_map_ |
249 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Location, id_), |
250 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Location, mapping_id_), |
251 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Location, address_), |
252 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Location, line_), |
253 | ~0u, // no _has_bits_ |
254 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Line, _internal_metadata_), |
255 | ~0u, // no _extensions_ |
256 | ~0u, // no _oneof_case_ |
257 | ~0u, // no _weak_field_map_ |
258 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Line, function_id_), |
259 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Line, line_), |
260 | ~0u, // no _has_bits_ |
261 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Function, _internal_metadata_), |
262 | ~0u, // no _extensions_ |
263 | ~0u, // no _oneof_case_ |
264 | ~0u, // no _weak_field_map_ |
265 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Function, id_), |
266 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Function, name_), |
267 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Function, system_name_), |
268 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Function, filename_), |
269 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::pprof::Function, start_line_), |
270 | }; |
271 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
272 | { 0, -1, sizeof(::tensorflow::tfprof::pprof::Profile)}, |
273 | { 19, -1, sizeof(::tensorflow::tfprof::pprof::ValueType)}, |
274 | { 26, -1, sizeof(::tensorflow::tfprof::pprof::Sample)}, |
275 | { 34, -1, sizeof(::tensorflow::tfprof::pprof::Label)}, |
276 | { 42, -1, sizeof(::tensorflow::tfprof::pprof::Mapping)}, |
277 | { 57, -1, sizeof(::tensorflow::tfprof::pprof::Location)}, |
278 | { 66, -1, sizeof(::tensorflow::tfprof::pprof::Line)}, |
279 | { 73, -1, sizeof(::tensorflow::tfprof::pprof::Function)}, |
280 | }; |
281 | |
282 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
283 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::pprof::_Profile_default_instance_), |
284 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::pprof::_ValueType_default_instance_), |
285 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::pprof::_Sample_default_instance_), |
286 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::pprof::_Label_default_instance_), |
287 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::pprof::_Mapping_default_instance_), |
288 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::pprof::_Location_default_instance_), |
289 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::pprof::_Line_default_instance_), |
290 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::pprof::_Function_default_instance_), |
291 | }; |
292 | |
293 | const char descriptor_table_protodef_tensorflow_2fcore_2fprofiler_2fprofile_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
294 | "\n&tensorflow/core/profiler/profile.proto" |
295 | "\022\027tensorflow.tfprof.pprof\"\363\003\n\007Profile\0227\n" |
296 | "\013sample_type\030\001 \003(\0132\".tensorflow.tfprof.p" |
297 | "prof.ValueType\022/\n\006sample\030\002 \003(\0132\037.tensorf" |
298 | "low.tfprof.pprof.Sample\0221\n\007mapping\030\003 \003(\013" |
299 | "2 .tensorflow.tfprof.pprof.Mapping\0223\n\010lo" |
300 | "cation\030\004 \003(\0132!.tensorflow.tfprof.pprof.L" |
301 | "ocation\0223\n\010function\030\005 \003(\0132!.tensorflow.t" |
302 | "fprof.pprof.Function\022\024\n\014string_table\030\006 \003" |
303 | "(\t\022\023\n\013drop_frames\030\007 \001(\003\022\023\n\013keep_frames\030\010" |
304 | " \001(\003\022\022\n\ntime_nanos\030\t \001(\003\022\026\n\016duration_nan" |
305 | "os\030\n \001(\003\0227\n\013period_type\030\013 \001(\0132\".tensorfl" |
306 | "ow.tfprof.pprof.ValueType\022\016\n\006period\030\014 \001(" |
307 | "\003\022\017\n\007comment\030\r \003(\003\022\033\n\023default_sample_typ" |
308 | "e\030\016 \001(\003\"\'\n\tValueType\022\014\n\004type\030\001 \001(\003\022\014\n\004un" |
309 | "it\030\002 \001(\003\"[\n\006Sample\022\023\n\013location_id\030\001 \003(\004\022" |
310 | "\r\n\005value\030\002 \003(\003\022-\n\005label\030\003 \003(\0132\036.tensorfl" |
311 | "ow.tfprof.pprof.Label\".\n\005Label\022\013\n\003key\030\001 " |
312 | "\001(\003\022\013\n\003str\030\002 \001(\003\022\013\n\003num\030\003 \001(\003\"\335\001\n\007Mappin" |
313 | "g\022\n\n\002id\030\001 \001(\004\022\024\n\014memory_start\030\002 \001(\004\022\024\n\014m" |
314 | "emory_limit\030\003 \001(\004\022\023\n\013file_offset\030\004 \001(\004\022\020" |
315 | "\n\010filename\030\005 \001(\003\022\020\n\010build_id\030\006 \001(\003\022\025\n\rha" |
316 | "s_functions\030\007 \001(\010\022\025\n\rhas_filenames\030\010 \001(\010" |
317 | "\022\030\n\020has_line_numbers\030\t \001(\010\022\031\n\021has_inline" |
318 | "_frames\030\n \001(\010\"h\n\010Location\022\n\n\002id\030\001 \001(\004\022\022\n" |
319 | "\nmapping_id\030\002 \001(\004\022\017\n\007address\030\003 \001(\004\022+\n\004li" |
320 | "ne\030\004 \003(\0132\035.tensorflow.tfprof.pprof.Line\"" |
321 | ")\n\004Line\022\023\n\013function_id\030\001 \001(\004\022\014\n\004line\030\002 \001" |
322 | "(\003\"_\n\010Function\022\n\n\002id\030\001 \001(\004\022\014\n\004name\030\002 \001(\003" |
323 | "\022\023\n\013system_name\030\003 \001(\003\022\020\n\010filename\030\004 \001(\003\022" |
324 | "\022\n\nstart_line\030\005 \001(\003b\006proto3" |
325 | ; |
326 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto_deps[1] = { |
327 | }; |
328 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto_sccs[8] = { |
329 | &scc_info_Function_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
330 | &scc_info_Label_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
331 | &scc_info_Line_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
332 | &scc_info_Location_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
333 | &scc_info_Mapping_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
334 | &scc_info_Profile_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
335 | &scc_info_Sample_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
336 | &scc_info_ValueType_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base, |
337 | }; |
338 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto_once; |
339 | static bool descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto_initialized = false; |
340 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = { |
341 | &descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprofiler_2fprofile_2eproto, "tensorflow/core/profiler/profile.proto" , 1227, |
342 | &descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto_once, descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto_deps, 8, 0, |
343 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprofiler_2fprofile_2eproto::offsets, |
344 | file_level_metadata_tensorflow_2fcore_2fprofiler_2fprofile_2eproto, 8, file_level_enum_descriptors_tensorflow_2fcore_2fprofiler_2fprofile_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprofiler_2fprofile_2eproto, |
345 | }; |
346 | |
347 | // Force running AddDescriptors() at dynamic initialization time. |
348 | static bool dynamic_init_dummy_tensorflow_2fcore_2fprofiler_2fprofile_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprofiler_2fprofile_2eproto), true); |
349 | namespace tensorflow { |
350 | namespace tfprof { |
351 | namespace pprof { |
352 | |
353 | // =================================================================== |
354 | |
355 | void Profile::InitAsDefaultInstance() { |
356 | ::tensorflow::tfprof::pprof::_Profile_default_instance_._instance.get_mutable()->period_type_ = const_cast< ::tensorflow::tfprof::pprof::ValueType*>( |
357 | ::tensorflow::tfprof::pprof::ValueType::internal_default_instance()); |
358 | } |
359 | class Profile::_Internal { |
360 | public: |
361 | static const ::tensorflow::tfprof::pprof::ValueType& period_type(const Profile* msg); |
362 | }; |
363 | |
364 | const ::tensorflow::tfprof::pprof::ValueType& |
365 | Profile::_Internal::period_type(const Profile* msg) { |
366 | return *msg->period_type_; |
367 | } |
368 | Profile::Profile() |
369 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
370 | SharedCtor(); |
371 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.pprof.Profile) |
372 | } |
373 | Profile::Profile(const Profile& from) |
374 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
375 | _internal_metadata_(nullptr), |
376 | sample_type_(from.sample_type_), |
377 | sample_(from.sample_), |
378 | mapping_(from.mapping_), |
379 | location_(from.location_), |
380 | function_(from.function_), |
381 | string_table_(from.string_table_), |
382 | comment_(from.comment_) { |
383 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
384 | if (from.has_period_type()) { |
385 | period_type_ = new ::tensorflow::tfprof::pprof::ValueType(*from.period_type_); |
386 | } else { |
387 | period_type_ = nullptr; |
388 | } |
389 | ::memcpy(&drop_frames_, &from.drop_frames_, |
390 | static_cast<size_t>(reinterpret_cast<char*>(&default_sample_type_) - |
391 | reinterpret_cast<char*>(&drop_frames_)) + sizeof(default_sample_type_)); |
392 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.pprof.Profile) |
393 | } |
394 | |
395 | void Profile::SharedCtor() { |
396 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Profile_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
397 | ::memset(&period_type_, 0, static_cast<size_t>( |
398 | reinterpret_cast<char*>(&default_sample_type_) - |
399 | reinterpret_cast<char*>(&period_type_)) + sizeof(default_sample_type_)); |
400 | } |
401 | |
402 | Profile::~Profile() { |
403 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.pprof.Profile) |
404 | SharedDtor(); |
405 | } |
406 | |
407 | void Profile::SharedDtor() { |
408 | if (this != internal_default_instance()) delete period_type_; |
409 | } |
410 | |
411 | void Profile::SetCachedSize(int size) const { |
412 | _cached_size_.Set(size); |
413 | } |
414 | const Profile& Profile::default_instance() { |
415 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Profile_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
416 | return *internal_default_instance(); |
417 | } |
418 | |
419 | |
420 | void Profile::Clear() { |
421 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.pprof.Profile) |
422 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
423 | // Prevent compiler warnings about cached_has_bits being unused |
424 | (void) cached_has_bits; |
425 | |
426 | sample_type_.Clear(); |
427 | sample_.Clear(); |
428 | mapping_.Clear(); |
429 | location_.Clear(); |
430 | function_.Clear(); |
431 | string_table_.Clear(); |
432 | comment_.Clear(); |
433 | if (GetArenaNoVirtual() == nullptr && period_type_ != nullptr) { |
434 | delete period_type_; |
435 | } |
436 | period_type_ = nullptr; |
437 | ::memset(&drop_frames_, 0, static_cast<size_t>( |
438 | reinterpret_cast<char*>(&default_sample_type_) - |
439 | reinterpret_cast<char*>(&drop_frames_)) + sizeof(default_sample_type_)); |
440 | _internal_metadata_.Clear(); |
441 | } |
442 | |
443 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
444 | const char* Profile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
445 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
446 | while (!ctx->Done(&ptr)) { |
447 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
448 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
449 | CHK_(ptr); |
450 | switch (tag >> 3) { |
451 | // repeated .tensorflow.tfprof.pprof.ValueType sample_type = 1; |
452 | case 1: |
453 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
454 | ptr -= 1; |
455 | do { |
456 | ptr += 1; |
457 | ptr = ctx->ParseMessage(add_sample_type(), ptr); |
458 | CHK_(ptr); |
459 | if (!ctx->DataAvailable(ptr)) break; |
460 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
461 | } else goto handle_unusual; |
462 | continue; |
463 | // repeated .tensorflow.tfprof.pprof.Sample sample = 2; |
464 | case 2: |
465 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
466 | ptr -= 1; |
467 | do { |
468 | ptr += 1; |
469 | ptr = ctx->ParseMessage(add_sample(), ptr); |
470 | CHK_(ptr); |
471 | if (!ctx->DataAvailable(ptr)) break; |
472 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
473 | } else goto handle_unusual; |
474 | continue; |
475 | // repeated .tensorflow.tfprof.pprof.Mapping mapping = 3; |
476 | case 3: |
477 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
478 | ptr -= 1; |
479 | do { |
480 | ptr += 1; |
481 | ptr = ctx->ParseMessage(add_mapping(), ptr); |
482 | CHK_(ptr); |
483 | if (!ctx->DataAvailable(ptr)) break; |
484 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); |
485 | } else goto handle_unusual; |
486 | continue; |
487 | // repeated .tensorflow.tfprof.pprof.Location location = 4; |
488 | case 4: |
489 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
490 | ptr -= 1; |
491 | do { |
492 | ptr += 1; |
493 | ptr = ctx->ParseMessage(add_location(), ptr); |
494 | CHK_(ptr); |
495 | if (!ctx->DataAvailable(ptr)) break; |
496 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); |
497 | } else goto handle_unusual; |
498 | continue; |
499 | // repeated .tensorflow.tfprof.pprof.Function function = 5; |
500 | case 5: |
501 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
502 | ptr -= 1; |
503 | do { |
504 | ptr += 1; |
505 | ptr = ctx->ParseMessage(add_function(), ptr); |
506 | CHK_(ptr); |
507 | if (!ctx->DataAvailable(ptr)) break; |
508 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); |
509 | } else goto handle_unusual; |
510 | continue; |
511 | // repeated string string_table = 6; |
512 | case 6: |
513 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
514 | ptr -= 1; |
515 | do { |
516 | ptr += 1; |
517 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_string_table(), ptr, ctx, "tensorflow.tfprof.pprof.Profile.string_table" ); |
518 | CHK_(ptr); |
519 | if (!ctx->DataAvailable(ptr)) break; |
520 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); |
521 | } else goto handle_unusual; |
522 | continue; |
523 | // int64 drop_frames = 7; |
524 | case 7: |
525 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { |
526 | drop_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
527 | CHK_(ptr); |
528 | } else goto handle_unusual; |
529 | continue; |
530 | // int64 keep_frames = 8; |
531 | case 8: |
532 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { |
533 | keep_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
534 | CHK_(ptr); |
535 | } else goto handle_unusual; |
536 | continue; |
537 | // int64 time_nanos = 9; |
538 | case 9: |
539 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { |
540 | time_nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
541 | CHK_(ptr); |
542 | } else goto handle_unusual; |
543 | continue; |
544 | // int64 duration_nanos = 10; |
545 | case 10: |
546 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { |
547 | duration_nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
548 | CHK_(ptr); |
549 | } else goto handle_unusual; |
550 | continue; |
551 | // .tensorflow.tfprof.pprof.ValueType period_type = 11; |
552 | case 11: |
553 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) { |
554 | ptr = ctx->ParseMessage(mutable_period_type(), ptr); |
555 | CHK_(ptr); |
556 | } else goto handle_unusual; |
557 | continue; |
558 | // int64 period = 12; |
559 | case 12: |
560 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { |
561 | period_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
562 | CHK_(ptr); |
563 | } else goto handle_unusual; |
564 | continue; |
565 | // repeated int64 comment = 13; |
566 | case 13: |
567 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { |
568 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_comment(), ptr, ctx); |
569 | CHK_(ptr); |
570 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104) { |
571 | add_comment(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
572 | CHK_(ptr); |
573 | } else goto handle_unusual; |
574 | continue; |
575 | // int64 default_sample_type = 14; |
576 | case 14: |
577 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { |
578 | default_sample_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
579 | CHK_(ptr); |
580 | } else goto handle_unusual; |
581 | continue; |
582 | default: { |
583 | handle_unusual: |
584 | if ((tag & 7) == 4 || tag == 0) { |
585 | ctx->SetLastTag(tag); |
586 | goto success; |
587 | } |
588 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
589 | CHK_(ptr != nullptr); |
590 | continue; |
591 | } |
592 | } // switch |
593 | } // while |
594 | success: |
595 | return ptr; |
596 | failure: |
597 | ptr = nullptr; |
598 | goto success; |
599 | #undef CHK_ |
600 | } |
601 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
602 | bool Profile::MergePartialFromCodedStream( |
603 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
604 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
605 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
606 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.pprof.Profile) |
607 | for (;;) { |
608 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
609 | tag = p.first; |
610 | if (!p.second) goto handle_unusual; |
611 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
612 | // repeated .tensorflow.tfprof.pprof.ValueType sample_type = 1; |
613 | case 1: { |
614 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
615 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
616 | input, add_sample_type())); |
617 | } else { |
618 | goto handle_unusual; |
619 | } |
620 | break; |
621 | } |
622 | |
623 | // repeated .tensorflow.tfprof.pprof.Sample sample = 2; |
624 | case 2: { |
625 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
626 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
627 | input, add_sample())); |
628 | } else { |
629 | goto handle_unusual; |
630 | } |
631 | break; |
632 | } |
633 | |
634 | // repeated .tensorflow.tfprof.pprof.Mapping mapping = 3; |
635 | case 3: { |
636 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
637 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
638 | input, add_mapping())); |
639 | } else { |
640 | goto handle_unusual; |
641 | } |
642 | break; |
643 | } |
644 | |
645 | // repeated .tensorflow.tfprof.pprof.Location location = 4; |
646 | case 4: { |
647 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
648 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
649 | input, add_location())); |
650 | } else { |
651 | goto handle_unusual; |
652 | } |
653 | break; |
654 | } |
655 | |
656 | // repeated .tensorflow.tfprof.pprof.Function function = 5; |
657 | case 5: { |
658 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
659 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
660 | input, add_function())); |
661 | } else { |
662 | goto handle_unusual; |
663 | } |
664 | break; |
665 | } |
666 | |
667 | // repeated string string_table = 6; |
668 | case 6: { |
669 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
670 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
671 | input, this->add_string_table())); |
672 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
673 | this->string_table(this->string_table_size() - 1).data(), |
674 | static_cast<int>(this->string_table(this->string_table_size() - 1).length()), |
675 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
676 | "tensorflow.tfprof.pprof.Profile.string_table" )); |
677 | } else { |
678 | goto handle_unusual; |
679 | } |
680 | break; |
681 | } |
682 | |
683 | // int64 drop_frames = 7; |
684 | case 7: { |
685 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { |
686 | |
687 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
688 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
689 | input, &drop_frames_))); |
690 | } else { |
691 | goto handle_unusual; |
692 | } |
693 | break; |
694 | } |
695 | |
696 | // int64 keep_frames = 8; |
697 | case 8: { |
698 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) { |
699 | |
700 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
701 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
702 | input, &keep_frames_))); |
703 | } else { |
704 | goto handle_unusual; |
705 | } |
706 | break; |
707 | } |
708 | |
709 | // int64 time_nanos = 9; |
710 | case 9: { |
711 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { |
712 | |
713 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
714 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
715 | input, &time_nanos_))); |
716 | } else { |
717 | goto handle_unusual; |
718 | } |
719 | break; |
720 | } |
721 | |
722 | // int64 duration_nanos = 10; |
723 | case 10: { |
724 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { |
725 | |
726 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
727 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
728 | input, &duration_nanos_))); |
729 | } else { |
730 | goto handle_unusual; |
731 | } |
732 | break; |
733 | } |
734 | |
735 | // .tensorflow.tfprof.pprof.ValueType period_type = 11; |
736 | case 11: { |
737 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { |
738 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
739 | input, mutable_period_type())); |
740 | } else { |
741 | goto handle_unusual; |
742 | } |
743 | break; |
744 | } |
745 | |
746 | // int64 period = 12; |
747 | case 12: { |
748 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (96 & 0xFF)) { |
749 | |
750 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
751 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
752 | input, &period_))); |
753 | } else { |
754 | goto handle_unusual; |
755 | } |
756 | break; |
757 | } |
758 | |
759 | // repeated int64 comment = 13; |
760 | case 13: { |
761 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (106 & 0xFF)) { |
762 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
763 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
764 | input, this->mutable_comment()))); |
765 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (104 & 0xFF)) { |
766 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
767 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
768 | 1, 106u, input, this->mutable_comment()))); |
769 | } else { |
770 | goto handle_unusual; |
771 | } |
772 | break; |
773 | } |
774 | |
775 | // int64 default_sample_type = 14; |
776 | case 14: { |
777 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (112 & 0xFF)) { |
778 | |
779 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
780 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
781 | input, &default_sample_type_))); |
782 | } else { |
783 | goto handle_unusual; |
784 | } |
785 | break; |
786 | } |
787 | |
788 | default: { |
789 | handle_unusual: |
790 | if (tag == 0) { |
791 | goto success; |
792 | } |
793 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
794 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
795 | break; |
796 | } |
797 | } |
798 | } |
799 | success: |
800 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.pprof.Profile) |
801 | return true; |
802 | failure: |
803 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.pprof.Profile) |
804 | return false; |
805 | #undef DO_ |
806 | } |
807 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
808 | |
809 | void Profile::SerializeWithCachedSizes( |
810 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
811 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.pprof.Profile) |
812 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
813 | (void) cached_has_bits; |
814 | |
815 | // repeated .tensorflow.tfprof.pprof.ValueType sample_type = 1; |
816 | for (unsigned int i = 0, |
817 | n = static_cast<unsigned int>(this->sample_type_size()); i < n; i++) { |
818 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
819 | 1, |
820 | this->sample_type(static_cast<int>(i)), |
821 | output); |
822 | } |
823 | |
824 | // repeated .tensorflow.tfprof.pprof.Sample sample = 2; |
825 | for (unsigned int i = 0, |
826 | n = static_cast<unsigned int>(this->sample_size()); i < n; i++) { |
827 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
828 | 2, |
829 | this->sample(static_cast<int>(i)), |
830 | output); |
831 | } |
832 | |
833 | // repeated .tensorflow.tfprof.pprof.Mapping mapping = 3; |
834 | for (unsigned int i = 0, |
835 | n = static_cast<unsigned int>(this->mapping_size()); i < n; i++) { |
836 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
837 | 3, |
838 | this->mapping(static_cast<int>(i)), |
839 | output); |
840 | } |
841 | |
842 | // repeated .tensorflow.tfprof.pprof.Location location = 4; |
843 | for (unsigned int i = 0, |
844 | n = static_cast<unsigned int>(this->location_size()); i < n; i++) { |
845 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
846 | 4, |
847 | this->location(static_cast<int>(i)), |
848 | output); |
849 | } |
850 | |
851 | // repeated .tensorflow.tfprof.pprof.Function function = 5; |
852 | for (unsigned int i = 0, |
853 | n = static_cast<unsigned int>(this->function_size()); i < n; i++) { |
854 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
855 | 5, |
856 | this->function(static_cast<int>(i)), |
857 | output); |
858 | } |
859 | |
860 | // repeated string string_table = 6; |
861 | for (int i = 0, n = this->string_table_size(); i < n; i++) { |
862 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
863 | this->string_table(i).data(), static_cast<int>(this->string_table(i).length()), |
864 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
865 | "tensorflow.tfprof.pprof.Profile.string_table" ); |
866 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
867 | 6, this->string_table(i), output); |
868 | } |
869 | |
870 | // int64 drop_frames = 7; |
871 | if (this->drop_frames() != 0) { |
872 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(7, this->drop_frames(), output); |
873 | } |
874 | |
875 | // int64 keep_frames = 8; |
876 | if (this->keep_frames() != 0) { |
877 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(8, this->keep_frames(), output); |
878 | } |
879 | |
880 | // int64 time_nanos = 9; |
881 | if (this->time_nanos() != 0) { |
882 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(9, this->time_nanos(), output); |
883 | } |
884 | |
885 | // int64 duration_nanos = 10; |
886 | if (this->duration_nanos() != 0) { |
887 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(10, this->duration_nanos(), output); |
888 | } |
889 | |
890 | // .tensorflow.tfprof.pprof.ValueType period_type = 11; |
891 | if (this->has_period_type()) { |
892 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
893 | 11, _Internal::period_type(this), output); |
894 | } |
895 | |
896 | // int64 period = 12; |
897 | if (this->period() != 0) { |
898 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(12, this->period(), output); |
899 | } |
900 | |
901 | // repeated int64 comment = 13; |
902 | if (this->comment_size() > 0) { |
903 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(13, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
904 | output->WriteVarint32(_comment_cached_byte_size_.load( |
905 | std::memory_order_relaxed)); |
906 | } |
907 | for (int i = 0, n = this->comment_size(); i < n; i++) { |
908 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( |
909 | this->comment(i), output); |
910 | } |
911 | |
912 | // int64 default_sample_type = 14; |
913 | if (this->default_sample_type() != 0) { |
914 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(14, this->default_sample_type(), output); |
915 | } |
916 | |
917 | if (_internal_metadata_.have_unknown_fields()) { |
918 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
919 | _internal_metadata_.unknown_fields(), output); |
920 | } |
921 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.pprof.Profile) |
922 | } |
923 | |
924 | ::PROTOBUF_NAMESPACE_ID::uint8* Profile::InternalSerializeWithCachedSizesToArray( |
925 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
926 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.pprof.Profile) |
927 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
928 | (void) cached_has_bits; |
929 | |
930 | // repeated .tensorflow.tfprof.pprof.ValueType sample_type = 1; |
931 | for (unsigned int i = 0, |
932 | n = static_cast<unsigned int>(this->sample_type_size()); i < n; i++) { |
933 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
934 | InternalWriteMessageToArray( |
935 | 1, this->sample_type(static_cast<int>(i)), target); |
936 | } |
937 | |
938 | // repeated .tensorflow.tfprof.pprof.Sample sample = 2; |
939 | for (unsigned int i = 0, |
940 | n = static_cast<unsigned int>(this->sample_size()); i < n; i++) { |
941 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
942 | InternalWriteMessageToArray( |
943 | 2, this->sample(static_cast<int>(i)), target); |
944 | } |
945 | |
946 | // repeated .tensorflow.tfprof.pprof.Mapping mapping = 3; |
947 | for (unsigned int i = 0, |
948 | n = static_cast<unsigned int>(this->mapping_size()); i < n; i++) { |
949 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
950 | InternalWriteMessageToArray( |
951 | 3, this->mapping(static_cast<int>(i)), target); |
952 | } |
953 | |
954 | // repeated .tensorflow.tfprof.pprof.Location location = 4; |
955 | for (unsigned int i = 0, |
956 | n = static_cast<unsigned int>(this->location_size()); i < n; i++) { |
957 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
958 | InternalWriteMessageToArray( |
959 | 4, this->location(static_cast<int>(i)), target); |
960 | } |
961 | |
962 | // repeated .tensorflow.tfprof.pprof.Function function = 5; |
963 | for (unsigned int i = 0, |
964 | n = static_cast<unsigned int>(this->function_size()); i < n; i++) { |
965 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
966 | InternalWriteMessageToArray( |
967 | 5, this->function(static_cast<int>(i)), target); |
968 | } |
969 | |
970 | // repeated string string_table = 6; |
971 | for (int i = 0, n = this->string_table_size(); i < n; i++) { |
972 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
973 | this->string_table(i).data(), static_cast<int>(this->string_table(i).length()), |
974 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
975 | "tensorflow.tfprof.pprof.Profile.string_table" ); |
976 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
977 | WriteStringToArray(6, this->string_table(i), target); |
978 | } |
979 | |
980 | // int64 drop_frames = 7; |
981 | if (this->drop_frames() != 0) { |
982 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(7, this->drop_frames(), target); |
983 | } |
984 | |
985 | // int64 keep_frames = 8; |
986 | if (this->keep_frames() != 0) { |
987 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->keep_frames(), target); |
988 | } |
989 | |
990 | // int64 time_nanos = 9; |
991 | if (this->time_nanos() != 0) { |
992 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->time_nanos(), target); |
993 | } |
994 | |
995 | // int64 duration_nanos = 10; |
996 | if (this->duration_nanos() != 0) { |
997 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(10, this->duration_nanos(), target); |
998 | } |
999 | |
1000 | // .tensorflow.tfprof.pprof.ValueType period_type = 11; |
1001 | if (this->has_period_type()) { |
1002 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1003 | InternalWriteMessageToArray( |
1004 | 11, _Internal::period_type(this), target); |
1005 | } |
1006 | |
1007 | // int64 period = 12; |
1008 | if (this->period() != 0) { |
1009 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(12, this->period(), target); |
1010 | } |
1011 | |
1012 | // repeated int64 comment = 13; |
1013 | if (this->comment_size() > 0) { |
1014 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
1015 | 13, |
1016 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
1017 | target); |
1018 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
1019 | _comment_cached_byte_size_.load(std::memory_order_relaxed), |
1020 | target); |
1021 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1022 | WriteInt64NoTagToArray(this->comment_, target); |
1023 | } |
1024 | |
1025 | // int64 default_sample_type = 14; |
1026 | if (this->default_sample_type() != 0) { |
1027 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(14, this->default_sample_type(), target); |
1028 | } |
1029 | |
1030 | if (_internal_metadata_.have_unknown_fields()) { |
1031 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1032 | _internal_metadata_.unknown_fields(), target); |
1033 | } |
1034 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.pprof.Profile) |
1035 | return target; |
1036 | } |
1037 | |
1038 | size_t Profile::ByteSizeLong() const { |
1039 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.pprof.Profile) |
1040 | size_t total_size = 0; |
1041 | |
1042 | if (_internal_metadata_.have_unknown_fields()) { |
1043 | total_size += |
1044 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1045 | _internal_metadata_.unknown_fields()); |
1046 | } |
1047 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1048 | // Prevent compiler warnings about cached_has_bits being unused |
1049 | (void) cached_has_bits; |
1050 | |
1051 | // repeated .tensorflow.tfprof.pprof.ValueType sample_type = 1; |
1052 | { |
1053 | unsigned int count = static_cast<unsigned int>(this->sample_type_size()); |
1054 | total_size += 1UL * count; |
1055 | for (unsigned int i = 0; i < count; i++) { |
1056 | total_size += |
1057 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1058 | this->sample_type(static_cast<int>(i))); |
1059 | } |
1060 | } |
1061 | |
1062 | // repeated .tensorflow.tfprof.pprof.Sample sample = 2; |
1063 | { |
1064 | unsigned int count = static_cast<unsigned int>(this->sample_size()); |
1065 | total_size += 1UL * count; |
1066 | for (unsigned int i = 0; i < count; i++) { |
1067 | total_size += |
1068 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1069 | this->sample(static_cast<int>(i))); |
1070 | } |
1071 | } |
1072 | |
1073 | // repeated .tensorflow.tfprof.pprof.Mapping mapping = 3; |
1074 | { |
1075 | unsigned int count = static_cast<unsigned int>(this->mapping_size()); |
1076 | total_size += 1UL * count; |
1077 | for (unsigned int i = 0; i < count; i++) { |
1078 | total_size += |
1079 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1080 | this->mapping(static_cast<int>(i))); |
1081 | } |
1082 | } |
1083 | |
1084 | // repeated .tensorflow.tfprof.pprof.Location location = 4; |
1085 | { |
1086 | unsigned int count = static_cast<unsigned int>(this->location_size()); |
1087 | total_size += 1UL * count; |
1088 | for (unsigned int i = 0; i < count; i++) { |
1089 | total_size += |
1090 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1091 | this->location(static_cast<int>(i))); |
1092 | } |
1093 | } |
1094 | |
1095 | // repeated .tensorflow.tfprof.pprof.Function function = 5; |
1096 | { |
1097 | unsigned int count = static_cast<unsigned int>(this->function_size()); |
1098 | total_size += 1UL * count; |
1099 | for (unsigned int i = 0; i < count; i++) { |
1100 | total_size += |
1101 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1102 | this->function(static_cast<int>(i))); |
1103 | } |
1104 | } |
1105 | |
1106 | // repeated string string_table = 6; |
1107 | total_size += 1 * |
1108 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->string_table_size()); |
1109 | for (int i = 0, n = this->string_table_size(); i < n; i++) { |
1110 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1111 | this->string_table(i)); |
1112 | } |
1113 | |
1114 | // repeated int64 comment = 13; |
1115 | { |
1116 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1117 | Int64Size(this->comment_); |
1118 | if (data_size > 0) { |
1119 | total_size += 1 + |
1120 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1121 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
1122 | } |
1123 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
1124 | _comment_cached_byte_size_.store(cached_size, |
1125 | std::memory_order_relaxed); |
1126 | total_size += data_size; |
1127 | } |
1128 | |
1129 | // .tensorflow.tfprof.pprof.ValueType period_type = 11; |
1130 | if (this->has_period_type()) { |
1131 | total_size += 1 + |
1132 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1133 | *period_type_); |
1134 | } |
1135 | |
1136 | // int64 drop_frames = 7; |
1137 | if (this->drop_frames() != 0) { |
1138 | total_size += 1 + |
1139 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1140 | this->drop_frames()); |
1141 | } |
1142 | |
1143 | // int64 keep_frames = 8; |
1144 | if (this->keep_frames() != 0) { |
1145 | total_size += 1 + |
1146 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1147 | this->keep_frames()); |
1148 | } |
1149 | |
1150 | // int64 time_nanos = 9; |
1151 | if (this->time_nanos() != 0) { |
1152 | total_size += 1 + |
1153 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1154 | this->time_nanos()); |
1155 | } |
1156 | |
1157 | // int64 duration_nanos = 10; |
1158 | if (this->duration_nanos() != 0) { |
1159 | total_size += 1 + |
1160 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1161 | this->duration_nanos()); |
1162 | } |
1163 | |
1164 | // int64 period = 12; |
1165 | if (this->period() != 0) { |
1166 | total_size += 1 + |
1167 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1168 | this->period()); |
1169 | } |
1170 | |
1171 | // int64 default_sample_type = 14; |
1172 | if (this->default_sample_type() != 0) { |
1173 | total_size += 1 + |
1174 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1175 | this->default_sample_type()); |
1176 | } |
1177 | |
1178 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1179 | SetCachedSize(cached_size); |
1180 | return total_size; |
1181 | } |
1182 | |
1183 | void Profile::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1184 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.pprof.Profile) |
1185 | GOOGLE_DCHECK_NE(&from, this); |
1186 | const Profile* source = |
1187 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Profile>( |
1188 | &from); |
1189 | if (source == nullptr) { |
1190 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.pprof.Profile) |
1191 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1192 | } else { |
1193 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.pprof.Profile) |
1194 | MergeFrom(*source); |
1195 | } |
1196 | } |
1197 | |
1198 | void Profile::MergeFrom(const Profile& from) { |
1199 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.pprof.Profile) |
1200 | GOOGLE_DCHECK_NE(&from, this); |
1201 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1202 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1203 | (void) cached_has_bits; |
1204 | |
1205 | sample_type_.MergeFrom(from.sample_type_); |
1206 | sample_.MergeFrom(from.sample_); |
1207 | mapping_.MergeFrom(from.mapping_); |
1208 | location_.MergeFrom(from.location_); |
1209 | function_.MergeFrom(from.function_); |
1210 | string_table_.MergeFrom(from.string_table_); |
1211 | comment_.MergeFrom(from.comment_); |
1212 | if (from.has_period_type()) { |
1213 | mutable_period_type()->::tensorflow::tfprof::pprof::ValueType::MergeFrom(from.period_type()); |
1214 | } |
1215 | if (from.drop_frames() != 0) { |
1216 | set_drop_frames(from.drop_frames()); |
1217 | } |
1218 | if (from.keep_frames() != 0) { |
1219 | set_keep_frames(from.keep_frames()); |
1220 | } |
1221 | if (from.time_nanos() != 0) { |
1222 | set_time_nanos(from.time_nanos()); |
1223 | } |
1224 | if (from.duration_nanos() != 0) { |
1225 | set_duration_nanos(from.duration_nanos()); |
1226 | } |
1227 | if (from.period() != 0) { |
1228 | set_period(from.period()); |
1229 | } |
1230 | if (from.default_sample_type() != 0) { |
1231 | set_default_sample_type(from.default_sample_type()); |
1232 | } |
1233 | } |
1234 | |
1235 | void Profile::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1236 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.pprof.Profile) |
1237 | if (&from == this) return; |
1238 | Clear(); |
1239 | MergeFrom(from); |
1240 | } |
1241 | |
1242 | void Profile::CopyFrom(const Profile& from) { |
1243 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.pprof.Profile) |
1244 | if (&from == this) return; |
1245 | Clear(); |
1246 | MergeFrom(from); |
1247 | } |
1248 | |
1249 | bool Profile::IsInitialized() const { |
1250 | return true; |
1251 | } |
1252 | |
1253 | void Profile::InternalSwap(Profile* other) { |
1254 | using std::swap; |
1255 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1256 | CastToBase(&sample_type_)->InternalSwap(CastToBase(&other->sample_type_)); |
1257 | CastToBase(&sample_)->InternalSwap(CastToBase(&other->sample_)); |
1258 | CastToBase(&mapping_)->InternalSwap(CastToBase(&other->mapping_)); |
1259 | CastToBase(&location_)->InternalSwap(CastToBase(&other->location_)); |
1260 | CastToBase(&function_)->InternalSwap(CastToBase(&other->function_)); |
1261 | string_table_.InternalSwap(CastToBase(&other->string_table_)); |
1262 | comment_.InternalSwap(&other->comment_); |
1263 | swap(period_type_, other->period_type_); |
1264 | swap(drop_frames_, other->drop_frames_); |
1265 | swap(keep_frames_, other->keep_frames_); |
1266 | swap(time_nanos_, other->time_nanos_); |
1267 | swap(duration_nanos_, other->duration_nanos_); |
1268 | swap(period_, other->period_); |
1269 | swap(default_sample_type_, other->default_sample_type_); |
1270 | } |
1271 | |
1272 | ::PROTOBUF_NAMESPACE_ID::Metadata Profile::GetMetadata() const { |
1273 | return GetMetadataStatic(); |
1274 | } |
1275 | |
1276 | |
1277 | // =================================================================== |
1278 | |
1279 | void ValueType::InitAsDefaultInstance() { |
1280 | } |
1281 | class ValueType::_Internal { |
1282 | public: |
1283 | }; |
1284 | |
1285 | ValueType::ValueType() |
1286 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1287 | SharedCtor(); |
1288 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.pprof.ValueType) |
1289 | } |
1290 | ValueType::ValueType(const ValueType& from) |
1291 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1292 | _internal_metadata_(nullptr) { |
1293 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1294 | ::memcpy(&type_, &from.type_, |
1295 | static_cast<size_t>(reinterpret_cast<char*>(&unit_) - |
1296 | reinterpret_cast<char*>(&type_)) + sizeof(unit_)); |
1297 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.pprof.ValueType) |
1298 | } |
1299 | |
1300 | void ValueType::SharedCtor() { |
1301 | ::memset(&type_, 0, static_cast<size_t>( |
1302 | reinterpret_cast<char*>(&unit_) - |
1303 | reinterpret_cast<char*>(&type_)) + sizeof(unit_)); |
1304 | } |
1305 | |
1306 | ValueType::~ValueType() { |
1307 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.pprof.ValueType) |
1308 | SharedDtor(); |
1309 | } |
1310 | |
1311 | void ValueType::SharedDtor() { |
1312 | } |
1313 | |
1314 | void ValueType::SetCachedSize(int size) const { |
1315 | _cached_size_.Set(size); |
1316 | } |
1317 | const ValueType& ValueType::default_instance() { |
1318 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ValueType_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
1319 | return *internal_default_instance(); |
1320 | } |
1321 | |
1322 | |
1323 | void ValueType::Clear() { |
1324 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.pprof.ValueType) |
1325 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1326 | // Prevent compiler warnings about cached_has_bits being unused |
1327 | (void) cached_has_bits; |
1328 | |
1329 | ::memset(&type_, 0, static_cast<size_t>( |
1330 | reinterpret_cast<char*>(&unit_) - |
1331 | reinterpret_cast<char*>(&type_)) + sizeof(unit_)); |
1332 | _internal_metadata_.Clear(); |
1333 | } |
1334 | |
1335 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1336 | const char* ValueType::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1337 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1338 | while (!ctx->Done(&ptr)) { |
1339 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1340 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1341 | CHK_(ptr); |
1342 | switch (tag >> 3) { |
1343 | // int64 type = 1; |
1344 | case 1: |
1345 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
1346 | type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1347 | CHK_(ptr); |
1348 | } else goto handle_unusual; |
1349 | continue; |
1350 | // int64 unit = 2; |
1351 | case 2: |
1352 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
1353 | unit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1354 | CHK_(ptr); |
1355 | } else goto handle_unusual; |
1356 | continue; |
1357 | default: { |
1358 | handle_unusual: |
1359 | if ((tag & 7) == 4 || tag == 0) { |
1360 | ctx->SetLastTag(tag); |
1361 | goto success; |
1362 | } |
1363 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1364 | CHK_(ptr != nullptr); |
1365 | continue; |
1366 | } |
1367 | } // switch |
1368 | } // while |
1369 | success: |
1370 | return ptr; |
1371 | failure: |
1372 | ptr = nullptr; |
1373 | goto success; |
1374 | #undef CHK_ |
1375 | } |
1376 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1377 | bool ValueType::MergePartialFromCodedStream( |
1378 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1379 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1380 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1381 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.pprof.ValueType) |
1382 | for (;;) { |
1383 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1384 | tag = p.first; |
1385 | if (!p.second) goto handle_unusual; |
1386 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1387 | // int64 type = 1; |
1388 | case 1: { |
1389 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
1390 | |
1391 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1392 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1393 | input, &type_))); |
1394 | } else { |
1395 | goto handle_unusual; |
1396 | } |
1397 | break; |
1398 | } |
1399 | |
1400 | // int64 unit = 2; |
1401 | case 2: { |
1402 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
1403 | |
1404 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1405 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1406 | input, &unit_))); |
1407 | } else { |
1408 | goto handle_unusual; |
1409 | } |
1410 | break; |
1411 | } |
1412 | |
1413 | default: { |
1414 | handle_unusual: |
1415 | if (tag == 0) { |
1416 | goto success; |
1417 | } |
1418 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1419 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1420 | break; |
1421 | } |
1422 | } |
1423 | } |
1424 | success: |
1425 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.pprof.ValueType) |
1426 | return true; |
1427 | failure: |
1428 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.pprof.ValueType) |
1429 | return false; |
1430 | #undef DO_ |
1431 | } |
1432 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1433 | |
1434 | void ValueType::SerializeWithCachedSizes( |
1435 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1436 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.pprof.ValueType) |
1437 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1438 | (void) cached_has_bits; |
1439 | |
1440 | // int64 type = 1; |
1441 | if (this->type() != 0) { |
1442 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->type(), output); |
1443 | } |
1444 | |
1445 | // int64 unit = 2; |
1446 | if (this->unit() != 0) { |
1447 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->unit(), output); |
1448 | } |
1449 | |
1450 | if (_internal_metadata_.have_unknown_fields()) { |
1451 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1452 | _internal_metadata_.unknown_fields(), output); |
1453 | } |
1454 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.pprof.ValueType) |
1455 | } |
1456 | |
1457 | ::PROTOBUF_NAMESPACE_ID::uint8* ValueType::InternalSerializeWithCachedSizesToArray( |
1458 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1459 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.pprof.ValueType) |
1460 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1461 | (void) cached_has_bits; |
1462 | |
1463 | // int64 type = 1; |
1464 | if (this->type() != 0) { |
1465 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->type(), target); |
1466 | } |
1467 | |
1468 | // int64 unit = 2; |
1469 | if (this->unit() != 0) { |
1470 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->unit(), target); |
1471 | } |
1472 | |
1473 | if (_internal_metadata_.have_unknown_fields()) { |
1474 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1475 | _internal_metadata_.unknown_fields(), target); |
1476 | } |
1477 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.pprof.ValueType) |
1478 | return target; |
1479 | } |
1480 | |
1481 | size_t ValueType::ByteSizeLong() const { |
1482 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.pprof.ValueType) |
1483 | size_t total_size = 0; |
1484 | |
1485 | if (_internal_metadata_.have_unknown_fields()) { |
1486 | total_size += |
1487 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1488 | _internal_metadata_.unknown_fields()); |
1489 | } |
1490 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1491 | // Prevent compiler warnings about cached_has_bits being unused |
1492 | (void) cached_has_bits; |
1493 | |
1494 | // int64 type = 1; |
1495 | if (this->type() != 0) { |
1496 | total_size += 1 + |
1497 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1498 | this->type()); |
1499 | } |
1500 | |
1501 | // int64 unit = 2; |
1502 | if (this->unit() != 0) { |
1503 | total_size += 1 + |
1504 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1505 | this->unit()); |
1506 | } |
1507 | |
1508 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1509 | SetCachedSize(cached_size); |
1510 | return total_size; |
1511 | } |
1512 | |
1513 | void ValueType::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1514 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.pprof.ValueType) |
1515 | GOOGLE_DCHECK_NE(&from, this); |
1516 | const ValueType* source = |
1517 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ValueType>( |
1518 | &from); |
1519 | if (source == nullptr) { |
1520 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.pprof.ValueType) |
1521 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1522 | } else { |
1523 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.pprof.ValueType) |
1524 | MergeFrom(*source); |
1525 | } |
1526 | } |
1527 | |
1528 | void ValueType::MergeFrom(const ValueType& from) { |
1529 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.pprof.ValueType) |
1530 | GOOGLE_DCHECK_NE(&from, this); |
1531 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1532 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1533 | (void) cached_has_bits; |
1534 | |
1535 | if (from.type() != 0) { |
1536 | set_type(from.type()); |
1537 | } |
1538 | if (from.unit() != 0) { |
1539 | set_unit(from.unit()); |
1540 | } |
1541 | } |
1542 | |
1543 | void ValueType::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1544 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.pprof.ValueType) |
1545 | if (&from == this) return; |
1546 | Clear(); |
1547 | MergeFrom(from); |
1548 | } |
1549 | |
1550 | void ValueType::CopyFrom(const ValueType& from) { |
1551 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.pprof.ValueType) |
1552 | if (&from == this) return; |
1553 | Clear(); |
1554 | MergeFrom(from); |
1555 | } |
1556 | |
1557 | bool ValueType::IsInitialized() const { |
1558 | return true; |
1559 | } |
1560 | |
1561 | void ValueType::InternalSwap(ValueType* other) { |
1562 | using std::swap; |
1563 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1564 | swap(type_, other->type_); |
1565 | swap(unit_, other->unit_); |
1566 | } |
1567 | |
1568 | ::PROTOBUF_NAMESPACE_ID::Metadata ValueType::GetMetadata() const { |
1569 | return GetMetadataStatic(); |
1570 | } |
1571 | |
1572 | |
1573 | // =================================================================== |
1574 | |
1575 | void Sample::InitAsDefaultInstance() { |
1576 | } |
1577 | class Sample::_Internal { |
1578 | public: |
1579 | }; |
1580 | |
1581 | Sample::Sample() |
1582 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1583 | SharedCtor(); |
1584 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.pprof.Sample) |
1585 | } |
1586 | Sample::Sample(const Sample& from) |
1587 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1588 | _internal_metadata_(nullptr), |
1589 | location_id_(from.location_id_), |
1590 | value_(from.value_), |
1591 | label_(from.label_) { |
1592 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1593 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.pprof.Sample) |
1594 | } |
1595 | |
1596 | void Sample::SharedCtor() { |
1597 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Sample_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
1598 | } |
1599 | |
1600 | Sample::~Sample() { |
1601 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.pprof.Sample) |
1602 | SharedDtor(); |
1603 | } |
1604 | |
1605 | void Sample::SharedDtor() { |
1606 | } |
1607 | |
1608 | void Sample::SetCachedSize(int size) const { |
1609 | _cached_size_.Set(size); |
1610 | } |
1611 | const Sample& Sample::default_instance() { |
1612 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Sample_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
1613 | return *internal_default_instance(); |
1614 | } |
1615 | |
1616 | |
1617 | void Sample::Clear() { |
1618 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.pprof.Sample) |
1619 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1620 | // Prevent compiler warnings about cached_has_bits being unused |
1621 | (void) cached_has_bits; |
1622 | |
1623 | location_id_.Clear(); |
1624 | value_.Clear(); |
1625 | label_.Clear(); |
1626 | _internal_metadata_.Clear(); |
1627 | } |
1628 | |
1629 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1630 | const char* Sample::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1631 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1632 | while (!ctx->Done(&ptr)) { |
1633 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1634 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1635 | CHK_(ptr); |
1636 | switch (tag >> 3) { |
1637 | // repeated uint64 location_id = 1; |
1638 | case 1: |
1639 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1640 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(mutable_location_id(), ptr, ctx); |
1641 | CHK_(ptr); |
1642 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) { |
1643 | add_location_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1644 | CHK_(ptr); |
1645 | } else goto handle_unusual; |
1646 | continue; |
1647 | // repeated int64 value = 2; |
1648 | case 2: |
1649 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
1650 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_value(), ptr, ctx); |
1651 | CHK_(ptr); |
1652 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { |
1653 | add_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1654 | CHK_(ptr); |
1655 | } else goto handle_unusual; |
1656 | continue; |
1657 | // repeated .tensorflow.tfprof.pprof.Label label = 3; |
1658 | case 3: |
1659 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
1660 | ptr -= 1; |
1661 | do { |
1662 | ptr += 1; |
1663 | ptr = ctx->ParseMessage(add_label(), ptr); |
1664 | CHK_(ptr); |
1665 | if (!ctx->DataAvailable(ptr)) break; |
1666 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); |
1667 | } else goto handle_unusual; |
1668 | continue; |
1669 | default: { |
1670 | handle_unusual: |
1671 | if ((tag & 7) == 4 || tag == 0) { |
1672 | ctx->SetLastTag(tag); |
1673 | goto success; |
1674 | } |
1675 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1676 | CHK_(ptr != nullptr); |
1677 | continue; |
1678 | } |
1679 | } // switch |
1680 | } // while |
1681 | success: |
1682 | return ptr; |
1683 | failure: |
1684 | ptr = nullptr; |
1685 | goto success; |
1686 | #undef CHK_ |
1687 | } |
1688 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1689 | bool Sample::MergePartialFromCodedStream( |
1690 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1691 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1692 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1693 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.pprof.Sample) |
1694 | for (;;) { |
1695 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1696 | tag = p.first; |
1697 | if (!p.second) goto handle_unusual; |
1698 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1699 | // repeated uint64 location_id = 1; |
1700 | case 1: { |
1701 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1702 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
1703 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
1704 | input, this->mutable_location_id()))); |
1705 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
1706 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
1707 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
1708 | 1, 10u, input, this->mutable_location_id()))); |
1709 | } else { |
1710 | goto handle_unusual; |
1711 | } |
1712 | break; |
1713 | } |
1714 | |
1715 | // repeated int64 value = 2; |
1716 | case 2: { |
1717 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
1718 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
1719 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1720 | input, this->mutable_value()))); |
1721 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
1722 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
1723 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1724 | 1, 18u, input, this->mutable_value()))); |
1725 | } else { |
1726 | goto handle_unusual; |
1727 | } |
1728 | break; |
1729 | } |
1730 | |
1731 | // repeated .tensorflow.tfprof.pprof.Label label = 3; |
1732 | case 3: { |
1733 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
1734 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1735 | input, add_label())); |
1736 | } else { |
1737 | goto handle_unusual; |
1738 | } |
1739 | break; |
1740 | } |
1741 | |
1742 | default: { |
1743 | handle_unusual: |
1744 | if (tag == 0) { |
1745 | goto success; |
1746 | } |
1747 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1748 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1749 | break; |
1750 | } |
1751 | } |
1752 | } |
1753 | success: |
1754 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.pprof.Sample) |
1755 | return true; |
1756 | failure: |
1757 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.pprof.Sample) |
1758 | return false; |
1759 | #undef DO_ |
1760 | } |
1761 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1762 | |
1763 | void Sample::SerializeWithCachedSizes( |
1764 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1765 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.pprof.Sample) |
1766 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1767 | (void) cached_has_bits; |
1768 | |
1769 | // repeated uint64 location_id = 1; |
1770 | if (this->location_id_size() > 0) { |
1771 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(1, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
1772 | output->WriteVarint32(_location_id_cached_byte_size_.load( |
1773 | std::memory_order_relaxed)); |
1774 | } |
1775 | for (int i = 0, n = this->location_id_size(); i < n; i++) { |
1776 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64NoTag( |
1777 | this->location_id(i), output); |
1778 | } |
1779 | |
1780 | // repeated int64 value = 2; |
1781 | if (this->value_size() > 0) { |
1782 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
1783 | output->WriteVarint32(_value_cached_byte_size_.load( |
1784 | std::memory_order_relaxed)); |
1785 | } |
1786 | for (int i = 0, n = this->value_size(); i < n; i++) { |
1787 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( |
1788 | this->value(i), output); |
1789 | } |
1790 | |
1791 | // repeated .tensorflow.tfprof.pprof.Label label = 3; |
1792 | for (unsigned int i = 0, |
1793 | n = static_cast<unsigned int>(this->label_size()); i < n; i++) { |
1794 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1795 | 3, |
1796 | this->label(static_cast<int>(i)), |
1797 | output); |
1798 | } |
1799 | |
1800 | if (_internal_metadata_.have_unknown_fields()) { |
1801 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1802 | _internal_metadata_.unknown_fields(), output); |
1803 | } |
1804 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.pprof.Sample) |
1805 | } |
1806 | |
1807 | ::PROTOBUF_NAMESPACE_ID::uint8* Sample::InternalSerializeWithCachedSizesToArray( |
1808 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1809 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.pprof.Sample) |
1810 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1811 | (void) cached_has_bits; |
1812 | |
1813 | // repeated uint64 location_id = 1; |
1814 | if (this->location_id_size() > 0) { |
1815 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
1816 | 1, |
1817 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
1818 | target); |
1819 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
1820 | _location_id_cached_byte_size_.load(std::memory_order_relaxed), |
1821 | target); |
1822 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1823 | WriteUInt64NoTagToArray(this->location_id_, target); |
1824 | } |
1825 | |
1826 | // repeated int64 value = 2; |
1827 | if (this->value_size() > 0) { |
1828 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
1829 | 2, |
1830 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
1831 | target); |
1832 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
1833 | _value_cached_byte_size_.load(std::memory_order_relaxed), |
1834 | target); |
1835 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1836 | WriteInt64NoTagToArray(this->value_, target); |
1837 | } |
1838 | |
1839 | // repeated .tensorflow.tfprof.pprof.Label label = 3; |
1840 | for (unsigned int i = 0, |
1841 | n = static_cast<unsigned int>(this->label_size()); i < n; i++) { |
1842 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1843 | InternalWriteMessageToArray( |
1844 | 3, this->label(static_cast<int>(i)), target); |
1845 | } |
1846 | |
1847 | if (_internal_metadata_.have_unknown_fields()) { |
1848 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1849 | _internal_metadata_.unknown_fields(), target); |
1850 | } |
1851 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.pprof.Sample) |
1852 | return target; |
1853 | } |
1854 | |
1855 | size_t Sample::ByteSizeLong() const { |
1856 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.pprof.Sample) |
1857 | size_t total_size = 0; |
1858 | |
1859 | if (_internal_metadata_.have_unknown_fields()) { |
1860 | total_size += |
1861 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1862 | _internal_metadata_.unknown_fields()); |
1863 | } |
1864 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1865 | // Prevent compiler warnings about cached_has_bits being unused |
1866 | (void) cached_has_bits; |
1867 | |
1868 | // repeated uint64 location_id = 1; |
1869 | { |
1870 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1871 | UInt64Size(this->location_id_); |
1872 | if (data_size > 0) { |
1873 | total_size += 1 + |
1874 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1875 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
1876 | } |
1877 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
1878 | _location_id_cached_byte_size_.store(cached_size, |
1879 | std::memory_order_relaxed); |
1880 | total_size += data_size; |
1881 | } |
1882 | |
1883 | // repeated int64 value = 2; |
1884 | { |
1885 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1886 | Int64Size(this->value_); |
1887 | if (data_size > 0) { |
1888 | total_size += 1 + |
1889 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1890 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
1891 | } |
1892 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
1893 | _value_cached_byte_size_.store(cached_size, |
1894 | std::memory_order_relaxed); |
1895 | total_size += data_size; |
1896 | } |
1897 | |
1898 | // repeated .tensorflow.tfprof.pprof.Label label = 3; |
1899 | { |
1900 | unsigned int count = static_cast<unsigned int>(this->label_size()); |
1901 | total_size += 1UL * count; |
1902 | for (unsigned int i = 0; i < count; i++) { |
1903 | total_size += |
1904 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1905 | this->label(static_cast<int>(i))); |
1906 | } |
1907 | } |
1908 | |
1909 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1910 | SetCachedSize(cached_size); |
1911 | return total_size; |
1912 | } |
1913 | |
1914 | void Sample::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1915 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.pprof.Sample) |
1916 | GOOGLE_DCHECK_NE(&from, this); |
1917 | const Sample* source = |
1918 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Sample>( |
1919 | &from); |
1920 | if (source == nullptr) { |
1921 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.pprof.Sample) |
1922 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1923 | } else { |
1924 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.pprof.Sample) |
1925 | MergeFrom(*source); |
1926 | } |
1927 | } |
1928 | |
1929 | void Sample::MergeFrom(const Sample& from) { |
1930 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.pprof.Sample) |
1931 | GOOGLE_DCHECK_NE(&from, this); |
1932 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1933 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1934 | (void) cached_has_bits; |
1935 | |
1936 | location_id_.MergeFrom(from.location_id_); |
1937 | value_.MergeFrom(from.value_); |
1938 | label_.MergeFrom(from.label_); |
1939 | } |
1940 | |
1941 | void Sample::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1942 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.pprof.Sample) |
1943 | if (&from == this) return; |
1944 | Clear(); |
1945 | MergeFrom(from); |
1946 | } |
1947 | |
1948 | void Sample::CopyFrom(const Sample& from) { |
1949 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.pprof.Sample) |
1950 | if (&from == this) return; |
1951 | Clear(); |
1952 | MergeFrom(from); |
1953 | } |
1954 | |
1955 | bool Sample::IsInitialized() const { |
1956 | return true; |
1957 | } |
1958 | |
1959 | void Sample::InternalSwap(Sample* other) { |
1960 | using std::swap; |
1961 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1962 | location_id_.InternalSwap(&other->location_id_); |
1963 | value_.InternalSwap(&other->value_); |
1964 | CastToBase(&label_)->InternalSwap(CastToBase(&other->label_)); |
1965 | } |
1966 | |
1967 | ::PROTOBUF_NAMESPACE_ID::Metadata Sample::GetMetadata() const { |
1968 | return GetMetadataStatic(); |
1969 | } |
1970 | |
1971 | |
1972 | // =================================================================== |
1973 | |
1974 | void Label::InitAsDefaultInstance() { |
1975 | } |
1976 | class Label::_Internal { |
1977 | public: |
1978 | }; |
1979 | |
1980 | Label::Label() |
1981 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1982 | SharedCtor(); |
1983 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.pprof.Label) |
1984 | } |
1985 | Label::Label(const Label& from) |
1986 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1987 | _internal_metadata_(nullptr) { |
1988 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1989 | ::memcpy(&key_, &from.key_, |
1990 | static_cast<size_t>(reinterpret_cast<char*>(&num_) - |
1991 | reinterpret_cast<char*>(&key_)) + sizeof(num_)); |
1992 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.pprof.Label) |
1993 | } |
1994 | |
1995 | void Label::SharedCtor() { |
1996 | ::memset(&key_, 0, static_cast<size_t>( |
1997 | reinterpret_cast<char*>(&num_) - |
1998 | reinterpret_cast<char*>(&key_)) + sizeof(num_)); |
1999 | } |
2000 | |
2001 | Label::~Label() { |
2002 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.pprof.Label) |
2003 | SharedDtor(); |
2004 | } |
2005 | |
2006 | void Label::SharedDtor() { |
2007 | } |
2008 | |
2009 | void Label::SetCachedSize(int size) const { |
2010 | _cached_size_.Set(size); |
2011 | } |
2012 | const Label& Label::default_instance() { |
2013 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Label_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
2014 | return *internal_default_instance(); |
2015 | } |
2016 | |
2017 | |
2018 | void Label::Clear() { |
2019 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.pprof.Label) |
2020 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2021 | // Prevent compiler warnings about cached_has_bits being unused |
2022 | (void) cached_has_bits; |
2023 | |
2024 | ::memset(&key_, 0, static_cast<size_t>( |
2025 | reinterpret_cast<char*>(&num_) - |
2026 | reinterpret_cast<char*>(&key_)) + sizeof(num_)); |
2027 | _internal_metadata_.Clear(); |
2028 | } |
2029 | |
2030 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2031 | const char* Label::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2032 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2033 | while (!ctx->Done(&ptr)) { |
2034 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2035 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2036 | CHK_(ptr); |
2037 | switch (tag >> 3) { |
2038 | // int64 key = 1; |
2039 | case 1: |
2040 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
2041 | key_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2042 | CHK_(ptr); |
2043 | } else goto handle_unusual; |
2044 | continue; |
2045 | // int64 str = 2; |
2046 | case 2: |
2047 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
2048 | str_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2049 | CHK_(ptr); |
2050 | } else goto handle_unusual; |
2051 | continue; |
2052 | // int64 num = 3; |
2053 | case 3: |
2054 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
2055 | num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2056 | CHK_(ptr); |
2057 | } else goto handle_unusual; |
2058 | continue; |
2059 | default: { |
2060 | handle_unusual: |
2061 | if ((tag & 7) == 4 || tag == 0) { |
2062 | ctx->SetLastTag(tag); |
2063 | goto success; |
2064 | } |
2065 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2066 | CHK_(ptr != nullptr); |
2067 | continue; |
2068 | } |
2069 | } // switch |
2070 | } // while |
2071 | success: |
2072 | return ptr; |
2073 | failure: |
2074 | ptr = nullptr; |
2075 | goto success; |
2076 | #undef CHK_ |
2077 | } |
2078 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2079 | bool Label::MergePartialFromCodedStream( |
2080 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2081 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2082 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2083 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.pprof.Label) |
2084 | for (;;) { |
2085 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2086 | tag = p.first; |
2087 | if (!p.second) goto handle_unusual; |
2088 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2089 | // int64 key = 1; |
2090 | case 1: { |
2091 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
2092 | |
2093 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2094 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2095 | input, &key_))); |
2096 | } else { |
2097 | goto handle_unusual; |
2098 | } |
2099 | break; |
2100 | } |
2101 | |
2102 | // int64 str = 2; |
2103 | case 2: { |
2104 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
2105 | |
2106 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2107 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2108 | input, &str_))); |
2109 | } else { |
2110 | goto handle_unusual; |
2111 | } |
2112 | break; |
2113 | } |
2114 | |
2115 | // int64 num = 3; |
2116 | case 3: { |
2117 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
2118 | |
2119 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2120 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2121 | input, &num_))); |
2122 | } else { |
2123 | goto handle_unusual; |
2124 | } |
2125 | break; |
2126 | } |
2127 | |
2128 | default: { |
2129 | handle_unusual: |
2130 | if (tag == 0) { |
2131 | goto success; |
2132 | } |
2133 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2134 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2135 | break; |
2136 | } |
2137 | } |
2138 | } |
2139 | success: |
2140 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.pprof.Label) |
2141 | return true; |
2142 | failure: |
2143 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.pprof.Label) |
2144 | return false; |
2145 | #undef DO_ |
2146 | } |
2147 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2148 | |
2149 | void Label::SerializeWithCachedSizes( |
2150 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2151 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.pprof.Label) |
2152 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2153 | (void) cached_has_bits; |
2154 | |
2155 | // int64 key = 1; |
2156 | if (this->key() != 0) { |
2157 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->key(), output); |
2158 | } |
2159 | |
2160 | // int64 str = 2; |
2161 | if (this->str() != 0) { |
2162 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->str(), output); |
2163 | } |
2164 | |
2165 | // int64 num = 3; |
2166 | if (this->num() != 0) { |
2167 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->num(), output); |
2168 | } |
2169 | |
2170 | if (_internal_metadata_.have_unknown_fields()) { |
2171 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2172 | _internal_metadata_.unknown_fields(), output); |
2173 | } |
2174 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.pprof.Label) |
2175 | } |
2176 | |
2177 | ::PROTOBUF_NAMESPACE_ID::uint8* Label::InternalSerializeWithCachedSizesToArray( |
2178 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2179 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.pprof.Label) |
2180 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2181 | (void) cached_has_bits; |
2182 | |
2183 | // int64 key = 1; |
2184 | if (this->key() != 0) { |
2185 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->key(), target); |
2186 | } |
2187 | |
2188 | // int64 str = 2; |
2189 | if (this->str() != 0) { |
2190 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->str(), target); |
2191 | } |
2192 | |
2193 | // int64 num = 3; |
2194 | if (this->num() != 0) { |
2195 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->num(), target); |
2196 | } |
2197 | |
2198 | if (_internal_metadata_.have_unknown_fields()) { |
2199 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2200 | _internal_metadata_.unknown_fields(), target); |
2201 | } |
2202 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.pprof.Label) |
2203 | return target; |
2204 | } |
2205 | |
2206 | size_t Label::ByteSizeLong() const { |
2207 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.pprof.Label) |
2208 | size_t total_size = 0; |
2209 | |
2210 | if (_internal_metadata_.have_unknown_fields()) { |
2211 | total_size += |
2212 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2213 | _internal_metadata_.unknown_fields()); |
2214 | } |
2215 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2216 | // Prevent compiler warnings about cached_has_bits being unused |
2217 | (void) cached_has_bits; |
2218 | |
2219 | // int64 key = 1; |
2220 | if (this->key() != 0) { |
2221 | total_size += 1 + |
2222 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
2223 | this->key()); |
2224 | } |
2225 | |
2226 | // int64 str = 2; |
2227 | if (this->str() != 0) { |
2228 | total_size += 1 + |
2229 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
2230 | this->str()); |
2231 | } |
2232 | |
2233 | // int64 num = 3; |
2234 | if (this->num() != 0) { |
2235 | total_size += 1 + |
2236 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
2237 | this->num()); |
2238 | } |
2239 | |
2240 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2241 | SetCachedSize(cached_size); |
2242 | return total_size; |
2243 | } |
2244 | |
2245 | void Label::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2246 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.pprof.Label) |
2247 | GOOGLE_DCHECK_NE(&from, this); |
2248 | const Label* source = |
2249 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Label>( |
2250 | &from); |
2251 | if (source == nullptr) { |
2252 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.pprof.Label) |
2253 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2254 | } else { |
2255 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.pprof.Label) |
2256 | MergeFrom(*source); |
2257 | } |
2258 | } |
2259 | |
2260 | void Label::MergeFrom(const Label& from) { |
2261 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.pprof.Label) |
2262 | GOOGLE_DCHECK_NE(&from, this); |
2263 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2264 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2265 | (void) cached_has_bits; |
2266 | |
2267 | if (from.key() != 0) { |
2268 | set_key(from.key()); |
2269 | } |
2270 | if (from.str() != 0) { |
2271 | set_str(from.str()); |
2272 | } |
2273 | if (from.num() != 0) { |
2274 | set_num(from.num()); |
2275 | } |
2276 | } |
2277 | |
2278 | void Label::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2279 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.pprof.Label) |
2280 | if (&from == this) return; |
2281 | Clear(); |
2282 | MergeFrom(from); |
2283 | } |
2284 | |
2285 | void Label::CopyFrom(const Label& from) { |
2286 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.pprof.Label) |
2287 | if (&from == this) return; |
2288 | Clear(); |
2289 | MergeFrom(from); |
2290 | } |
2291 | |
2292 | bool Label::IsInitialized() const { |
2293 | return true; |
2294 | } |
2295 | |
2296 | void Label::InternalSwap(Label* other) { |
2297 | using std::swap; |
2298 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2299 | swap(key_, other->key_); |
2300 | swap(str_, other->str_); |
2301 | swap(num_, other->num_); |
2302 | } |
2303 | |
2304 | ::PROTOBUF_NAMESPACE_ID::Metadata Label::GetMetadata() const { |
2305 | return GetMetadataStatic(); |
2306 | } |
2307 | |
2308 | |
2309 | // =================================================================== |
2310 | |
2311 | void Mapping::InitAsDefaultInstance() { |
2312 | } |
2313 | class Mapping::_Internal { |
2314 | public: |
2315 | }; |
2316 | |
2317 | Mapping::Mapping() |
2318 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2319 | SharedCtor(); |
2320 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.pprof.Mapping) |
2321 | } |
2322 | Mapping::Mapping(const Mapping& from) |
2323 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2324 | _internal_metadata_(nullptr) { |
2325 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2326 | ::memcpy(&id_, &from.id_, |
2327 | static_cast<size_t>(reinterpret_cast<char*>(&has_inline_frames_) - |
2328 | reinterpret_cast<char*>(&id_)) + sizeof(has_inline_frames_)); |
2329 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.pprof.Mapping) |
2330 | } |
2331 | |
2332 | void Mapping::SharedCtor() { |
2333 | ::memset(&id_, 0, static_cast<size_t>( |
2334 | reinterpret_cast<char*>(&has_inline_frames_) - |
2335 | reinterpret_cast<char*>(&id_)) + sizeof(has_inline_frames_)); |
2336 | } |
2337 | |
2338 | Mapping::~Mapping() { |
2339 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.pprof.Mapping) |
2340 | SharedDtor(); |
2341 | } |
2342 | |
2343 | void Mapping::SharedDtor() { |
2344 | } |
2345 | |
2346 | void Mapping::SetCachedSize(int size) const { |
2347 | _cached_size_.Set(size); |
2348 | } |
2349 | const Mapping& Mapping::default_instance() { |
2350 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Mapping_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
2351 | return *internal_default_instance(); |
2352 | } |
2353 | |
2354 | |
2355 | void Mapping::Clear() { |
2356 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.pprof.Mapping) |
2357 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2358 | // Prevent compiler warnings about cached_has_bits being unused |
2359 | (void) cached_has_bits; |
2360 | |
2361 | ::memset(&id_, 0, static_cast<size_t>( |
2362 | reinterpret_cast<char*>(&has_inline_frames_) - |
2363 | reinterpret_cast<char*>(&id_)) + sizeof(has_inline_frames_)); |
2364 | _internal_metadata_.Clear(); |
2365 | } |
2366 | |
2367 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2368 | const char* Mapping::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2369 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2370 | while (!ctx->Done(&ptr)) { |
2371 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2372 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2373 | CHK_(ptr); |
2374 | switch (tag >> 3) { |
2375 | // uint64 id = 1; |
2376 | case 1: |
2377 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
2378 | id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2379 | CHK_(ptr); |
2380 | } else goto handle_unusual; |
2381 | continue; |
2382 | // uint64 memory_start = 2; |
2383 | case 2: |
2384 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
2385 | memory_start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2386 | CHK_(ptr); |
2387 | } else goto handle_unusual; |
2388 | continue; |
2389 | // uint64 memory_limit = 3; |
2390 | case 3: |
2391 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
2392 | memory_limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2393 | CHK_(ptr); |
2394 | } else goto handle_unusual; |
2395 | continue; |
2396 | // uint64 file_offset = 4; |
2397 | case 4: |
2398 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
2399 | file_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2400 | CHK_(ptr); |
2401 | } else goto handle_unusual; |
2402 | continue; |
2403 | // int64 filename = 5; |
2404 | case 5: |
2405 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
2406 | filename_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2407 | CHK_(ptr); |
2408 | } else goto handle_unusual; |
2409 | continue; |
2410 | // int64 build_id = 6; |
2411 | case 6: |
2412 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
2413 | build_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2414 | CHK_(ptr); |
2415 | } else goto handle_unusual; |
2416 | continue; |
2417 | // bool has_functions = 7; |
2418 | case 7: |
2419 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { |
2420 | has_functions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2421 | CHK_(ptr); |
2422 | } else goto handle_unusual; |
2423 | continue; |
2424 | // bool has_filenames = 8; |
2425 | case 8: |
2426 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { |
2427 | has_filenames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2428 | CHK_(ptr); |
2429 | } else goto handle_unusual; |
2430 | continue; |
2431 | // bool has_line_numbers = 9; |
2432 | case 9: |
2433 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { |
2434 | has_line_numbers_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2435 | CHK_(ptr); |
2436 | } else goto handle_unusual; |
2437 | continue; |
2438 | // bool has_inline_frames = 10; |
2439 | case 10: |
2440 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { |
2441 | has_inline_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2442 | CHK_(ptr); |
2443 | } else goto handle_unusual; |
2444 | continue; |
2445 | default: { |
2446 | handle_unusual: |
2447 | if ((tag & 7) == 4 || tag == 0) { |
2448 | ctx->SetLastTag(tag); |
2449 | goto success; |
2450 | } |
2451 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2452 | CHK_(ptr != nullptr); |
2453 | continue; |
2454 | } |
2455 | } // switch |
2456 | } // while |
2457 | success: |
2458 | return ptr; |
2459 | failure: |
2460 | ptr = nullptr; |
2461 | goto success; |
2462 | #undef CHK_ |
2463 | } |
2464 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2465 | bool Mapping::MergePartialFromCodedStream( |
2466 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2467 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2468 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2469 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.pprof.Mapping) |
2470 | for (;;) { |
2471 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2472 | tag = p.first; |
2473 | if (!p.second) goto handle_unusual; |
2474 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2475 | // uint64 id = 1; |
2476 | case 1: { |
2477 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
2478 | |
2479 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2480 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
2481 | input, &id_))); |
2482 | } else { |
2483 | goto handle_unusual; |
2484 | } |
2485 | break; |
2486 | } |
2487 | |
2488 | // uint64 memory_start = 2; |
2489 | case 2: { |
2490 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
2491 | |
2492 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2493 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
2494 | input, &memory_start_))); |
2495 | } else { |
2496 | goto handle_unusual; |
2497 | } |
2498 | break; |
2499 | } |
2500 | |
2501 | // uint64 memory_limit = 3; |
2502 | case 3: { |
2503 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
2504 | |
2505 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2506 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
2507 | input, &memory_limit_))); |
2508 | } else { |
2509 | goto handle_unusual; |
2510 | } |
2511 | break; |
2512 | } |
2513 | |
2514 | // uint64 file_offset = 4; |
2515 | case 4: { |
2516 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
2517 | |
2518 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2519 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
2520 | input, &file_offset_))); |
2521 | } else { |
2522 | goto handle_unusual; |
2523 | } |
2524 | break; |
2525 | } |
2526 | |
2527 | // int64 filename = 5; |
2528 | case 5: { |
2529 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
2530 | |
2531 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2532 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2533 | input, &filename_))); |
2534 | } else { |
2535 | goto handle_unusual; |
2536 | } |
2537 | break; |
2538 | } |
2539 | |
2540 | // int64 build_id = 6; |
2541 | case 6: { |
2542 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
2543 | |
2544 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2545 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2546 | input, &build_id_))); |
2547 | } else { |
2548 | goto handle_unusual; |
2549 | } |
2550 | break; |
2551 | } |
2552 | |
2553 | // bool has_functions = 7; |
2554 | case 7: { |
2555 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { |
2556 | |
2557 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2558 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2559 | input, &has_functions_))); |
2560 | } else { |
2561 | goto handle_unusual; |
2562 | } |
2563 | break; |
2564 | } |
2565 | |
2566 | // bool has_filenames = 8; |
2567 | case 8: { |
2568 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) { |
2569 | |
2570 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2571 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2572 | input, &has_filenames_))); |
2573 | } else { |
2574 | goto handle_unusual; |
2575 | } |
2576 | break; |
2577 | } |
2578 | |
2579 | // bool has_line_numbers = 9; |
2580 | case 9: { |
2581 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { |
2582 | |
2583 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2584 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2585 | input, &has_line_numbers_))); |
2586 | } else { |
2587 | goto handle_unusual; |
2588 | } |
2589 | break; |
2590 | } |
2591 | |
2592 | // bool has_inline_frames = 10; |
2593 | case 10: { |
2594 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { |
2595 | |
2596 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2597 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2598 | input, &has_inline_frames_))); |
2599 | } else { |
2600 | goto handle_unusual; |
2601 | } |
2602 | break; |
2603 | } |
2604 | |
2605 | default: { |
2606 | handle_unusual: |
2607 | if (tag == 0) { |
2608 | goto success; |
2609 | } |
2610 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2611 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2612 | break; |
2613 | } |
2614 | } |
2615 | } |
2616 | success: |
2617 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.pprof.Mapping) |
2618 | return true; |
2619 | failure: |
2620 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.pprof.Mapping) |
2621 | return false; |
2622 | #undef DO_ |
2623 | } |
2624 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2625 | |
2626 | void Mapping::SerializeWithCachedSizes( |
2627 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2628 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.pprof.Mapping) |
2629 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2630 | (void) cached_has_bits; |
2631 | |
2632 | // uint64 id = 1; |
2633 | if (this->id() != 0) { |
2634 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->id(), output); |
2635 | } |
2636 | |
2637 | // uint64 memory_start = 2; |
2638 | if (this->memory_start() != 0) { |
2639 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(2, this->memory_start(), output); |
2640 | } |
2641 | |
2642 | // uint64 memory_limit = 3; |
2643 | if (this->memory_limit() != 0) { |
2644 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(3, this->memory_limit(), output); |
2645 | } |
2646 | |
2647 | // uint64 file_offset = 4; |
2648 | if (this->file_offset() != 0) { |
2649 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(4, this->file_offset(), output); |
2650 | } |
2651 | |
2652 | // int64 filename = 5; |
2653 | if (this->filename() != 0) { |
2654 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->filename(), output); |
2655 | } |
2656 | |
2657 | // int64 build_id = 6; |
2658 | if (this->build_id() != 0) { |
2659 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(6, this->build_id(), output); |
2660 | } |
2661 | |
2662 | // bool has_functions = 7; |
2663 | if (this->has_functions() != 0) { |
2664 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(7, this->has_functions(), output); |
2665 | } |
2666 | |
2667 | // bool has_filenames = 8; |
2668 | if (this->has_filenames() != 0) { |
2669 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(8, this->has_filenames(), output); |
2670 | } |
2671 | |
2672 | // bool has_line_numbers = 9; |
2673 | if (this->has_line_numbers() != 0) { |
2674 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(9, this->has_line_numbers(), output); |
2675 | } |
2676 | |
2677 | // bool has_inline_frames = 10; |
2678 | if (this->has_inline_frames() != 0) { |
2679 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(10, this->has_inline_frames(), output); |
2680 | } |
2681 | |
2682 | if (_internal_metadata_.have_unknown_fields()) { |
2683 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2684 | _internal_metadata_.unknown_fields(), output); |
2685 | } |
2686 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.pprof.Mapping) |
2687 | } |
2688 | |
2689 | ::PROTOBUF_NAMESPACE_ID::uint8* Mapping::InternalSerializeWithCachedSizesToArray( |
2690 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2691 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.pprof.Mapping) |
2692 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2693 | (void) cached_has_bits; |
2694 | |
2695 | // uint64 id = 1; |
2696 | if (this->id() != 0) { |
2697 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->id(), target); |
2698 | } |
2699 | |
2700 | // uint64 memory_start = 2; |
2701 | if (this->memory_start() != 0) { |
2702 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->memory_start(), target); |
2703 | } |
2704 | |
2705 | // uint64 memory_limit = 3; |
2706 | if (this->memory_limit() != 0) { |
2707 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(3, this->memory_limit(), target); |
2708 | } |
2709 | |
2710 | // uint64 file_offset = 4; |
2711 | if (this->file_offset() != 0) { |
2712 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(4, this->file_offset(), target); |
2713 | } |
2714 | |
2715 | // int64 filename = 5; |
2716 | if (this->filename() != 0) { |
2717 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->filename(), target); |
2718 | } |
2719 | |
2720 | // int64 build_id = 6; |
2721 | if (this->build_id() != 0) { |
2722 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->build_id(), target); |
2723 | } |
2724 | |
2725 | // bool has_functions = 7; |
2726 | if (this->has_functions() != 0) { |
2727 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->has_functions(), target); |
2728 | } |
2729 | |
2730 | // bool has_filenames = 8; |
2731 | if (this->has_filenames() != 0) { |
2732 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->has_filenames(), target); |
2733 | } |
2734 | |
2735 | // bool has_line_numbers = 9; |
2736 | if (this->has_line_numbers() != 0) { |
2737 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->has_line_numbers(), target); |
2738 | } |
2739 | |
2740 | // bool has_inline_frames = 10; |
2741 | if (this->has_inline_frames() != 0) { |
2742 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->has_inline_frames(), target); |
2743 | } |
2744 | |
2745 | if (_internal_metadata_.have_unknown_fields()) { |
2746 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2747 | _internal_metadata_.unknown_fields(), target); |
2748 | } |
2749 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.pprof.Mapping) |
2750 | return target; |
2751 | } |
2752 | |
2753 | size_t Mapping::ByteSizeLong() const { |
2754 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.pprof.Mapping) |
2755 | size_t total_size = 0; |
2756 | |
2757 | if (_internal_metadata_.have_unknown_fields()) { |
2758 | total_size += |
2759 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2760 | _internal_metadata_.unknown_fields()); |
2761 | } |
2762 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2763 | // Prevent compiler warnings about cached_has_bits being unused |
2764 | (void) cached_has_bits; |
2765 | |
2766 | // uint64 id = 1; |
2767 | if (this->id() != 0) { |
2768 | total_size += 1 + |
2769 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
2770 | this->id()); |
2771 | } |
2772 | |
2773 | // uint64 memory_start = 2; |
2774 | if (this->memory_start() != 0) { |
2775 | total_size += 1 + |
2776 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
2777 | this->memory_start()); |
2778 | } |
2779 | |
2780 | // uint64 memory_limit = 3; |
2781 | if (this->memory_limit() != 0) { |
2782 | total_size += 1 + |
2783 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
2784 | this->memory_limit()); |
2785 | } |
2786 | |
2787 | // uint64 file_offset = 4; |
2788 | if (this->file_offset() != 0) { |
2789 | total_size += 1 + |
2790 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
2791 | this->file_offset()); |
2792 | } |
2793 | |
2794 | // int64 filename = 5; |
2795 | if (this->filename() != 0) { |
2796 | total_size += 1 + |
2797 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
2798 | this->filename()); |
2799 | } |
2800 | |
2801 | // int64 build_id = 6; |
2802 | if (this->build_id() != 0) { |
2803 | total_size += 1 + |
2804 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
2805 | this->build_id()); |
2806 | } |
2807 | |
2808 | // bool has_functions = 7; |
2809 | if (this->has_functions() != 0) { |
2810 | total_size += 1 + 1; |
2811 | } |
2812 | |
2813 | // bool has_filenames = 8; |
2814 | if (this->has_filenames() != 0) { |
2815 | total_size += 1 + 1; |
2816 | } |
2817 | |
2818 | // bool has_line_numbers = 9; |
2819 | if (this->has_line_numbers() != 0) { |
2820 | total_size += 1 + 1; |
2821 | } |
2822 | |
2823 | // bool has_inline_frames = 10; |
2824 | if (this->has_inline_frames() != 0) { |
2825 | total_size += 1 + 1; |
2826 | } |
2827 | |
2828 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2829 | SetCachedSize(cached_size); |
2830 | return total_size; |
2831 | } |
2832 | |
2833 | void Mapping::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2834 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.pprof.Mapping) |
2835 | GOOGLE_DCHECK_NE(&from, this); |
2836 | const Mapping* source = |
2837 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Mapping>( |
2838 | &from); |
2839 | if (source == nullptr) { |
2840 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.pprof.Mapping) |
2841 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2842 | } else { |
2843 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.pprof.Mapping) |
2844 | MergeFrom(*source); |
2845 | } |
2846 | } |
2847 | |
2848 | void Mapping::MergeFrom(const Mapping& from) { |
2849 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.pprof.Mapping) |
2850 | GOOGLE_DCHECK_NE(&from, this); |
2851 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2852 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2853 | (void) cached_has_bits; |
2854 | |
2855 | if (from.id() != 0) { |
2856 | set_id(from.id()); |
2857 | } |
2858 | if (from.memory_start() != 0) { |
2859 | set_memory_start(from.memory_start()); |
2860 | } |
2861 | if (from.memory_limit() != 0) { |
2862 | set_memory_limit(from.memory_limit()); |
2863 | } |
2864 | if (from.file_offset() != 0) { |
2865 | set_file_offset(from.file_offset()); |
2866 | } |
2867 | if (from.filename() != 0) { |
2868 | set_filename(from.filename()); |
2869 | } |
2870 | if (from.build_id() != 0) { |
2871 | set_build_id(from.build_id()); |
2872 | } |
2873 | if (from.has_functions() != 0) { |
2874 | set_has_functions(from.has_functions()); |
2875 | } |
2876 | if (from.has_filenames() != 0) { |
2877 | set_has_filenames(from.has_filenames()); |
2878 | } |
2879 | if (from.has_line_numbers() != 0) { |
2880 | set_has_line_numbers(from.has_line_numbers()); |
2881 | } |
2882 | if (from.has_inline_frames() != 0) { |
2883 | set_has_inline_frames(from.has_inline_frames()); |
2884 | } |
2885 | } |
2886 | |
2887 | void Mapping::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2888 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.pprof.Mapping) |
2889 | if (&from == this) return; |
2890 | Clear(); |
2891 | MergeFrom(from); |
2892 | } |
2893 | |
2894 | void Mapping::CopyFrom(const Mapping& from) { |
2895 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.pprof.Mapping) |
2896 | if (&from == this) return; |
2897 | Clear(); |
2898 | MergeFrom(from); |
2899 | } |
2900 | |
2901 | bool Mapping::IsInitialized() const { |
2902 | return true; |
2903 | } |
2904 | |
2905 | void Mapping::InternalSwap(Mapping* other) { |
2906 | using std::swap; |
2907 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2908 | swap(id_, other->id_); |
2909 | swap(memory_start_, other->memory_start_); |
2910 | swap(memory_limit_, other->memory_limit_); |
2911 | swap(file_offset_, other->file_offset_); |
2912 | swap(filename_, other->filename_); |
2913 | swap(build_id_, other->build_id_); |
2914 | swap(has_functions_, other->has_functions_); |
2915 | swap(has_filenames_, other->has_filenames_); |
2916 | swap(has_line_numbers_, other->has_line_numbers_); |
2917 | swap(has_inline_frames_, other->has_inline_frames_); |
2918 | } |
2919 | |
2920 | ::PROTOBUF_NAMESPACE_ID::Metadata Mapping::GetMetadata() const { |
2921 | return GetMetadataStatic(); |
2922 | } |
2923 | |
2924 | |
2925 | // =================================================================== |
2926 | |
2927 | void Location::InitAsDefaultInstance() { |
2928 | } |
2929 | class Location::_Internal { |
2930 | public: |
2931 | }; |
2932 | |
2933 | Location::Location() |
2934 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2935 | SharedCtor(); |
2936 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.pprof.Location) |
2937 | } |
2938 | Location::Location(const Location& from) |
2939 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2940 | _internal_metadata_(nullptr), |
2941 | line_(from.line_) { |
2942 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2943 | ::memcpy(&id_, &from.id_, |
2944 | static_cast<size_t>(reinterpret_cast<char*>(&address_) - |
2945 | reinterpret_cast<char*>(&id_)) + sizeof(address_)); |
2946 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.pprof.Location) |
2947 | } |
2948 | |
2949 | void Location::SharedCtor() { |
2950 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Location_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
2951 | ::memset(&id_, 0, static_cast<size_t>( |
2952 | reinterpret_cast<char*>(&address_) - |
2953 | reinterpret_cast<char*>(&id_)) + sizeof(address_)); |
2954 | } |
2955 | |
2956 | Location::~Location() { |
2957 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.pprof.Location) |
2958 | SharedDtor(); |
2959 | } |
2960 | |
2961 | void Location::SharedDtor() { |
2962 | } |
2963 | |
2964 | void Location::SetCachedSize(int size) const { |
2965 | _cached_size_.Set(size); |
2966 | } |
2967 | const Location& Location::default_instance() { |
2968 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Location_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
2969 | return *internal_default_instance(); |
2970 | } |
2971 | |
2972 | |
2973 | void Location::Clear() { |
2974 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.pprof.Location) |
2975 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2976 | // Prevent compiler warnings about cached_has_bits being unused |
2977 | (void) cached_has_bits; |
2978 | |
2979 | line_.Clear(); |
2980 | ::memset(&id_, 0, static_cast<size_t>( |
2981 | reinterpret_cast<char*>(&address_) - |
2982 | reinterpret_cast<char*>(&id_)) + sizeof(address_)); |
2983 | _internal_metadata_.Clear(); |
2984 | } |
2985 | |
2986 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2987 | const char* Location::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2988 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2989 | while (!ctx->Done(&ptr)) { |
2990 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2991 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2992 | CHK_(ptr); |
2993 | switch (tag >> 3) { |
2994 | // uint64 id = 1; |
2995 | case 1: |
2996 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
2997 | id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2998 | CHK_(ptr); |
2999 | } else goto handle_unusual; |
3000 | continue; |
3001 | // uint64 mapping_id = 2; |
3002 | case 2: |
3003 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
3004 | mapping_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3005 | CHK_(ptr); |
3006 | } else goto handle_unusual; |
3007 | continue; |
3008 | // uint64 address = 3; |
3009 | case 3: |
3010 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
3011 | address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3012 | CHK_(ptr); |
3013 | } else goto handle_unusual; |
3014 | continue; |
3015 | // repeated .tensorflow.tfprof.pprof.Line line = 4; |
3016 | case 4: |
3017 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
3018 | ptr -= 1; |
3019 | do { |
3020 | ptr += 1; |
3021 | ptr = ctx->ParseMessage(add_line(), ptr); |
3022 | CHK_(ptr); |
3023 | if (!ctx->DataAvailable(ptr)) break; |
3024 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); |
3025 | } else goto handle_unusual; |
3026 | continue; |
3027 | default: { |
3028 | handle_unusual: |
3029 | if ((tag & 7) == 4 || tag == 0) { |
3030 | ctx->SetLastTag(tag); |
3031 | goto success; |
3032 | } |
3033 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3034 | CHK_(ptr != nullptr); |
3035 | continue; |
3036 | } |
3037 | } // switch |
3038 | } // while |
3039 | success: |
3040 | return ptr; |
3041 | failure: |
3042 | ptr = nullptr; |
3043 | goto success; |
3044 | #undef CHK_ |
3045 | } |
3046 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3047 | bool Location::MergePartialFromCodedStream( |
3048 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3049 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3050 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3051 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.pprof.Location) |
3052 | for (;;) { |
3053 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3054 | tag = p.first; |
3055 | if (!p.second) goto handle_unusual; |
3056 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3057 | // uint64 id = 1; |
3058 | case 1: { |
3059 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
3060 | |
3061 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3062 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
3063 | input, &id_))); |
3064 | } else { |
3065 | goto handle_unusual; |
3066 | } |
3067 | break; |
3068 | } |
3069 | |
3070 | // uint64 mapping_id = 2; |
3071 | case 2: { |
3072 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
3073 | |
3074 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3075 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
3076 | input, &mapping_id_))); |
3077 | } else { |
3078 | goto handle_unusual; |
3079 | } |
3080 | break; |
3081 | } |
3082 | |
3083 | // uint64 address = 3; |
3084 | case 3: { |
3085 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
3086 | |
3087 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3088 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
3089 | input, &address_))); |
3090 | } else { |
3091 | goto handle_unusual; |
3092 | } |
3093 | break; |
3094 | } |
3095 | |
3096 | // repeated .tensorflow.tfprof.pprof.Line line = 4; |
3097 | case 4: { |
3098 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
3099 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3100 | input, add_line())); |
3101 | } else { |
3102 | goto handle_unusual; |
3103 | } |
3104 | break; |
3105 | } |
3106 | |
3107 | default: { |
3108 | handle_unusual: |
3109 | if (tag == 0) { |
3110 | goto success; |
3111 | } |
3112 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3113 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3114 | break; |
3115 | } |
3116 | } |
3117 | } |
3118 | success: |
3119 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.pprof.Location) |
3120 | return true; |
3121 | failure: |
3122 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.pprof.Location) |
3123 | return false; |
3124 | #undef DO_ |
3125 | } |
3126 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3127 | |
3128 | void Location::SerializeWithCachedSizes( |
3129 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3130 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.pprof.Location) |
3131 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3132 | (void) cached_has_bits; |
3133 | |
3134 | // uint64 id = 1; |
3135 | if (this->id() != 0) { |
3136 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->id(), output); |
3137 | } |
3138 | |
3139 | // uint64 mapping_id = 2; |
3140 | if (this->mapping_id() != 0) { |
3141 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(2, this->mapping_id(), output); |
3142 | } |
3143 | |
3144 | // uint64 address = 3; |
3145 | if (this->address() != 0) { |
3146 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(3, this->address(), output); |
3147 | } |
3148 | |
3149 | // repeated .tensorflow.tfprof.pprof.Line line = 4; |
3150 | for (unsigned int i = 0, |
3151 | n = static_cast<unsigned int>(this->line_size()); i < n; i++) { |
3152 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3153 | 4, |
3154 | this->line(static_cast<int>(i)), |
3155 | output); |
3156 | } |
3157 | |
3158 | if (_internal_metadata_.have_unknown_fields()) { |
3159 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3160 | _internal_metadata_.unknown_fields(), output); |
3161 | } |
3162 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.pprof.Location) |
3163 | } |
3164 | |
3165 | ::PROTOBUF_NAMESPACE_ID::uint8* Location::InternalSerializeWithCachedSizesToArray( |
3166 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3167 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.pprof.Location) |
3168 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3169 | (void) cached_has_bits; |
3170 | |
3171 | // uint64 id = 1; |
3172 | if (this->id() != 0) { |
3173 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->id(), target); |
3174 | } |
3175 | |
3176 | // uint64 mapping_id = 2; |
3177 | if (this->mapping_id() != 0) { |
3178 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->mapping_id(), target); |
3179 | } |
3180 | |
3181 | // uint64 address = 3; |
3182 | if (this->address() != 0) { |
3183 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(3, this->address(), target); |
3184 | } |
3185 | |
3186 | // repeated .tensorflow.tfprof.pprof.Line line = 4; |
3187 | for (unsigned int i = 0, |
3188 | n = static_cast<unsigned int>(this->line_size()); i < n; i++) { |
3189 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3190 | InternalWriteMessageToArray( |
3191 | 4, this->line(static_cast<int>(i)), target); |
3192 | } |
3193 | |
3194 | if (_internal_metadata_.have_unknown_fields()) { |
3195 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3196 | _internal_metadata_.unknown_fields(), target); |
3197 | } |
3198 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.pprof.Location) |
3199 | return target; |
3200 | } |
3201 | |
3202 | size_t Location::ByteSizeLong() const { |
3203 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.pprof.Location) |
3204 | size_t total_size = 0; |
3205 | |
3206 | if (_internal_metadata_.have_unknown_fields()) { |
3207 | total_size += |
3208 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3209 | _internal_metadata_.unknown_fields()); |
3210 | } |
3211 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3212 | // Prevent compiler warnings about cached_has_bits being unused |
3213 | (void) cached_has_bits; |
3214 | |
3215 | // repeated .tensorflow.tfprof.pprof.Line line = 4; |
3216 | { |
3217 | unsigned int count = static_cast<unsigned int>(this->line_size()); |
3218 | total_size += 1UL * count; |
3219 | for (unsigned int i = 0; i < count; i++) { |
3220 | total_size += |
3221 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3222 | this->line(static_cast<int>(i))); |
3223 | } |
3224 | } |
3225 | |
3226 | // uint64 id = 1; |
3227 | if (this->id() != 0) { |
3228 | total_size += 1 + |
3229 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
3230 | this->id()); |
3231 | } |
3232 | |
3233 | // uint64 mapping_id = 2; |
3234 | if (this->mapping_id() != 0) { |
3235 | total_size += 1 + |
3236 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
3237 | this->mapping_id()); |
3238 | } |
3239 | |
3240 | // uint64 address = 3; |
3241 | if (this->address() != 0) { |
3242 | total_size += 1 + |
3243 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
3244 | this->address()); |
3245 | } |
3246 | |
3247 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3248 | SetCachedSize(cached_size); |
3249 | return total_size; |
3250 | } |
3251 | |
3252 | void Location::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3253 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.pprof.Location) |
3254 | GOOGLE_DCHECK_NE(&from, this); |
3255 | const Location* source = |
3256 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Location>( |
3257 | &from); |
3258 | if (source == nullptr) { |
3259 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.pprof.Location) |
3260 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3261 | } else { |
3262 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.pprof.Location) |
3263 | MergeFrom(*source); |
3264 | } |
3265 | } |
3266 | |
3267 | void Location::MergeFrom(const Location& from) { |
3268 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.pprof.Location) |
3269 | GOOGLE_DCHECK_NE(&from, this); |
3270 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3271 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3272 | (void) cached_has_bits; |
3273 | |
3274 | line_.MergeFrom(from.line_); |
3275 | if (from.id() != 0) { |
3276 | set_id(from.id()); |
3277 | } |
3278 | if (from.mapping_id() != 0) { |
3279 | set_mapping_id(from.mapping_id()); |
3280 | } |
3281 | if (from.address() != 0) { |
3282 | set_address(from.address()); |
3283 | } |
3284 | } |
3285 | |
3286 | void Location::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3287 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.pprof.Location) |
3288 | if (&from == this) return; |
3289 | Clear(); |
3290 | MergeFrom(from); |
3291 | } |
3292 | |
3293 | void Location::CopyFrom(const Location& from) { |
3294 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.pprof.Location) |
3295 | if (&from == this) return; |
3296 | Clear(); |
3297 | MergeFrom(from); |
3298 | } |
3299 | |
3300 | bool Location::IsInitialized() const { |
3301 | return true; |
3302 | } |
3303 | |
3304 | void Location::InternalSwap(Location* other) { |
3305 | using std::swap; |
3306 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3307 | CastToBase(&line_)->InternalSwap(CastToBase(&other->line_)); |
3308 | swap(id_, other->id_); |
3309 | swap(mapping_id_, other->mapping_id_); |
3310 | swap(address_, other->address_); |
3311 | } |
3312 | |
3313 | ::PROTOBUF_NAMESPACE_ID::Metadata Location::GetMetadata() const { |
3314 | return GetMetadataStatic(); |
3315 | } |
3316 | |
3317 | |
3318 | // =================================================================== |
3319 | |
3320 | void Line::InitAsDefaultInstance() { |
3321 | } |
3322 | class Line::_Internal { |
3323 | public: |
3324 | }; |
3325 | |
3326 | Line::Line() |
3327 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3328 | SharedCtor(); |
3329 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.pprof.Line) |
3330 | } |
3331 | Line::Line(const Line& from) |
3332 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3333 | _internal_metadata_(nullptr) { |
3334 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3335 | ::memcpy(&function_id_, &from.function_id_, |
3336 | static_cast<size_t>(reinterpret_cast<char*>(&line_) - |
3337 | reinterpret_cast<char*>(&function_id_)) + sizeof(line_)); |
3338 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.pprof.Line) |
3339 | } |
3340 | |
3341 | void Line::SharedCtor() { |
3342 | ::memset(&function_id_, 0, static_cast<size_t>( |
3343 | reinterpret_cast<char*>(&line_) - |
3344 | reinterpret_cast<char*>(&function_id_)) + sizeof(line_)); |
3345 | } |
3346 | |
3347 | Line::~Line() { |
3348 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.pprof.Line) |
3349 | SharedDtor(); |
3350 | } |
3351 | |
3352 | void Line::SharedDtor() { |
3353 | } |
3354 | |
3355 | void Line::SetCachedSize(int size) const { |
3356 | _cached_size_.Set(size); |
3357 | } |
3358 | const Line& Line::default_instance() { |
3359 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Line_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
3360 | return *internal_default_instance(); |
3361 | } |
3362 | |
3363 | |
3364 | void Line::Clear() { |
3365 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.pprof.Line) |
3366 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3367 | // Prevent compiler warnings about cached_has_bits being unused |
3368 | (void) cached_has_bits; |
3369 | |
3370 | ::memset(&function_id_, 0, static_cast<size_t>( |
3371 | reinterpret_cast<char*>(&line_) - |
3372 | reinterpret_cast<char*>(&function_id_)) + sizeof(line_)); |
3373 | _internal_metadata_.Clear(); |
3374 | } |
3375 | |
3376 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3377 | const char* Line::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3378 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3379 | while (!ctx->Done(&ptr)) { |
3380 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3381 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3382 | CHK_(ptr); |
3383 | switch (tag >> 3) { |
3384 | // uint64 function_id = 1; |
3385 | case 1: |
3386 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
3387 | function_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3388 | CHK_(ptr); |
3389 | } else goto handle_unusual; |
3390 | continue; |
3391 | // int64 line = 2; |
3392 | case 2: |
3393 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
3394 | line_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3395 | CHK_(ptr); |
3396 | } else goto handle_unusual; |
3397 | continue; |
3398 | default: { |
3399 | handle_unusual: |
3400 | if ((tag & 7) == 4 || tag == 0) { |
3401 | ctx->SetLastTag(tag); |
3402 | goto success; |
3403 | } |
3404 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3405 | CHK_(ptr != nullptr); |
3406 | continue; |
3407 | } |
3408 | } // switch |
3409 | } // while |
3410 | success: |
3411 | return ptr; |
3412 | failure: |
3413 | ptr = nullptr; |
3414 | goto success; |
3415 | #undef CHK_ |
3416 | } |
3417 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3418 | bool Line::MergePartialFromCodedStream( |
3419 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3420 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3421 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3422 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.pprof.Line) |
3423 | for (;;) { |
3424 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3425 | tag = p.first; |
3426 | if (!p.second) goto handle_unusual; |
3427 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3428 | // uint64 function_id = 1; |
3429 | case 1: { |
3430 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
3431 | |
3432 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3433 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
3434 | input, &function_id_))); |
3435 | } else { |
3436 | goto handle_unusual; |
3437 | } |
3438 | break; |
3439 | } |
3440 | |
3441 | // int64 line = 2; |
3442 | case 2: { |
3443 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
3444 | |
3445 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3446 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3447 | input, &line_))); |
3448 | } else { |
3449 | goto handle_unusual; |
3450 | } |
3451 | break; |
3452 | } |
3453 | |
3454 | default: { |
3455 | handle_unusual: |
3456 | if (tag == 0) { |
3457 | goto success; |
3458 | } |
3459 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3460 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3461 | break; |
3462 | } |
3463 | } |
3464 | } |
3465 | success: |
3466 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.pprof.Line) |
3467 | return true; |
3468 | failure: |
3469 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.pprof.Line) |
3470 | return false; |
3471 | #undef DO_ |
3472 | } |
3473 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3474 | |
3475 | void Line::SerializeWithCachedSizes( |
3476 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3477 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.pprof.Line) |
3478 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3479 | (void) cached_has_bits; |
3480 | |
3481 | // uint64 function_id = 1; |
3482 | if (this->function_id() != 0) { |
3483 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->function_id(), output); |
3484 | } |
3485 | |
3486 | // int64 line = 2; |
3487 | if (this->line() != 0) { |
3488 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->line(), output); |
3489 | } |
3490 | |
3491 | if (_internal_metadata_.have_unknown_fields()) { |
3492 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3493 | _internal_metadata_.unknown_fields(), output); |
3494 | } |
3495 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.pprof.Line) |
3496 | } |
3497 | |
3498 | ::PROTOBUF_NAMESPACE_ID::uint8* Line::InternalSerializeWithCachedSizesToArray( |
3499 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3500 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.pprof.Line) |
3501 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3502 | (void) cached_has_bits; |
3503 | |
3504 | // uint64 function_id = 1; |
3505 | if (this->function_id() != 0) { |
3506 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->function_id(), target); |
3507 | } |
3508 | |
3509 | // int64 line = 2; |
3510 | if (this->line() != 0) { |
3511 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->line(), target); |
3512 | } |
3513 | |
3514 | if (_internal_metadata_.have_unknown_fields()) { |
3515 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3516 | _internal_metadata_.unknown_fields(), target); |
3517 | } |
3518 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.pprof.Line) |
3519 | return target; |
3520 | } |
3521 | |
3522 | size_t Line::ByteSizeLong() const { |
3523 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.pprof.Line) |
3524 | size_t total_size = 0; |
3525 | |
3526 | if (_internal_metadata_.have_unknown_fields()) { |
3527 | total_size += |
3528 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3529 | _internal_metadata_.unknown_fields()); |
3530 | } |
3531 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3532 | // Prevent compiler warnings about cached_has_bits being unused |
3533 | (void) cached_has_bits; |
3534 | |
3535 | // uint64 function_id = 1; |
3536 | if (this->function_id() != 0) { |
3537 | total_size += 1 + |
3538 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
3539 | this->function_id()); |
3540 | } |
3541 | |
3542 | // int64 line = 2; |
3543 | if (this->line() != 0) { |
3544 | total_size += 1 + |
3545 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
3546 | this->line()); |
3547 | } |
3548 | |
3549 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3550 | SetCachedSize(cached_size); |
3551 | return total_size; |
3552 | } |
3553 | |
3554 | void Line::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3555 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.pprof.Line) |
3556 | GOOGLE_DCHECK_NE(&from, this); |
3557 | const Line* source = |
3558 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Line>( |
3559 | &from); |
3560 | if (source == nullptr) { |
3561 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.pprof.Line) |
3562 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3563 | } else { |
3564 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.pprof.Line) |
3565 | MergeFrom(*source); |
3566 | } |
3567 | } |
3568 | |
3569 | void Line::MergeFrom(const Line& from) { |
3570 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.pprof.Line) |
3571 | GOOGLE_DCHECK_NE(&from, this); |
3572 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3573 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3574 | (void) cached_has_bits; |
3575 | |
3576 | if (from.function_id() != 0) { |
3577 | set_function_id(from.function_id()); |
3578 | } |
3579 | if (from.line() != 0) { |
3580 | set_line(from.line()); |
3581 | } |
3582 | } |
3583 | |
3584 | void Line::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3585 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.pprof.Line) |
3586 | if (&from == this) return; |
3587 | Clear(); |
3588 | MergeFrom(from); |
3589 | } |
3590 | |
3591 | void Line::CopyFrom(const Line& from) { |
3592 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.pprof.Line) |
3593 | if (&from == this) return; |
3594 | Clear(); |
3595 | MergeFrom(from); |
3596 | } |
3597 | |
3598 | bool Line::IsInitialized() const { |
3599 | return true; |
3600 | } |
3601 | |
3602 | void Line::InternalSwap(Line* other) { |
3603 | using std::swap; |
3604 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3605 | swap(function_id_, other->function_id_); |
3606 | swap(line_, other->line_); |
3607 | } |
3608 | |
3609 | ::PROTOBUF_NAMESPACE_ID::Metadata Line::GetMetadata() const { |
3610 | return GetMetadataStatic(); |
3611 | } |
3612 | |
3613 | |
3614 | // =================================================================== |
3615 | |
3616 | void Function::InitAsDefaultInstance() { |
3617 | } |
3618 | class Function::_Internal { |
3619 | public: |
3620 | }; |
3621 | |
3622 | Function::Function() |
3623 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3624 | SharedCtor(); |
3625 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.pprof.Function) |
3626 | } |
3627 | Function::Function(const Function& from) |
3628 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3629 | _internal_metadata_(nullptr) { |
3630 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3631 | ::memcpy(&id_, &from.id_, |
3632 | static_cast<size_t>(reinterpret_cast<char*>(&start_line_) - |
3633 | reinterpret_cast<char*>(&id_)) + sizeof(start_line_)); |
3634 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.pprof.Function) |
3635 | } |
3636 | |
3637 | void Function::SharedCtor() { |
3638 | ::memset(&id_, 0, static_cast<size_t>( |
3639 | reinterpret_cast<char*>(&start_line_) - |
3640 | reinterpret_cast<char*>(&id_)) + sizeof(start_line_)); |
3641 | } |
3642 | |
3643 | Function::~Function() { |
3644 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.pprof.Function) |
3645 | SharedDtor(); |
3646 | } |
3647 | |
3648 | void Function::SharedDtor() { |
3649 | } |
3650 | |
3651 | void Function::SetCachedSize(int size) const { |
3652 | _cached_size_.Set(size); |
3653 | } |
3654 | const Function& Function::default_instance() { |
3655 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Function_tensorflow_2fcore_2fprofiler_2fprofile_2eproto.base); |
3656 | return *internal_default_instance(); |
3657 | } |
3658 | |
3659 | |
3660 | void Function::Clear() { |
3661 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.pprof.Function) |
3662 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3663 | // Prevent compiler warnings about cached_has_bits being unused |
3664 | (void) cached_has_bits; |
3665 | |
3666 | ::memset(&id_, 0, static_cast<size_t>( |
3667 | reinterpret_cast<char*>(&start_line_) - |
3668 | reinterpret_cast<char*>(&id_)) + sizeof(start_line_)); |
3669 | _internal_metadata_.Clear(); |
3670 | } |
3671 | |
3672 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3673 | const char* Function::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3674 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3675 | while (!ctx->Done(&ptr)) { |
3676 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3677 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3678 | CHK_(ptr); |
3679 | switch (tag >> 3) { |
3680 | // uint64 id = 1; |
3681 | case 1: |
3682 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
3683 | id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3684 | CHK_(ptr); |
3685 | } else goto handle_unusual; |
3686 | continue; |
3687 | // int64 name = 2; |
3688 | case 2: |
3689 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
3690 | name_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3691 | CHK_(ptr); |
3692 | } else goto handle_unusual; |
3693 | continue; |
3694 | // int64 system_name = 3; |
3695 | case 3: |
3696 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
3697 | system_name_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3698 | CHK_(ptr); |
3699 | } else goto handle_unusual; |
3700 | continue; |
3701 | // int64 filename = 4; |
3702 | case 4: |
3703 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
3704 | filename_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3705 | CHK_(ptr); |
3706 | } else goto handle_unusual; |
3707 | continue; |
3708 | // int64 start_line = 5; |
3709 | case 5: |
3710 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
3711 | start_line_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3712 | CHK_(ptr); |
3713 | } else goto handle_unusual; |
3714 | continue; |
3715 | default: { |
3716 | handle_unusual: |
3717 | if ((tag & 7) == 4 || tag == 0) { |
3718 | ctx->SetLastTag(tag); |
3719 | goto success; |
3720 | } |
3721 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3722 | CHK_(ptr != nullptr); |
3723 | continue; |
3724 | } |
3725 | } // switch |
3726 | } // while |
3727 | success: |
3728 | return ptr; |
3729 | failure: |
3730 | ptr = nullptr; |
3731 | goto success; |
3732 | #undef CHK_ |
3733 | } |
3734 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3735 | bool Function::MergePartialFromCodedStream( |
3736 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3737 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3738 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3739 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.pprof.Function) |
3740 | for (;;) { |
3741 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3742 | tag = p.first; |
3743 | if (!p.second) goto handle_unusual; |
3744 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3745 | // uint64 id = 1; |
3746 | case 1: { |
3747 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
3748 | |
3749 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3750 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
3751 | input, &id_))); |
3752 | } else { |
3753 | goto handle_unusual; |
3754 | } |
3755 | break; |
3756 | } |
3757 | |
3758 | // int64 name = 2; |
3759 | case 2: { |
3760 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
3761 | |
3762 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3763 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3764 | input, &name_))); |
3765 | } else { |
3766 | goto handle_unusual; |
3767 | } |
3768 | break; |
3769 | } |
3770 | |
3771 | // int64 system_name = 3; |
3772 | case 3: { |
3773 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
3774 | |
3775 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3776 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3777 | input, &system_name_))); |
3778 | } else { |
3779 | goto handle_unusual; |
3780 | } |
3781 | break; |
3782 | } |
3783 | |
3784 | // int64 filename = 4; |
3785 | case 4: { |
3786 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
3787 | |
3788 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3789 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3790 | input, &filename_))); |
3791 | } else { |
3792 | goto handle_unusual; |
3793 | } |
3794 | break; |
3795 | } |
3796 | |
3797 | // int64 start_line = 5; |
3798 | case 5: { |
3799 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
3800 | |
3801 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3802 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3803 | input, &start_line_))); |
3804 | } else { |
3805 | goto handle_unusual; |
3806 | } |
3807 | break; |
3808 | } |
3809 | |
3810 | default: { |
3811 | handle_unusual: |
3812 | if (tag == 0) { |
3813 | goto success; |
3814 | } |
3815 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3816 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3817 | break; |
3818 | } |
3819 | } |
3820 | } |
3821 | success: |
3822 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.pprof.Function) |
3823 | return true; |
3824 | failure: |
3825 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.pprof.Function) |
3826 | return false; |
3827 | #undef DO_ |
3828 | } |
3829 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3830 | |
3831 | void Function::SerializeWithCachedSizes( |
3832 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3833 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.pprof.Function) |
3834 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3835 | (void) cached_has_bits; |
3836 | |
3837 | // uint64 id = 1; |
3838 | if (this->id() != 0) { |
3839 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->id(), output); |
3840 | } |
3841 | |
3842 | // int64 name = 2; |
3843 | if (this->name() != 0) { |
3844 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->name(), output); |
3845 | } |
3846 | |
3847 | // int64 system_name = 3; |
3848 | if (this->system_name() != 0) { |
3849 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->system_name(), output); |
3850 | } |
3851 | |
3852 | // int64 filename = 4; |
3853 | if (this->filename() != 0) { |
3854 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->filename(), output); |
3855 | } |
3856 | |
3857 | // int64 start_line = 5; |
3858 | if (this->start_line() != 0) { |
3859 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->start_line(), output); |
3860 | } |
3861 | |
3862 | if (_internal_metadata_.have_unknown_fields()) { |
3863 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3864 | _internal_metadata_.unknown_fields(), output); |
3865 | } |
3866 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.pprof.Function) |
3867 | } |
3868 | |
3869 | ::PROTOBUF_NAMESPACE_ID::uint8* Function::InternalSerializeWithCachedSizesToArray( |
3870 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3871 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.pprof.Function) |
3872 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3873 | (void) cached_has_bits; |
3874 | |
3875 | // uint64 id = 1; |
3876 | if (this->id() != 0) { |
3877 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->id(), target); |
3878 | } |
3879 | |
3880 | // int64 name = 2; |
3881 | if (this->name() != 0) { |
3882 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->name(), target); |
3883 | } |
3884 | |
3885 | // int64 system_name = 3; |
3886 | if (this->system_name() != 0) { |
3887 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->system_name(), target); |
3888 | } |
3889 | |
3890 | // int64 filename = 4; |
3891 | if (this->filename() != 0) { |
3892 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->filename(), target); |
3893 | } |
3894 | |
3895 | // int64 start_line = 5; |
3896 | if (this->start_line() != 0) { |
3897 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->start_line(), target); |
3898 | } |
3899 | |
3900 | if (_internal_metadata_.have_unknown_fields()) { |
3901 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3902 | _internal_metadata_.unknown_fields(), target); |
3903 | } |
3904 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.pprof.Function) |
3905 | return target; |
3906 | } |
3907 | |
3908 | size_t Function::ByteSizeLong() const { |
3909 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.pprof.Function) |
3910 | size_t total_size = 0; |
3911 | |
3912 | if (_internal_metadata_.have_unknown_fields()) { |
3913 | total_size += |
3914 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3915 | _internal_metadata_.unknown_fields()); |
3916 | } |
3917 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3918 | // Prevent compiler warnings about cached_has_bits being unused |
3919 | (void) cached_has_bits; |
3920 | |
3921 | // uint64 id = 1; |
3922 | if (this->id() != 0) { |
3923 | total_size += 1 + |
3924 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
3925 | this->id()); |
3926 | } |
3927 | |
3928 | // int64 name = 2; |
3929 | if (this->name() != 0) { |
3930 | total_size += 1 + |
3931 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
3932 | this->name()); |
3933 | } |
3934 | |
3935 | // int64 system_name = 3; |
3936 | if (this->system_name() != 0) { |
3937 | total_size += 1 + |
3938 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
3939 | this->system_name()); |
3940 | } |
3941 | |
3942 | // int64 filename = 4; |
3943 | if (this->filename() != 0) { |
3944 | total_size += 1 + |
3945 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
3946 | this->filename()); |
3947 | } |
3948 | |
3949 | // int64 start_line = 5; |
3950 | if (this->start_line() != 0) { |
3951 | total_size += 1 + |
3952 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
3953 | this->start_line()); |
3954 | } |
3955 | |
3956 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3957 | SetCachedSize(cached_size); |
3958 | return total_size; |
3959 | } |
3960 | |
3961 | void Function::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3962 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.pprof.Function) |
3963 | GOOGLE_DCHECK_NE(&from, this); |
3964 | const Function* source = |
3965 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Function>( |
3966 | &from); |
3967 | if (source == nullptr) { |
3968 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.pprof.Function) |
3969 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3970 | } else { |
3971 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.pprof.Function) |
3972 | MergeFrom(*source); |
3973 | } |
3974 | } |
3975 | |
3976 | void Function::MergeFrom(const Function& from) { |
3977 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.pprof.Function) |
3978 | GOOGLE_DCHECK_NE(&from, this); |
3979 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3980 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3981 | (void) cached_has_bits; |
3982 | |
3983 | if (from.id() != 0) { |
3984 | set_id(from.id()); |
3985 | } |
3986 | if (from.name() != 0) { |
3987 | set_name(from.name()); |
3988 | } |
3989 | if (from.system_name() != 0) { |
3990 | set_system_name(from.system_name()); |
3991 | } |
3992 | if (from.filename() != 0) { |
3993 | set_filename(from.filename()); |
3994 | } |
3995 | if (from.start_line() != 0) { |
3996 | set_start_line(from.start_line()); |
3997 | } |
3998 | } |
3999 | |
4000 | void Function::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4001 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.pprof.Function) |
4002 | if (&from == this) return; |
4003 | Clear(); |
4004 | MergeFrom(from); |
4005 | } |
4006 | |
4007 | void Function::CopyFrom(const Function& from) { |
4008 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.pprof.Function) |
4009 | if (&from == this) return; |
4010 | Clear(); |
4011 | MergeFrom(from); |
4012 | } |
4013 | |
4014 | bool Function::IsInitialized() const { |
4015 | return true; |
4016 | } |
4017 | |
4018 | void Function::InternalSwap(Function* other) { |
4019 | using std::swap; |
4020 | _internal_metadata_.Swap(&other->_internal_metadata_); |
4021 | swap(id_, other->id_); |
4022 | swap(name_, other->name_); |
4023 | swap(system_name_, other->system_name_); |
4024 | swap(filename_, other->filename_); |
4025 | swap(start_line_, other->start_line_); |
4026 | } |
4027 | |
4028 | ::PROTOBUF_NAMESPACE_ID::Metadata Function::GetMetadata() const { |
4029 | return GetMetadataStatic(); |
4030 | } |
4031 | |
4032 | |
4033 | // @@protoc_insertion_point(namespace_scope) |
4034 | } // namespace pprof |
4035 | } // namespace tfprof |
4036 | } // namespace tensorflow |
4037 | PROTOBUF_NAMESPACE_OPEN |
4038 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::pprof::Profile* Arena::CreateMaybeMessage< ::tensorflow::tfprof::pprof::Profile >(Arena* arena) { |
4039 | return Arena::CreateInternal< ::tensorflow::tfprof::pprof::Profile >(arena); |
4040 | } |
4041 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::pprof::ValueType* Arena::CreateMaybeMessage< ::tensorflow::tfprof::pprof::ValueType >(Arena* arena) { |
4042 | return Arena::CreateInternal< ::tensorflow::tfprof::pprof::ValueType >(arena); |
4043 | } |
4044 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::pprof::Sample* Arena::CreateMaybeMessage< ::tensorflow::tfprof::pprof::Sample >(Arena* arena) { |
4045 | return Arena::CreateInternal< ::tensorflow::tfprof::pprof::Sample >(arena); |
4046 | } |
4047 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::pprof::Label* Arena::CreateMaybeMessage< ::tensorflow::tfprof::pprof::Label >(Arena* arena) { |
4048 | return Arena::CreateInternal< ::tensorflow::tfprof::pprof::Label >(arena); |
4049 | } |
4050 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::pprof::Mapping* Arena::CreateMaybeMessage< ::tensorflow::tfprof::pprof::Mapping >(Arena* arena) { |
4051 | return Arena::CreateInternal< ::tensorflow::tfprof::pprof::Mapping >(arena); |
4052 | } |
4053 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::pprof::Location* Arena::CreateMaybeMessage< ::tensorflow::tfprof::pprof::Location >(Arena* arena) { |
4054 | return Arena::CreateInternal< ::tensorflow::tfprof::pprof::Location >(arena); |
4055 | } |
4056 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::pprof::Line* Arena::CreateMaybeMessage< ::tensorflow::tfprof::pprof::Line >(Arena* arena) { |
4057 | return Arena::CreateInternal< ::tensorflow::tfprof::pprof::Line >(arena); |
4058 | } |
4059 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::pprof::Function* Arena::CreateMaybeMessage< ::tensorflow::tfprof::pprof::Function >(Arena* arena) { |
4060 | return Arena::CreateInternal< ::tensorflow::tfprof::pprof::Function >(arena); |
4061 | } |
4062 | PROTOBUF_NAMESPACE_CLOSE |
4063 | |
4064 | // @@protoc_insertion_point(global_scope) |
4065 | #include <google/protobuf/port_undef.inc> |
4066 | |