diff options
author | Namhyung Kim <namhyung@kernel.org> | 2016-11-08 08:08:31 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-11-09 09:30:47 -0500 |
commit | 131d51eb1d17aac3a604cf929fd99ff4dd34f495 (patch) | |
tree | f98376ebf82c2b981b44aed3555e904611af94ae | |
parent | 3d9f4683929a968dc9b9493f4e608b109ad292a2 (diff) |
perf hists browser: Show folded sign properly on --hierarchy
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>
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 8 |
1 files changed, 7 insertions, 1 deletions
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, | |||
1381 | } | 1381 | } |
1382 | 1382 | ||
1383 | perf_hpp_list__for_each_format(entry->hpp_list, fmt) { | 1383 | perf_hpp_list__for_each_format(entry->hpp_list, fmt) { |
1384 | ui_browser__write_nstring(&browser->b, "", 2); | 1384 | if (first) { |
1385 | ui_browser__printf(&browser->b, "%c ", folded_sign); | ||
1386 | first = false; | ||
1387 | } else { | ||
1388 | ui_browser__write_nstring(&browser->b, "", 2); | ||
1389 | } | ||
1390 | |||
1385 | width -= 2; | 1391 | width -= 2; |
1386 | 1392 | ||
1387 | /* | 1393 | /* |