Linux 5.1.15
[linux/fpc-iii.git] / tools / perf / util / branch.h
blob64f96b79f1d71e969ff5909ab3f926b2d2189d2c
1 #ifndef _PERF_BRANCH_H
2 #define _PERF_BRANCH_H 1
4 #include <stdio.h>
5 #include <stdint.h>
6 #include <linux/perf_event.h>
7 #include <linux/types.h>
9 struct branch_flags {
10 u64 mispred:1;
11 u64 predicted:1;
12 u64 in_tx:1;
13 u64 abort:1;
14 u64 cycles:16;
15 u64 type:4;
16 u64 reserved:40;
19 struct branch_entry {
20 u64 from;
21 u64 to;
22 struct branch_flags flags;
25 struct branch_stack {
26 u64 nr;
27 struct branch_entry entries[0];
30 struct branch_type_stat {
31 bool branch_to;
32 u64 counts[PERF_BR_MAX];
33 u64 cond_fwd;
34 u64 cond_bwd;
35 u64 cross_4k;
36 u64 cross_2m;
39 void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags,
40 u64 from, u64 to);
42 const char *branch_type_name(int type);
43 void branch_type_stat_display(FILE *fp, struct branch_type_stat *st);
44 int branch_type_str(struct branch_type_stat *st, char *bf, int bfsize);
46 #endif /* _PERF_BRANCH_H */