summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-10-18 19:07:34 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-10-19 09:28:19 -0200
commitd7b76f0935d294e9abaac1577cdc2137eff15a49 (patch)
treef5775c52f68db3490961eced7a9e8e8ede28f969 /tools/perf/util/hist.h
parent82e0af8710ceed57a2233b9652a3878b103084d8 (diff)
downloadlinux-d7b76f0935d294e9abaac1577cdc2137eff15a49.tar.bz2
perf hists: Move the dso and thread filters from hist_browser
Since with dynamic addition of new hist entries we need to apply those filters as we merge new batches of hist_entry instances, for instance in perf top. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> 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-zjhhf8kh9w1buty9p10od6rz@git.kernel.org 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.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index f338cb025671..575bcbc41355 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -43,12 +43,17 @@ enum hist_column {
HISTC_NR_COLS, /* Last entry */
};
+struct thread;
+struct dso;
+
struct hists {
struct rb_root entries_in_array[2];
struct rb_root *entries_in;
struct rb_root entries;
struct rb_root entries_collapsed;
u64 nr_entries;
+ const struct thread *thread_filter;
+ const struct dso *dso_filter;
pthread_mutex_t lock;
struct events_stats stats;
u64 event_stream;
@@ -91,8 +96,8 @@ size_t hists__fprintf(struct hists *self, struct hists *pair,
int hist_entry__inc_addr_samples(struct hist_entry *self, int evidx, u64 addr);
int hist_entry__annotate(struct hist_entry *self, size_t privsize);
-void hists__filter_by_dso(struct hists *self, const struct dso *dso);
-void hists__filter_by_thread(struct hists *self, const struct thread *thread);
+void hists__filter_by_dso(struct hists *hists);
+void hists__filter_by_thread(struct hists *hists);
u16 hists__col_len(struct hists *self, enum hist_column col);
void hists__set_col_len(struct hists *self, enum hist_column col, u16 len);