summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-04-16 11:16:33 +0900
committerJiri Olsa <jolsa@kernel.org>2014-05-21 11:45:36 +0200
commitc0f1527b7e004f9a91e488f05c251213d16ad7ac (patch)
treea4e9a4d750720038c7a0bf31183e6ee86384b0c8 /tools
parent202e7a6d16127323d03e912d7844aa0d614c315e (diff)
downloadop-kernel-dev-c0f1527b7e004f9a91e488f05c251213d16ad7ac.zip
op-kernel-dev-c0f1527b7e004f9a91e488f05c251213d16ad7ac.tar.gz
perf report/tui: Fix a bug when --fields/sort is given
The hists__filter_entries() function is called when down arrow key is pressed for navigating through the entries in TUI. It has a check for filtering out entries that have very small overhead (under min_pcnt). However it just assumed the entries are sorted by the overhead so when it saw such a small overheaded entry, it just stopped navigating as an optimization. But it's not true anymore due to new --fields and --sort optoin behavior and this case users cannot go down to a next entry if ther's an entry with small overhead in-between. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1400480762-22852-14-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/ui/browsers/hists.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 92d128f..169224c 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -812,10 +812,7 @@ static struct rb_node *hists__filter_entries(struct rb_node *nd,
if (total)
percent = h->stat.period * 100.0 / total;
- if (percent < min_pcnt)
- return NULL;
-
- if (!h->filtered)
+ if (!h->filtered && percent >= min_pcnt)
return nd;
nd = rb_next(nd);
OpenPOWER on IntegriCloud