Skip to content

Commit

Permalink
perf top browser: Fix up line width calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo committed Sep 29, 2011
1 parent 7a6f205 commit eb48900
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/util/ui/browsers/top.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb48900

Please sign in to comment.