mz_prof/mnt/build/debug/build/mz-prof-0476803ac667c479/out/perftools.profiles.rs
1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Profile {
4 /// A description of the samples associated with each Sample.value.
5 /// For a cpu profile this might be:
6 /// ["cpu","nanoseconds"]("cpu","nanoseconds") or ["wall","seconds"]("wall","seconds") or ["syscall","count"]("syscall","count")
7 /// For a heap profile, this might be:
8 /// \["allocations","count"\], ["space","bytes"](<"allocations","count"], ["space","bytes">),
9 /// If one of the values represents the number of events represented
10 /// by the sample, by convention it should be at index 0 and use
11 /// sample_type.unit == "count".
12 #[prost(message, repeated, tag = "1")]
13 pub sample_type: ::prost::alloc::vec::Vec<ValueType>,
14 /// The set of samples recorded in this profile.
15 #[prost(message, repeated, tag = "2")]
16 pub sample: ::prost::alloc::vec::Vec<Sample>,
17 /// Mapping from address ranges to the image/binary/library mapped
18 /// into that address range. mapping\[0\] will be the main binary.
19 #[prost(message, repeated, tag = "3")]
20 pub mapping: ::prost::alloc::vec::Vec<Mapping>,
21 /// Locations referenced by samples.
22 #[prost(message, repeated, tag = "4")]
23 pub location: ::prost::alloc::vec::Vec<Location>,
24 /// Functions referenced by locations.
25 #[prost(message, repeated, tag = "5")]
26 pub function: ::prost::alloc::vec::Vec<Function>,
27 /// A common table for strings referenced by various messages.
28 /// string_table\[0\] must always be "".
29 #[prost(string, repeated, tag = "6")]
30 pub string_table: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
31 /// frames with Function.function_name fully matching the following
32 /// regexp will be dropped from the samples, along with their successors.
33 ///
34 /// Index into string table.
35 #[prost(int64, tag = "7")]
36 pub drop_frames: i64,
37 /// frames with Function.function_name fully matching the following
38 /// regexp will be kept, even if it matches drop_frames.
39 ///
40 /// Index into string table.
41 #[prost(int64, tag = "8")]
42 pub keep_frames: i64,
43 /// Time of collection (UTC) represented as nanoseconds past the epoch.
44 #[prost(int64, tag = "9")]
45 pub time_nanos: i64,
46 /// Duration of the profile, if a duration makes sense.
47 #[prost(int64, tag = "10")]
48 pub duration_nanos: i64,
49 /// The kind of events between sampled occurrences.
50 /// e.g \[ "cpu","cycles" \] or \[ "heap","bytes" \]
51 #[prost(message, optional, tag = "11")]
52 pub period_type: ::core::option::Option<ValueType>,
53 /// The number of events between sampled occurrences.
54 #[prost(int64, tag = "12")]
55 pub period: i64,
56 /// Free-form text associated with the profile. The text is displayed as is
57 /// to the user by the tools that read profiles (e.g. by pprof). This field
58 /// should not be used to store any machine-readable information, it is only
59 /// for human-friendly content. The profile must stay functional if this field
60 /// is cleaned.
61 ///
62 /// Indices into string table.
63 #[prost(int64, repeated, tag = "13")]
64 pub comment: ::prost::alloc::vec::Vec<i64>,
65 /// Index into the string table of the type of the preferred sample
66 /// value. If unset, clients should default to the last sample value.
67 #[prost(int64, tag = "14")]
68 pub default_sample_type: i64,
69}
70/// ValueType describes the semantics and measurement units of a value.
71#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
72pub struct ValueType {
73 /// Index into string table.
74 #[prost(int64, tag = "1")]
75 pub r#type: i64,
76 /// Index into string table.
77 #[prost(int64, tag = "2")]
78 pub unit: i64,
79}
80/// Each Sample records values encountered in some program
81/// context. The program context is typically a stack trace, perhaps
82/// augmented with auxiliary information like the thread-id, some
83/// indicator of a higher level request being handled etc.
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct Sample {
86 /// The ids recorded here correspond to a Profile.location.id.
87 /// The leaf is at location_id\[0\].
88 #[prost(uint64, repeated, tag = "1")]
89 pub location_id: ::prost::alloc::vec::Vec<u64>,
90 /// The type and unit of each value is defined by the corresponding
91 /// entry in Profile.sample_type. All samples must have the same
92 /// number of values, the same as the length of Profile.sample_type.
93 /// When aggregating multiple samples into a single sample, the
94 /// result has a list of values that is the element-wise sum of the
95 /// lists of the originals.
96 #[prost(int64, repeated, tag = "2")]
97 pub value: ::prost::alloc::vec::Vec<i64>,
98 /// label includes additional context for this sample. It can include
99 /// things like a thread id, allocation size, etc.
100 ///
101 /// NOTE: While possible, having multiple values for the same label key is
102 /// strongly discouraged and should never be used. Most tools (e.g. pprof) do
103 /// not have good (or any) support for multi-value labels. And an even more
104 /// discouraged case is having a string label and a numeric label of the same
105 /// name on a sample. Again, possible to express, but should not be used.
106 #[prost(message, repeated, tag = "3")]
107 pub label: ::prost::alloc::vec::Vec<Label>,
108}
109#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
110pub struct Label {
111 /// Index into string table
112 #[prost(int64, tag = "1")]
113 pub key: i64,
114 /// At most one of the following must be present
115 ///
116 /// Index into string table
117 #[prost(int64, tag = "2")]
118 pub str: i64,
119 #[prost(int64, tag = "3")]
120 pub num: i64,
121 /// Should only be present when num is present.
122 /// Specifies the units of num.
123 /// Use arbitrary string (for example, "requests") as a custom count unit.
124 /// If no unit is specified, consumer may apply heuristic to deduce the unit.
125 /// Consumers may also interpret units like "bytes" and "kilobytes" as memory
126 /// units and units like "seconds" and "nanoseconds" as time units,
127 /// and apply appropriate unit conversions to these.
128 ///
129 /// Index into string table
130 #[prost(int64, tag = "4")]
131 pub num_unit: i64,
132}
133#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
134pub struct Mapping {
135 /// Unique nonzero id for the mapping.
136 #[prost(uint64, tag = "1")]
137 pub id: u64,
138 /// Address at which the binary (or DLL) is loaded into memory.
139 #[prost(uint64, tag = "2")]
140 pub memory_start: u64,
141 /// The limit of the address range occupied by this mapping.
142 #[prost(uint64, tag = "3")]
143 pub memory_limit: u64,
144 /// Offset in the binary that corresponds to the first mapped address.
145 #[prost(uint64, tag = "4")]
146 pub file_offset: u64,
147 /// The object this entry is loaded from. This can be a filename on
148 /// disk for the main binary and shared libraries, or virtual
149 /// abstractions like "\[vdso\]".
150 ///
151 /// Index into string table
152 #[prost(int64, tag = "5")]
153 pub filename: i64,
154 /// A string that uniquely identifies a particular program version
155 /// with high probability. E.g., for binaries generated by GNU tools,
156 /// it could be the contents of the .note.gnu.build-id field.
157 ///
158 /// Index into string table
159 #[prost(int64, tag = "6")]
160 pub build_id: i64,
161 /// The following fields indicate the resolution of symbolic info.
162 #[prost(bool, tag = "7")]
163 pub has_functions: bool,
164 #[prost(bool, tag = "8")]
165 pub has_filenames: bool,
166 #[prost(bool, tag = "9")]
167 pub has_line_numbers: bool,
168 #[prost(bool, tag = "10")]
169 pub has_inline_frames: bool,
170}
171/// Describes function and line table debug information.
172#[derive(Clone, PartialEq, ::prost::Message)]
173pub struct Location {
174 /// Unique nonzero id for the location. A profile could use
175 /// instruction addresses or any integer sequence as ids.
176 #[prost(uint64, tag = "1")]
177 pub id: u64,
178 /// The id of the corresponding profile.Mapping for this location.
179 /// It can be unset if the mapping is unknown or not applicable for
180 /// this profile type.
181 #[prost(uint64, tag = "2")]
182 pub mapping_id: u64,
183 /// The instruction address for this location, if available. It
184 /// should be within \[Mapping.memory_start...Mapping.memory_limit\]
185 /// for the corresponding mapping. A non-leaf address may be in the
186 /// middle of a call instruction. It is up to display tools to find
187 /// the beginning of the instruction if necessary.
188 #[prost(uint64, tag = "3")]
189 pub address: u64,
190 /// Multiple line indicates this location has inlined functions,
191 /// where the last entry represents the caller into which the
192 /// preceding entries were inlined.
193 ///
194 /// E.g., if memcpy() is inlined into printf:
195 /// line\[0\].function_name == "memcpy"
196 /// line\[1\].function_name == "printf"
197 #[prost(message, repeated, tag = "4")]
198 pub line: ::prost::alloc::vec::Vec<Line>,
199 /// Provides an indication that multiple symbols map to this location's
200 /// address, for example due to identical code folding by the linker. In that
201 /// case the line information above represents one of the multiple
202 /// symbols. This field must be recomputed when the symbolization state of the
203 /// profile changes.
204 #[prost(bool, tag = "5")]
205 pub is_folded: bool,
206}
207#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
208pub struct Line {
209 /// The id of the corresponding profile.Function for this line.
210 #[prost(uint64, tag = "1")]
211 pub function_id: u64,
212 /// Line number in source code.
213 #[prost(int64, tag = "2")]
214 pub line: i64,
215}
216#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
217pub struct Function {
218 /// Unique nonzero id for the function.
219 #[prost(uint64, tag = "1")]
220 pub id: u64,
221 /// Name of the function, in human-readable form if available.
222 ///
223 /// Index into string table
224 #[prost(int64, tag = "2")]
225 pub name: i64,
226 /// Name of the function, as identified by the system.
227 /// For instance, it can be a C++ mangled name.
228 ///
229 /// Index into string table
230 #[prost(int64, tag = "3")]
231 pub system_name: i64,
232 /// Source file containing the function.
233 ///
234 /// Index into string table
235 #[prost(int64, tag = "4")]
236 pub filename: i64,
237 /// Line number in source file.
238 #[prost(int64, tag = "5")]
239 pub start_line: i64,
240}