From 3ceb0d4438876a65606c258e5d69e03e57460dd6 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Sun, 9 May 2010 16:07:01 -0300 Subject: [PATCH] perf symbols: Consider unresolved DSOs in the dso__col_widt calculation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit By using BITS_PER_LONG / 4, that is the number of chars that will be used in such cases as the DSO "name". 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 --- tools/perf/util/event.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 23d5dfd4ed73..46563e16c3f5 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -676,6 +676,13 @@ int event__preprocess_sample(const event_t *self, struct perf_session *session, dso__calc_col_width(al->map->dso); al->sym = map__find_symbol(al->map, al->addr, filter); + } else { + const unsigned int unresolved_col_width = BITS_PER_LONG / 4; + + if (dsos__col_width < unresolved_col_width && + !symbol_conf.col_width_list_str && !symbol_conf.field_sep && + !symbol_conf.dso_list) + dsos__col_width = unresolved_col_width; } if (symbol_conf.sym_list && al->sym && -- 2.20.1