diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-09 15:07:01 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-09 17:32:32 -0400 |
commit | 3ceb0d4438876a65606c258e5d69e03e57460dd6 (patch) | |
tree | cfc37034c00e7806c8bbae99d2dbf9e0f4982d87 /tools | |
parent | 28e2a106d16046ca792722795f809e3f80a5af80 (diff) |
perf symbols: Consider unresolved DSOs in the dso__col_widt calculation
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 <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')
-rw-r--r-- | tools/perf/util/event.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, | |||
676 | dso__calc_col_width(al->map->dso); | 676 | dso__calc_col_width(al->map->dso); |
677 | 677 | ||
678 | al->sym = map__find_symbol(al->map, al->addr, filter); | 678 | al->sym = map__find_symbol(al->map, al->addr, filter); |
679 | } else { | ||
680 | const unsigned int unresolved_col_width = BITS_PER_LONG / 4; | ||
681 | |||
682 | if (dsos__col_width < unresolved_col_width && | ||
683 | !symbol_conf.col_width_list_str && !symbol_conf.field_sep && | ||
684 | !symbol_conf.dso_list) | ||
685 | dsos__col_width = unresolved_col_width; | ||
679 | } | 686 | } |
680 | 687 | ||
681 | if (symbol_conf.sym_list && al->sym && | 688 | if (symbol_conf.sym_list && al->sym && |