summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
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.c
parent82e0af8710ceed57a2233b9652a3878b103084d8 (diff)
downloadop-kernel-dev-d7b76f0935d294e9abaac1577cdc2137eff15a49.zip
op-kernel-dev-d7b76f0935d294e9abaac1577cdc2137eff15a49.tar.gz
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.c')
-rw-r--r--tools/perf/util/hist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 8d15e9f..fdff2a8 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1087,7 +1087,7 @@ static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *h
hists__calc_col_len(hists, h);
}
-void hists__filter_by_dso(struct hists *hists, const struct dso *dso)
+void hists__filter_by_dso(struct hists *hists)
{
struct rb_node *nd;
@@ -1101,7 +1101,8 @@ void hists__filter_by_dso(struct hists *hists, const struct dso *dso)
if (symbol_conf.exclude_other && !h->parent)
continue;
- if (dso != NULL && (h->ms.map == NULL || h->ms.map->dso != dso)) {
+ if (hists->dso_filter != NULL &&
+ (h->ms.map == NULL || h->ms.map->dso != hists->dso_filter)) {
h->filtered |= (1 << HIST_FILTER__DSO);
continue;
}
@@ -1110,7 +1111,7 @@ void hists__filter_by_dso(struct hists *hists, const struct dso *dso)
}
}
-void hists__filter_by_thread(struct hists *hists, const struct thread *thread)
+void hists__filter_by_thread(struct hists *hists)
{
struct rb_node *nd;
@@ -1121,7 +1122,8 @@ void hists__filter_by_thread(struct hists *hists, const struct thread *thread)
for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) {
struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);
- if (thread != NULL && h->thread != thread) {
+ if (hists->thread_filter != NULL &&
+ h->thread != hists->thread_filter) {
h->filtered |= (1 << HIST_FILTER__THREAD);
continue;
}
OpenPOWER on IntegriCloud