[lkml]   [2014]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 13/17] 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 <>
tools/perf/ui/browsers/hists.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 5c85240aec18..2771b7aa84dd 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -783,10 +783,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);

 \ /
  Last update: 2014-04-16 05:21    [W:0.129 / U:3.364 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site