hist.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __PERF_HIST_H
  2. #define __PERF_HIST_H
  3. #include <linux/types.h>
  4. #include "callchain.h"
  5. extern struct callchain_param callchain_param;
  6. struct perf_session;
  7. struct hist_entry;
  8. struct addr_location;
  9. struct symbol;
  10. struct rb_root;
  11. void __perf_session__add_count(struct hist_entry *he,
  12. struct addr_location *al,
  13. u64 count);
  14. struct hist_entry *__perf_session__add_hist_entry(struct rb_root *hists,
  15. struct addr_location *al,
  16. struct symbol *parent,
  17. u64 count, bool *hit);
  18. extern int64_t hist_entry__cmp(struct hist_entry *, struct hist_entry *);
  19. extern int64_t hist_entry__collapse(struct hist_entry *, struct hist_entry *);
  20. int hist_entry__fprintf(struct hist_entry *self,
  21. struct perf_session *pair_session,
  22. bool show_displacement,
  23. long displacement, FILE *fp,
  24. u64 session_total);
  25. int hist_entry__snprintf(struct hist_entry *self,
  26. char *bf, size_t size,
  27. struct perf_session *pair_session,
  28. bool show_displacement, long displacement,
  29. bool color, u64 session_total);
  30. void hist_entry__free(struct hist_entry *);
  31. u64 perf_session__output_resort(struct rb_root *hists, u64 total_samples);
  32. void perf_session__collapse_resort(struct rb_root *hists);
  33. size_t perf_session__fprintf_hists(struct rb_root *hists,
  34. struct perf_session *pair,
  35. bool show_displacement, FILE *fp,
  36. u64 session_total);
  37. #endif /* __PERF_HIST_H */