From: Arnaldo Carvalho de Melo Date: Thu, 1 Sep 2011 15:57:19 +0000 (-0300) Subject: perf top browser: Fix up line width calculation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eb489008312c848dce8ff76282b8e65c530c2e26;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-dkiakcl3z69dh1bt9uegaktv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/ui/browsers/top.c b/tools/perf/util/ui/browsers/top.c index 88403cf8396..9d938106510 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 if (top->evlist->nr_entries == 1 || !top->display_weighted) { slsmg_printf("%20.2f ", syme->weight); - width -= 24; + width -= 21; } else { slsmg_printf("%9.1f %10ld ", syme->weight, syme->snap_count); - width -= 23; + width -= 20; } slsmg_printf("%4.1f%%", pcnt);