unwind.h 830 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __UNWIND_H
  2. #define __UNWIND_H
  3. #include "types.h"
  4. #include "event.h"
  5. #include "symbol.h"
  6. struct unwind_entry {
  7. struct map *map;
  8. struct symbol *sym;
  9. u64 ip;
  10. };
  11. typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);
  12. #ifdef LIBUNWIND_SUPPORT
  13. int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
  14. struct machine *machine,
  15. struct thread *thread,
  16. u64 sample_uregs,
  17. struct perf_sample *data);
  18. int unwind__arch_reg_id(int regnum);
  19. #else
  20. static inline int
  21. unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
  22. void *arg __maybe_unused,
  23. struct machine *machine __maybe_unused,
  24. struct thread *thread __maybe_unused,
  25. u64 sample_uregs __maybe_unused,
  26. struct perf_sample *data __maybe_unused)
  27. {
  28. return 0;
  29. }
  30. #endif /* LIBUNWIND_SUPPORT */
  31. #endif /* __UNWIND_H */