diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/perf/util/event.h | 26 | ||||
| -rw-r--r-- | tools/perf/util/hist.h | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 7eb7107731ec..5699e7e2a790 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
| @@ -190,6 +190,32 @@ enum perf_user_event_type { /* above any possible kernel type */ | |||
| 190 | PERF_RECORD_HEADER_MAX | 190 | PERF_RECORD_HEADER_MAX |
| 191 | }; | 191 | }; |
| 192 | 192 | ||
| 193 | /* | ||
| 194 | * The kernel collects the number of events it couldn't send in a stretch and | ||
| 195 | * when possible sends this number in a PERF_RECORD_LOST event. The number of | ||
| 196 | * such "chunks" of lost events is stored in .nr_events[PERF_EVENT_LOST] while | ||
| 197 | * total_lost tells exactly how many events the kernel in fact lost, i.e. it is | ||
| 198 | * the sum of all struct lost_event.lost fields reported. | ||
| 199 | * | ||
| 200 | * The total_period is needed because by default auto-freq is used, so | ||
| 201 | * multipling nr_events[PERF_EVENT_SAMPLE] by a frequency isn't possible to get | ||
| 202 | * the total number of low level events, it is necessary to to sum all struct | ||
| 203 | * sample_event.period and stash the result in total_period. | ||
| 204 | */ | ||
| 205 | struct events_stats { | ||
| 206 | u64 total_period; | ||
| 207 | u64 total_non_filtered_period; | ||
| 208 | u64 total_lost; | ||
| 209 | u64 total_invalid_chains; | ||
| 210 | u32 nr_events[PERF_RECORD_HEADER_MAX]; | ||
| 211 | u32 nr_non_filtered_samples; | ||
| 212 | u32 nr_lost_warned; | ||
| 213 | u32 nr_unknown_events; | ||
| 214 | u32 nr_invalid_chains; | ||
| 215 | u32 nr_unknown_id; | ||
| 216 | u32 nr_unprocessable_samples; | ||
| 217 | }; | ||
| 218 | |||
| 193 | struct attr_event { | 219 | struct attr_event { |
| 194 | struct perf_event_header header; | 220 | struct perf_event_header header; |
| 195 | struct perf_event_attr attr; | 221 | struct perf_event_attr attr; |
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 8c9c70e18cbb..04a46e32f42f 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
| @@ -23,32 +23,6 @@ enum hist_filter { | |||
| 23 | HIST_FILTER__HOST, | 23 | HIST_FILTER__HOST, |
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | /* | ||
| 27 | * The kernel collects the number of events it couldn't send in a stretch and | ||
| 28 | * when possible sends this number in a PERF_RECORD_LOST event. The number of | ||
| 29 | * such "chunks" of lost events is stored in .nr_events[PERF_EVENT_LOST] while | ||
| 30 | * total_lost tells exactly how many events the kernel in fact lost, i.e. it is | ||
| 31 | * the sum of all struct lost_event.lost fields reported. | ||
| 32 | * | ||
| 33 | * The total_period is needed because by default auto-freq is used, so | ||
| 34 | * multipling nr_events[PERF_EVENT_SAMPLE] by a frequency isn't possible to get | ||
| 35 | * the total number of low level events, it is necessary to to sum all struct | ||
| 36 | * sample_event.period and stash the result in total_period. | ||
| 37 | */ | ||
| 38 | struct events_stats { | ||
| 39 | u64 total_period; | ||
| 40 | u64 total_non_filtered_period; | ||
| 41 | u64 total_lost; | ||
| 42 | u64 total_invalid_chains; | ||
| 43 | u32 nr_events[PERF_RECORD_HEADER_MAX]; | ||
| 44 | u32 nr_non_filtered_samples; | ||
| 45 | u32 nr_lost_warned; | ||
| 46 | u32 nr_unknown_events; | ||
| 47 | u32 nr_invalid_chains; | ||
| 48 | u32 nr_unknown_id; | ||
| 49 | u32 nr_unprocessable_samples; | ||
| 50 | }; | ||
| 51 | |||
| 52 | enum hist_column { | 26 | enum hist_column { |
| 53 | HISTC_SYMBOL, | 27 | HISTC_SYMBOL, |
| 54 | HISTC_DSO, | 28 | HISTC_DSO, |
