Prev: [GIT PULL 0/4] perf fixes and improvements
Next: [PATCH 3/4] perf list: Add explanation about raw hardware event descriptors
From: Arnaldo Carvalho de Melo on 5 May 2010 10:40 From: Arnaldo Carvalho de Melo <acme(a)redhat.com> 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(a)gmail.com> Cc: Mike Galbraith <efault(a)gmx.de> Cc: Paul Mackerras <paulus(a)samba.org> Cc: Peter Zijlstra <a.p.zijlstra(a)chello.nl> Cc: Tom Zanussi <tzanussi(a)gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com> --- 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 2477270..23d5dfd 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; } -- 1.6.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |