summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-10 13:57:51 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-10 19:49:08 -0300
commitfefb0b94bbab858be0909a7eb5ef357e0f996a79 (patch)
treedb46b10241ad338db05e9ee68bb0ee45954d7b8a /tools/perf/util/hist.h
parent1c02c4d2e92f2097f1bba63ec71560b0e05a7f36 (diff)
downloadblackbird-op-linux-fefb0b94bbab858be0909a7eb5ef357e0f996a79.tar.gz
blackbird-op-linux-fefb0b94bbab858be0909a7eb5ef357e0f996a79.zip
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.h4
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 {
struct hists {
struct rb_node rb_node;
struct rb_root entries;
+ u64 nr_entries;
struct events_stats stats;
u64 config;
u64 event_stream;
u32 type;
+ u32 max_sym_namelen;
};
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,
long displacement, bool color, u64 total);
void hist_entry__free(struct hist_entry *);
-u64 hists__output_resort(struct hists *self);
+void hists__output_resort(struct hists *self);
void hists__collapse_resort(struct hists *self);
size_t hists__fprintf(struct hists *self, struct hists *pair,
bool show_displacement, FILE *fp);
OpenPOWER on IntegriCloud