blob: 16f360cce5bfff0e56c7096e418bc38949652d58 [file] [log] [blame]
John Kacur3d1d07e2009-09-28 15:32:55 +02001#ifndef __PERF_HIST_H
2#define __PERF_HIST_H
John Kacur3d1d07e2009-09-28 15:32:55 +02003
Arnaldo Carvalho de Melo4e4f06e2009-12-14 13:10:39 -02004#include <linux/types.h>
John Kacur3d1d07e2009-09-28 15:32:55 +02005#include "callchain.h"
John Kacur3d1d07e2009-09-28 15:32:55 +02006
John Kacur3d1d07e2009-09-28 15:32:55 +02007extern struct callchain_param callchain_param;
John Kacur3d1d07e2009-09-28 15:32:55 +02008
Arnaldo Carvalho de Melo4e4f06e2009-12-14 13:10:39 -02009struct perf_session;
10struct hist_entry;
11struct addr_location;
12struct symbol;
Eric B Munsond403d0a2010-03-05 12:51:06 -030013struct rb_root;
Arnaldo Carvalho de Melo4e4f06e2009-12-14 13:10:39 -020014
Eric B Munsond403d0a2010-03-05 12:51:06 -030015struct hist_entry *__perf_session__add_hist_entry(struct rb_root *hists,
Arnaldo Carvalho de Melo4e4f06e2009-12-14 13:10:39 -020016 struct addr_location *al,
17 struct symbol *parent,
18 u64 count, bool *hit);
John Kacur3d1d07e2009-09-28 15:32:55 +020019extern int64_t hist_entry__cmp(struct hist_entry *, struct hist_entry *);
20extern int64_t hist_entry__collapse(struct hist_entry *, struct hist_entry *);
Arnaldo Carvalho de Melo4e4f06e2009-12-14 13:10:39 -020021void hist_entry__free(struct hist_entry *);
22
Eric B Munsoneefc4652010-03-05 12:51:08 -030023void perf_session__output_resort(struct rb_root *hists, u64 total_samples);
24void perf_session__collapse_resort(struct rb_root *hists);
25size_t perf_session__fprintf_hists(struct rb_root *hists,
Arnaldo Carvalho de Meloc351c282009-12-16 13:49:27 -020026 struct perf_session *pair,
Eric B Munsoneefc4652010-03-05 12:51:08 -030027 bool show_displacement, FILE *fp,
28 u64 session_total);
John Kacur3d1d07e2009-09-28 15:32:55 +020029#endif /* __PERF_HIST_H */