Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496958

Re: Scrolling down broken with "perf top --hierarchy"

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject Re: Scrolling down broken with "perf top --hierarchy"
Date 2016-10-07 03:20 +0200
Message-ID <sprZn-Id-3@gated-at.bofh.it> (permalink)
References <spjSa-2Un-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Markus,

On Thu, Oct 06, 2016 at 06:33:33PM +0200, Markus Trippelsdorf wrote:
> Scrolling down is broken when using "perf top --hierarchy".
> When it starts up everything is OK and one can scroll up and down to all
> entries. But as further and further new entries get added to the list,
> scrolling down is blocked (at the position of the last entry that was
> shown directly after startup).

I think below patch will fix the problem.  Please check.



From 38ef0f20e6b787fcdab265307ac679cfac6dd0ff Mon Sep 17 00:00:00 2001
From: Namhyung Kim <namhyung@kernel.org>
Date: Fri, 7 Oct 2016 10:09:42 +0900
Subject: [PATCH] perf top: Fix refreshing hierarchy entries on TUI

Markus reported that perf top --hierarch cannot scroll down after
refresh.  This was because the number of entries are not updated when
hierarchy is enabled.

Unlike normal report view, hierarchy mode needs to keep its own entry
count since it can have non-leaf entries which can expand/collapse.

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/ui/browsers/hists.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index fb8e42c7507a..4ffff7be9299 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -601,7 +601,8 @@ int hist_browser__run(struct hist_browser *browser, const char *help)
 			u64 nr_entries;
 			hbt->timer(hbt->arg);
 
-			if (hist_browser__has_filter(browser))
+			if (hist_browser__has_filter(browser) ||
+			    symbol_conf.report_hierarchy)
 				hist_browser__update_nr_entries(browser);
 
 			nr_entries = hist_browser__nr_entries(browser);
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Scrolling down broken with "perf top --hierarchy" Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-10-06 18:40 +0200
  Re: Scrolling down broken with "perf top --hierarchy" Namhyung Kim <namhyung@kernel.org> - 2016-10-07 03:20 +0200
    Re: Scrolling down broken with "perf top --hierarchy" Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-10-07 06:00 +0200
      Re: Scrolling down broken with "perf top --hierarchy" Namhyung Kim <namhyung@kernel.org> - 2016-10-07 06:30 +0200
        Re: Scrolling down broken with "perf top --hierarchy" Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-10-07 06:40 +0200
          Re: Scrolling down broken with "perf top --hierarchy" Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-10-07 07:00 +0200
            Re: Scrolling down broken with "perf top --hierarchy" Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-10-07 07:10 +0200
              Re: Scrolling down broken with "perf top --hierarchy" Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-10-08 13:30 +0200
                Re: Scrolling down broken with "perf top --hierarchy" Markus Trippelsdorf <markus@trippelsdorf.de> - 2016-10-10 20:00 +0200
          Re: Scrolling down broken with "perf top --hierarchy" Namhyung Kim <namhyung@kernel.org> - 2016-10-07 07:00 +0200
            Re: Scrolling down broken with "perf top --hierarchy" Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-07 16:40 +0200

csiph-web