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


Groups > linux.kernel > #1278904 > unrolled thread

[PATCH 3/3] perf hists browser: Update nr entries regardless of min percent

Started byNamhyung Kim <namhyung@kernel.org>
First post2015-11-27 18:40 +0100
Last post2015-11-29 09:00 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/3] perf hists browser: Update nr entries regardless of min percent Namhyung Kim <namhyung@kernel.org> - 2015-11-27 18:40 +0100
    Re: [PATCH 3/3] perf hists browser: Update nr entries regardless of  min percent Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-28 02:00 +0100
    [tip:perf/core] perf hists browser:   Update nr entries regardless of min percent tip-bot for Namhyung Kim <tipbot@zytor.com> - 2015-11-29 09:00 +0100

#1278904 — [PATCH 3/3] perf hists browser: Update nr entries regardless of min percent

FromNamhyung Kim <namhyung@kernel.org>
Date2015-11-27 18:40 +0100
Subject[PATCH 3/3] perf hists browser: Update nr entries regardless of min percent
Message-ID<qzva1-5TV-17@gated-at.bofh.it>
When perf report on TUI was called with -S symbol filter, it should
update nr entries even if min_pcnt is 0.  IIRC the reason was to update
nr entries after applying minimum percent threshold.  But if symbol
filter was given on command line (with -S option), it should use
hists->nr_non_filtered_entries instead of hists->nr_entries.

So this patch fixes a bug of navigating hists browser that the cursor
goes beyond the number of entries when -S (or similar) option is used.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/ui/browsers/hists.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index a211b7b6a81e..dcdcbafb078b 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2055,10 +2055,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 	SLang_reset_tty();
 	SLang_init_tty(0, 0, 0);
 
-	if (min_pcnt) {
+	if (min_pcnt)
 		browser->min_pcnt = min_pcnt;
-		hist_browser__update_nr_entries(browser);
-	}
+	hist_browser__update_nr_entries(browser);
 
 	browser->pstack = pstack__new(3);
 	if (browser->pstack == NULL)
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1279050 — Re: [PATCH 3/3] perf hists browser: Update nr entries regardless of min percent

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-11-28 02:00 +0100
SubjectRe: [PATCH 3/3] perf hists browser: Update nr entries regardless of min percent
Message-ID<qzC1Q-1Bx-11@gated-at.bofh.it>
In reply to#1278904
Em Sat, Nov 28, 2015 at 02:32:39AM +0900, Namhyung Kim escreveu:
> When perf report on TUI was called with -S symbol filter, it should
> update nr entries even if min_pcnt is 0.  IIRC the reason was to update
> nr entries after applying minimum percent threshold.  But if symbol
> filter was given on command line (with -S option), it should use
> hists->nr_non_filtered_entries instead of hists->nr_entries.
> 
> So this patch fixes a bug of navigating hists browser that the cursor
> goes beyond the number of entries when -S (or similar) option is used.

Thanks, tested and applied.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279281 — [tip:perf/core] perf hists browser: Update nr entries regardless of min percent

Fromtip-bot for Namhyung Kim <tipbot@zytor.com>
Date2015-11-29 09:00 +0100
Subject[tip:perf/core] perf hists browser: Update nr entries regardless of min percent
Message-ID<qA53P-3nY-1@gated-at.bofh.it>
In reply to#1278904
Commit-ID:  039050482573e168690d365b8ea1d4f599ebbbd8
Gitweb:     http://git.kernel.org/tip/039050482573e168690d365b8ea1d4f599ebbbd8
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Sat, 28 Nov 2015 02:32:39 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 27 Nov 2015 21:53:33 -0300

perf hists browser: Update nr entries regardless of min percent

When perf report on TUI was called with -S symbol filter, it should
update nr entries even if min_pcnt is 0.  IIRC the reason was to update
nr entries after applying minimum percent threshold.  But if symbol
filter was given on command line (with -S option), it should use
hists->nr_non_filtered_entries instead of hists->nr_entries.

So this patch fixes a bug of navigating hists browser that the cursor
goes beyond the number of entries when -S (or similar) option is used.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1448645559-31167-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/browsers/hists.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index a211b7b..dcdcbaf 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2055,10 +2055,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 	SLang_reset_tty();
 	SLang_init_tty(0, 0, 0);
 
-	if (min_pcnt) {
+	if (min_pcnt)
 		browser->min_pcnt = min_pcnt;
-		hist_browser__update_nr_entries(browser);
-	}
+	hist_browser__update_nr_entries(browser);
 
 	browser->pstack = pstack__new(3);
 	if (browser->pstack == NULL)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web