branch.h 566 B

1234567891011121314151617181920212223242526
  1. #ifndef _PERF_BRANCH_H
  2. #define _PERF_BRANCH_H 1
  3. #include <stdint.h>
  4. #include "../perf.h"
  5. struct branch_type_stat {
  6. bool branch_to;
  7. u64 counts[PERF_BR_MAX];
  8. u64 cond_fwd;
  9. u64 cond_bwd;
  10. u64 cross_4k;
  11. u64 cross_2m;
  12. };
  13. struct branch_flags;
  14. void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags,
  15. u64 from, u64 to);
  16. const char *branch_type_name(int type);
  17. void branch_type_stat_display(FILE *fp, struct branch_type_stat *st);
  18. int branch_type_str(struct branch_type_stat *st, char *bf, int bfsize);
  19. #endif /* _PERF_BRANCH_H */