diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-09-01 11:57:19 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-09-29 15:41:37 -0400 |
commit | eb489008312c848dce8ff76282b8e65c530c2e26 (patch) | |
tree | ada7ff5f45dc9387d5cdf3df00333dc61ad158d6 /tools/perf | |
parent | 7a6f205d623afaf05aee387aa6bc57fa43421061 (diff) |
perf top browser: Fix up line width calculation
Fixing an artifact where the last 3 chars of a long DSO name would
remain on the screen sometimes.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-dkiakcl3z69dh1bt9uegaktv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/ui/browsers/top.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/ui/browsers/top.c b/tools/perf/util/ui/browsers/top.c index 88403cf8396a..9d938106510f 100644 --- a/tools/perf/util/ui/browsers/top.c +++ b/tools/perf/util/ui/browsers/top.c | |||
@@ -43,10 +43,10 @@ static void perf_top_browser__write(struct ui_browser *browser, void *entry, int | |||
43 | 43 | ||
44 | if (top->evlist->nr_entries == 1 || !top->display_weighted) { | 44 | if (top->evlist->nr_entries == 1 || !top->display_weighted) { |
45 | slsmg_printf("%20.2f ", syme->weight); | 45 | slsmg_printf("%20.2f ", syme->weight); |
46 | width -= 24; | 46 | width -= 21; |
47 | } else { | 47 | } else { |
48 | slsmg_printf("%9.1f %10ld ", syme->weight, syme->snap_count); | 48 | slsmg_printf("%9.1f %10ld ", syme->weight, syme->snap_count); |
49 | width -= 23; | 49 | width -= 20; |
50 | } | 50 | } |
51 | 51 | ||
52 | slsmg_printf("%4.1f%%", pcnt); | 52 | slsmg_printf("%4.1f%%", pcnt); |