aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-04-22 01:49:31 -0400
committerJiri Olsa <jolsa@kernel.org>2014-04-24 10:34:09 -0400
commit268397cb2a47ce6e1c0298d9de1762143867f9d3 (patch)
treeb39dca9aa7407b1ec49bf81467e0d90ea4ba0d73 /tools/perf/util/hist.h
parent112f761fc0b43def377af889f8cd242df6af9e34 (diff)
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/hist.h')
-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);
129void hists__filter_by_thread(struct hists *hists); 129void hists__filter_by_thread(struct hists *hists);
130void hists__filter_by_symbol(struct hists *hists); 130void hists__filter_by_symbol(struct hists *hists);
131 131
132static inline bool hists__has_filter(struct hists *hists)
133{
134 return hists->thread_filter || hists->dso_filter ||
135 hists->symbol_filter_str;
136}
137
132u16 hists__col_len(struct hists *hists, enum hist_column col); 138u16 hists__col_len(struct hists *hists, enum hist_column col);
133void hists__set_col_len(struct hists *hists, enum hist_column col, u16 len); 139void hists__set_col_len(struct hists *hists, enum hist_column col, u16 len);
134bool hists__new_col_len(struct hists *hists, enum hist_column col, u16 len); 140bool hists__new_col_len(struct hists *hists, enum hist_column col, u16 len);