summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-04 20:58:51 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-05 09:49:48 -0300
commit9890948d857c2120c234b0ca91a80416e8f747fb (patch)
treeb3ac857ff1b3dc2248db23eb93b8a14e5e0f2d4d /tools/perf/util/event.c
parentc4f3b5a2d70eae4abb8bcaaf8dc3f067ff1714e8 (diff)
downloadlinux-9890948d857c2120c234b0ca91a80416e8f747fb.tar.gz
linux-9890948d857c2120c234b0ca91a80416e8f747fb.tar.bz2
linux-9890948d857c2120c234b0ca91a80416e8f747fb.zip
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.c6
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)
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;
}