diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-10 12:57:51 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-10 18:49:08 -0400 |
commit | fefb0b94bbab858be0909a7eb5ef357e0f996a79 (patch) | |
tree | db46b10241ad338db05e9ee68bb0ee45954d7b8a /tools/perf/util/hist.h | |
parent | 1c02c4d2e92f2097f1bba63ec71560b0e05a7f36 (diff) |
perf hist: Calculate max_sym name len and nr_entries
Better done when we are adding entries, be it initially of when we're
re-sorting the histograms.
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/perf/util/hist.h')
-rw-r--r-- | tools/perf/util/hist.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index bdde81eca69f..1b18d04195dc 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
@@ -19,10 +19,12 @@ struct events_stats { | |||
19 | struct hists { | 19 | struct hists { |
20 | struct rb_node rb_node; | 20 | struct rb_node rb_node; |
21 | struct rb_root entries; | 21 | struct rb_root entries; |
22 | u64 nr_entries; | ||
22 | struct events_stats stats; | 23 | struct events_stats stats; |
23 | u64 config; | 24 | u64 config; |
24 | u64 event_stream; | 25 | u64 event_stream; |
25 | u32 type; | 26 | u32 type; |
27 | u32 max_sym_namelen; | ||
26 | }; | 28 | }; |
27 | 29 | ||
28 | struct hist_entry *__hists__add_entry(struct hists *self, | 30 | struct hist_entry *__hists__add_entry(struct hists *self, |
@@ -38,7 +40,7 @@ int hist_entry__snprintf(struct hist_entry *self, char *bf, size_t size, | |||
38 | long displacement, bool color, u64 total); | 40 | long displacement, bool color, u64 total); |
39 | void hist_entry__free(struct hist_entry *); | 41 | void hist_entry__free(struct hist_entry *); |
40 | 42 | ||
41 | u64 hists__output_resort(struct hists *self); | 43 | void hists__output_resort(struct hists *self); |
42 | void hists__collapse_resort(struct hists *self); | 44 | void hists__collapse_resort(struct hists *self); |
43 | size_t hists__fprintf(struct hists *self, struct hists *pair, | 45 | size_t hists__fprintf(struct hists *self, struct hists *pair, |
44 | bool show_displacement, FILE *fp); | 46 | bool show_displacement, FILE *fp); |