From: Arnaldo Carvalho de Melo Date: Tue, 4 May 2010 23:58:51 +0000 (-0300) Subject: perf report: Make dso__calc_col_width agree with hist_entry__dso_snprintf X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9890948d857c2120c234b0ca91a80416e8f747fb;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- 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; }