diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-03-05 19:40:06 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-03-06 11:13:40 -0500 |
commit | e248de331a452f8771eda6ed4bb30d92c82df28b (patch) | |
tree | 7ef04743a7bf7a1da354a3b82536ef32504823d9 /tools/perf/util/hist.h | |
parent | 3d3b5e95997208067c963923db90ed1517565d14 (diff) |
perf tools: Improve support for sessions with multiple events
By creating an perf_evlist out of the attributes in the perf.data file
header, so that we can use evlists and evsels when reading recorded
sessions in addition to when we record sessions.
More work is needed to allow tools to allow the user to select which
events are wanted when browsing sessions, be it just one or a subset of
them, aggregated or showed at the same time but with different
indications on the UI to allow seeing workloads thru different views at
the same time.
But the overall goal/trend is to more uniformly use evsels and evlists.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r-- | tools/perf/util/hist.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 37c79089de09..0d38b435827b 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
@@ -42,13 +42,10 @@ enum hist_column { | |||
42 | }; | 42 | }; |
43 | 43 | ||
44 | struct hists { | 44 | struct hists { |
45 | struct rb_node rb_node; | ||
46 | struct rb_root entries; | 45 | struct rb_root entries; |
47 | u64 nr_entries; | 46 | u64 nr_entries; |
48 | struct events_stats stats; | 47 | struct events_stats stats; |
49 | u64 config; | ||
50 | u64 event_stream; | 48 | u64 event_stream; |
51 | u32 type; | ||
52 | u16 col_len[HISTC_NR_COLS]; | 49 | u16 col_len[HISTC_NR_COLS]; |
53 | /* Best would be to reuse the session callchain cursor */ | 50 | /* Best would be to reuse the session callchain cursor */ |
54 | struct callchain_cursor callchain_cursor; | 51 | struct callchain_cursor callchain_cursor; |
@@ -87,6 +84,8 @@ u16 hists__col_len(struct hists *self, enum hist_column col); | |||
87 | void hists__set_col_len(struct hists *self, enum hist_column col, u16 len); | 84 | void hists__set_col_len(struct hists *self, enum hist_column col, u16 len); |
88 | bool hists__new_col_len(struct hists *self, enum hist_column col, u16 len); | 85 | bool hists__new_col_len(struct hists *self, enum hist_column col, u16 len); |
89 | 86 | ||
87 | struct perf_evlist; | ||
88 | |||
90 | #ifdef NO_NEWT_SUPPORT | 89 | #ifdef NO_NEWT_SUPPORT |
91 | static inline int hists__browse(struct hists *self __used, | 90 | static inline int hists__browse(struct hists *self __used, |
92 | const char *helpline __used, | 91 | const char *helpline __used, |
@@ -95,9 +94,8 @@ static inline int hists__browse(struct hists *self __used, | |||
95 | return 0; | 94 | return 0; |
96 | } | 95 | } |
97 | 96 | ||
98 | static inline int hists__tui_browse_tree(struct rb_root *self __used, | 97 | static inline int hists__tui_browse_tree(struct perf_evlist *evlist __used, |
99 | const char *help __used, | 98 | const char *help __used) |
100 | int evidx __used) | ||
101 | { | 99 | { |
102 | return 0; | 100 | return 0; |
103 | } | 101 | } |
@@ -118,7 +116,7 @@ int hist_entry__tui_annotate(struct hist_entry *self, int evidx); | |||
118 | #define KEY_LEFT NEWT_KEY_LEFT | 116 | #define KEY_LEFT NEWT_KEY_LEFT |
119 | #define KEY_RIGHT NEWT_KEY_RIGHT | 117 | #define KEY_RIGHT NEWT_KEY_RIGHT |
120 | 118 | ||
121 | int hists__tui_browse_tree(struct rb_root *self, const char *help, int evidx); | 119 | int hists__tui_browse_tree(struct perf_evlist *evlist, const char *help); |
122 | #endif | 120 | #endif |
123 | 121 | ||
124 | unsigned int hists__sort_list_width(struct hists *self); | 122 | unsigned int hists__sort_list_width(struct hists *self); |