diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-10 14:46:05 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-10 14:53:07 -0400 |
| commit | 4318bcb70ecc567dd0414d87fcd7e926ce956aab (patch) | |
| tree | 0e5afc874bc2673f8b4b3100885a4209461820e0 /tools | |
| parent | c2329ade22844054f4dce79fb9358d8f9f0421a5 (diff) | |
perf tools: Move events_stats struct to event.h
This is the only bit of hist.h that session.[ch] will end up using, so
move it out of hist.h to make that abundantly clear.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-l9ftsl21ggw0c1g2ig87otmd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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, |
