perf hist: Introduce hists class and move lots of methods to it
[deliverable/linux.git] / tools / perf / util / hist.h
CommitLineData
3d1d07ec
JK
1#ifndef __PERF_HIST_H
2#define __PERF_HIST_H
3d1d07ec 3
4e4f06e4 4#include <linux/types.h>
3d1d07ec 5#include "callchain.h"
3d1d07ec 6
3d1d07ec 7extern struct callchain_param callchain_param;
3d1d07ec 8
4e4f06e4
ACM
9struct hist_entry;
10struct addr_location;
11struct symbol;
d403d0ac 12struct rb_root;
4e4f06e4 13
1c02c4d2
ACM
14struct events_stats {
15 u64 total;
16 u64 lost;
17};
18
19struct hists {
20 struct rb_node rb_node;
21 struct rb_root entries;
22 struct events_stats stats;
23 u64 config;
24 u64 event_stream;
25 u32 type;
26};
27
28struct hist_entry *__hists__add_entry(struct hists *self,
29 struct addr_location *al,
30 struct symbol *parent, u64 count);
3d1d07ec
JK
31extern int64_t hist_entry__cmp(struct hist_entry *, struct hist_entry *);
32extern int64_t hist_entry__collapse(struct hist_entry *, struct hist_entry *);
1c02c4d2
ACM
33int hist_entry__fprintf(struct hist_entry *self, struct hists *pair_hists,
34 bool show_displacement, long displacement, FILE *fp,
35 u64 total);
36int hist_entry__snprintf(struct hist_entry *self, char *bf, size_t size,
37 struct hists *pair_hists, bool show_displacement,
38 long displacement, bool color, u64 total);
4e4f06e4
ACM
39void hist_entry__free(struct hist_entry *);
40
1c02c4d2
ACM
41u64 hists__output_resort(struct hists *self);
42void hists__collapse_resort(struct hists *self);
43size_t hists__fprintf(struct hists *self, struct hists *pair,
44 bool show_displacement, FILE *fp);
3d1d07ec 45#endif /* __PERF_HIST_H */
This page took 0.052695 seconds and 5 git commands to generate.