diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-03-04 12:51:33 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-03-05 20:31:04 -0500 |
commit | d7603d5122d9700fb8f36fa08b04f4e900fef059 (patch) | |
tree | 092dca7764059cbd85903c3a470e717732d3b9e8 /tools/perf/util/hist.c | |
parent | a03f35ceeb3d279da35c5a914ac01a4b1effb0a1 (diff) |
perf hists: Remove needless global col lenght calcs
To support multiple events we need to do these calcs per 'struct hists'
instance, and it turns out we already do that at:
__hists__add_entry
hists__inc_nr_entries
hists__calc_col_len
for all the unfiltered hist_entry instances we stash in the rb tree, so
trow away the dead code.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index da2899e8c6f8..f7ad6bdbc667 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -50,6 +50,15 @@ static void hists__calc_col_len(struct hists *self, struct hist_entry *h) | |||
50 | 50 | ||
51 | if (h->ms.sym) | 51 | if (h->ms.sym) |
52 | hists__new_col_len(self, HISTC_SYMBOL, h->ms.sym->namelen); | 52 | hists__new_col_len(self, HISTC_SYMBOL, h->ms.sym->namelen); |
53 | else { | ||
54 | const unsigned int unresolved_col_width = BITS_PER_LONG / 4; | ||
55 | |||
56 | if (hists__col_len(self, HISTC_DSO) < unresolved_col_width && | ||
57 | !symbol_conf.col_width_list_str && !symbol_conf.field_sep && | ||
58 | !symbol_conf.dso_list) | ||
59 | hists__set_col_len(self, HISTC_DSO, | ||
60 | unresolved_col_width); | ||
61 | } | ||
53 | 62 | ||
54 | len = thread__comm_len(h->thread); | 63 | len = thread__comm_len(h->thread); |
55 | if (hists__new_col_len(self, HISTC_COMM, len)) | 64 | if (hists__new_col_len(self, HISTC_COMM, len)) |