summaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-04-22 14:49:31 +0900
committerJiri Olsa <jolsa@kernel.org>2014-04-24 16:34:09 +0200
commit268397cb2a47ce6e1c0298d9de1762143867f9d3 (patch)
treeb39dca9aa7407b1ec49bf81467e0d90ea4ba0d73 /tools/perf/util
parent112f761fc0b43def377af889f8cd242df6af9e34 (diff)
downloadblackbird-op-linux-268397cb2a47ce6e1c0298d9de1762143867f9d3.tar.gz
blackbird-op-linux-268397cb2a47ce6e1c0298d9de1762143867f9d3.zip
perf top/tui: Update nr_entries properly after a filter is applied
The hist_browser__reset() is only called right after a filter is applied so it needs to udpate browser->nr_entries properly. We cannot use hists->nr_non_filtered_entreis directly since it's possible that such entries are also filtered out by minimum percentage limit. In addition when a filter is used for perf top, hist browser's nr_entries field was not updated after applying the filter. But it needs to be updated as new samples are coming. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1398327843-31845-11-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/hist.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index ef1ad7a948c0..38c3e874c164 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -129,6 +129,12 @@ void hists__filter_by_dso(struct hists *hists);
void hists__filter_by_thread(struct hists *hists);
void hists__filter_by_symbol(struct hists *hists);
+static inline bool hists__has_filter(struct hists *hists)
+{
+ return hists->thread_filter || hists->dso_filter ||
+ hists->symbol_filter_str;
+}
+
u16 hists__col_len(struct hists *hists, enum hist_column col);
void hists__set_col_len(struct hists *hists, enum hist_column col, u16 len);
bool hists__new_col_len(struct hists *hists, enum hist_column col, u16 len);
OpenPOWER on IntegriCloud