linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Scrolling down broken with "perf top --hierarchy"
Date: Fri, 7 Oct 2016 10:17:53 +0900	[thread overview]
Message-ID: <20161007011753.GA31113@sejong> (raw)
In-Reply-To: <20161006163333.GC308@x4>

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

  reply	other threads:[~2016-10-07  1:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 16:33 Scrolling down broken with "perf top --hierarchy" Markus Trippelsdorf
2016-10-07  1:17 ` Namhyung Kim [this message]
2016-10-07  3:51   ` Markus Trippelsdorf
2016-10-07  4:22     ` Namhyung Kim
2016-10-07  4:32       ` Markus Trippelsdorf
2016-10-07  4:53         ` Namhyung Kim
2016-10-07 14:35           ` Arnaldo Carvalho de Melo
2016-10-24  5:11             ` Namhyung Kim
2016-10-24 10:10               ` Taeung Song
2016-10-24 16:37                 ` Namhyung Kim
2016-10-27  0:45                   ` Taeung Song
2016-10-07  4:56         ` Markus Trippelsdorf
2016-10-07  5:09           ` Markus Trippelsdorf
2016-10-08 11:21             ` Markus Trippelsdorf
2016-10-10 17:54               ` Markus Trippelsdorf
2016-10-24  4:55                 ` Namhyung Kim
2016-10-24  5:53                   ` Markus Trippelsdorf
2016-10-24  6:02                     ` Namhyung Kim
2016-10-24  6:04                       ` Markus Trippelsdorf
2016-10-24  6:14                         ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161007011753.GA31113@sejong \
    --to=namhyung@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus@trippelsdorf.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).