linux/tools/perf
Arnaldo Carvalho de Melo 52d422de22 perf report: Adjust column width to the values sampled
Auto-adjust column width of perf report output to the
longest occuring string length.

Example:

[acme@doppio pahole]$  perf report --sort comm,dso,symbol | head -13

    12.79%   pahole  /usr/lib64/libdw-0.141.so    [.] __libdw_find_attr
     8.90%   pahole  /lib64/libc-2.10.1.so        [.] _int_malloc
     8.68%   pahole  /usr/lib64/libdw-0.141.so    [.] __libdw_form_val_len
     8.15%   pahole  /lib64/libc-2.10.1.so        [.] __GI_strcmp
     6.80%   pahole  /lib64/libc-2.10.1.so        [.] __tsearch
     5.54%   pahole  ./build/libdwarves.so.1.0.0  [.] tag__recode_dwarf_type
[acme@doppio pahole]$

[acme@doppio pahole]$  perf report --sort comm,dso,symbol -d /lib64/libc-2.10.1.so | head -10

    21.92%   pahole  /lib64/libc-2.10.1.so  [.] _int_malloc
    20.08%   pahole  /lib64/libc-2.10.1.so  [.] __GI_strcmp
    16.75%   pahole  /lib64/libc-2.10.1.so  [.] __tsearch
[acme@doppio pahole]$

Also add these extra options to control the new behaviour:

  -w, --field-width

Force each column width to the provided list, for large terminal
readability.

  -t, --field-separator:

Use a special separator character and don't pad with spaces, replacing
all occurances of this separator in symbol names (and other output) with
a '.' character, that thus it's the only non valid separator.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20090711014728.GH3452@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-07-11 10:24:11 +02:00
..
Documentation perf report: Adjust column width to the values sampled 2009-07-11 10:24:11 +02:00
util perf report: Adjust column width to the values sampled 2009-07-11 10:24:11 +02:00
.gitignore perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
Makefile perf_counter tools: Add infrastructure to support loading of kernel module symbols 2009-07-02 08:42:20 +02:00
builtin-annotate.c perf_counter tools: Provide helper to print percents color 2009-07-02 21:38:37 +02:00
builtin-help.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
builtin-list.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
builtin-record.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
builtin-report.c perf report: Adjust column width to the values sampled 2009-07-11 10:24:11 +02:00
builtin-stat.c perf stat: Handle pipe read failures in perf stat 2009-07-01 22:37:24 +02:00
builtin-top.c perf_counter tools: Provide helper to print percents color 2009-07-02 21:38:37 +02:00
builtin.h perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
command-list.txt perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
design.txt perf_counter: Start documenting HAVE_PERF_COUNTERS requirements 2009-06-12 19:37:30 +02:00
perf.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
perf.h perf_counter: Add P6 PMU support 2009-07-10 10:28:26 +02:00