Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1519869
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/5] perf hists browser: Show folded sign properly on --hierarchy |
| Date | 2016-11-11 17:00 +0100 |
| Message-ID | <sCmpb-6c5-13@gated-at.bofh.it> (permalink) |
| References | <sCmpb-6c5-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Namhyung Kim <namhyung@kernel.org>
When horizontal scrolling is used in hierarchy mode, the folded signed
disappears at the right most column.
Committer note:
To test it, run 'perf top --hierarchy, see the '+' symbol at the first
column, then press the right arrow key, the '+' symbol will disappear,
this patch fixes that.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20161108130833.9263-3-namhyung@kernel.org
[ Move 'width -= 2' invariant to right after the if/else ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/browsers/hists.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 225ef2a15a13..e767fbd17ad2 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1381,7 +1381,13 @@ static int hist_browser__show_hierarchy_entry(struct hist_browser *browser,
}
perf_hpp_list__for_each_format(entry->hpp_list, fmt) {
- ui_browser__write_nstring(&browser->b, "", 2);
+ if (first) {
+ ui_browser__printf(&browser->b, "%c ", folded_sign);
+ first = false;
+ } else {
+ ui_browser__write_nstring(&browser->b, "", 2);
+ }
+
width -= 2;
/*
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 0/5] perf/urgent hists hierarchy fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-11 17:00 +0100 [PATCH 1/5] perf hist browser: Fix hierarchy column counts Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-11 17:00 +0100 [PATCH 4/5] perf hists browser: Fix column indentation on --hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-11 17:00 +0100 [PATCH 3/5] perf hists browser: Show folded sign properly on --hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-11 17:00 +0100 [PATCH 5/5] perf hists: Fix column length on --hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-11-11 17:00 +0100 Re: [GIT PULL 0/5] perf/urgent hists hierarchy fixes Ingo Molnar <mingo@kernel.org> - 2016-11-12 11:50 +0100
csiph-web