diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-04 19:58:51 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-05 08:49:48 -0400 |
commit | 9890948d857c2120c234b0ca91a80416e8f747fb (patch) | |
tree | b3ac857ff1b3dc2248db23eb93b8a14e5e0f2d4d /tools/perf/util/event.c | |
parent | c4f3b5a2d70eae4abb8bcaaf8dc3f067ff1714e8 (diff) |
perf report: Make dso__calc_col_width agree with hist_entry__dso_snprintf
The first was always using the ->long_name, while the later used
->short_name if verbose was not set, resulting in the dso column to be
much wider than needed most of the time.
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 2477270c1d3f..23d5dfd4ed73 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -626,8 +626,10 @@ static void dso__calc_col_width(struct dso *self) | |||
626 | if (!symbol_conf.col_width_list_str && !symbol_conf.field_sep && | 626 | if (!symbol_conf.col_width_list_str && !symbol_conf.field_sep && |
627 | (!symbol_conf.dso_list || | 627 | (!symbol_conf.dso_list || |
628 | strlist__has_entry(symbol_conf.dso_list, self->name))) { | 628 | strlist__has_entry(symbol_conf.dso_list, self->name))) { |
629 | unsigned int slen = strlen(self->name); | 629 | u16 slen = self->short_name_len; |
630 | if (slen > dsos__col_width) | 630 | if (verbose) |
631 | slen = self->long_name_len; | ||
632 | if (dsos__col_width < slen) | ||
631 | dsos__col_width = slen; | 633 | dsos__col_width = slen; |
632 | } | 634 | } |
633 | 635 | ||