diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-04 20:58:51 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-05 09:49:48 -0300 |
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 2477270c1d3..23d5dfd4ed7 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) if (!symbol_conf.col_width_list_str && !symbol_conf.field_sep && (!symbol_conf.dso_list || strlist__has_entry(symbol_conf.dso_list, self->name))) { - unsigned int slen = strlen(self->name); - if (slen > dsos__col_width) + u16 slen = self->short_name_len; + if (verbose) + slen = self->long_name_len; + if (dsos__col_width < slen) dsos__col_width = slen; } |