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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c4f3b5a2
...@@ -626,8 +626,10 @@ static void dso__calc_col_width(struct dso *self) ...@@ -626,8 +626,10 @@ static void dso__calc_col_width(struct dso *self)
if (!symbol_conf.col_width_list_str && !symbol_conf.field_sep && if (!symbol_conf.col_width_list_str && !symbol_conf.field_sep &&
(!symbol_conf.dso_list || (!symbol_conf.dso_list ||
strlist__has_entry(symbol_conf.dso_list, self->name))) { strlist__has_entry(symbol_conf.dso_list, self->name))) {
unsigned int slen = strlen(self->name); u16 slen = self->short_name_len;
if (slen > dsos__col_width) if (verbose)
slen = self->long_name_len;
if (dsos__col_width < slen)
dsos__col_width = slen; dsos__col_width = slen;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment