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