perf hists: Fix formatting of long symbol names
authorArnaldo Carvalho de Melo <[email protected]>
Thu, 5 Sep 2013 18:39:12 +0000 (15:39 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Thu, 5 Sep 2013 19:18:28 +0000 (16:18 -0300)
commit99cf666c5c0cd4f4c3e4155e7b01cf593d71d60e
tree5a0d8e427ba37dfb438062c2fa748bb5abad258d
parent98be6966ed7ed977881305aff5a1bfb305090f43
perf hists: Fix formatting of long symbol names

We had a hardcoded buffer for formatting histogram entries, truncating
long symbol names (C++ anyone?).

Fix it by using hists__sort_list_width() before formatting the first
histogram entry to calculate the max lenght needed by traversing the
overheads and columns lists (sort order).

Reported-by: Stephane Eranian <[email protected]>
Tested-by: Stephane Eranian <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/ui/stdio/hist.c