perf_regs.h 555 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __PERF_REGS_H
  2. #define __PERF_REGS_H
  3. #include <linux/types.h>
  4. struct regs_dump;
  5. #ifdef HAVE_PERF_REGS_SUPPORT
  6. #include <perf_regs.h>
  7. int perf_reg_value(u64 *valp, struct regs_dump *regs, int id);
  8. #else
  9. #define PERF_REGS_MASK 0
  10. #define PERF_REGS_MAX 0
  11. static inline const char *perf_reg_name(int id __maybe_unused)
  12. {
  13. return NULL;
  14. }
  15. static inline int perf_reg_value(u64 *valp __maybe_unused,
  16. struct regs_dump *regs __maybe_unused,
  17. int id __maybe_unused)
  18. {
  19. return 0;
  20. }
  21. #endif /* HAVE_PERF_REGS_SUPPORT */
  22. #endif /* __PERF_REGS_H */