diff options
author | John Kacur <jkacur@redhat.com> | 2009-09-28 09:32:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-30 07:57:56 -0400 |
commit | 3d1d07ecd2009f65cb2091563fa21f9600c36774 (patch) | |
tree | a1ef97a8264fc880ee8a9406a9be9070d0d12176 /tools/perf/util/hist.h | |
parent | dd68ada2d417e57b848822a1407b5317a54136c5 (diff) |
perf tools: Put common histogram functions in their own file
Move histogram related functions into their own files (hist.c and
hist.h) and make use of them in builtin-annotate.c and
builtin-report.c.
Signed-off-by: John Kacur <jkacur@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <alpine.LFD.2.00.0909281531180.8316@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r-- | tools/perf/util/hist.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h new file mode 100644 index 000000000000..9a8daa12b43a --- /dev/null +++ b/tools/perf/util/hist.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef __PERF_HIST_H | ||
2 | #define __PERF_HIST_H | ||
3 | #include "../builtin.h" | ||
4 | |||
5 | #include "util.h" | ||
6 | |||
7 | #include "color.h" | ||
8 | #include <linux/list.h> | ||
9 | #include "cache.h" | ||
10 | #include <linux/rbtree.h> | ||
11 | #include "symbol.h" | ||
12 | #include "string.h" | ||
13 | #include "callchain.h" | ||
14 | #include "strlist.h" | ||
15 | #include "values.h" | ||
16 | |||
17 | #include "../perf.h" | ||
18 | #include "debug.h" | ||
19 | #include "header.h" | ||
20 | |||
21 | #include "parse-options.h" | ||
22 | #include "parse-events.h" | ||
23 | |||
24 | #include "thread.h" | ||
25 | #include "sort.h" | ||
26 | |||
27 | extern struct rb_root hist; | ||
28 | extern struct rb_root collapse_hists; | ||
29 | extern struct rb_root output_hists; | ||
30 | extern int callchain; | ||
31 | extern struct callchain_param callchain_param; | ||
32 | extern unsigned long total; | ||
33 | extern unsigned long total_mmap; | ||
34 | extern unsigned long total_comm; | ||
35 | extern unsigned long total_fork; | ||
36 | extern unsigned long total_unknown; | ||
37 | extern unsigned long total_lost; | ||
38 | |||
39 | extern int64_t hist_entry__cmp(struct hist_entry *, struct hist_entry *); | ||
40 | extern int64_t hist_entry__collapse(struct hist_entry *, struct hist_entry *); | ||
41 | extern void hist_entry__free(struct hist_entry *); | ||
42 | extern void collapse__insert_entry(struct hist_entry *); | ||
43 | extern void collapse__resort(void); | ||
44 | extern void output__insert_entry(struct hist_entry *, u64); | ||
45 | extern void output__resort(u64); | ||
46 | |||
47 | #endif /* __PERF_HIST_H */ | ||