Skip to content

Commit

Permalink
perf symbols: Consider unresolved DSOs in the dso__col_widt calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo committed May 9, 2010
1 parent 28e2a10 commit 3ceb0d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/perf/util/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 3ceb0d4

Please sign in to comment.