perf_regs.h 567 B

12345678910111213141516171819202122232425
  1. #ifndef _LINUX_PERF_REGS_H
  2. #define _LINUX_PERF_REGS_H
  3. #ifdef CONFIG_HAVE_PERF_REGS
  4. #include <asm/perf_regs.h>
  5. u64 perf_reg_value(struct pt_regs *regs, int idx);
  6. int perf_reg_validate(u64 mask);
  7. u64 perf_reg_abi(struct task_struct *task);
  8. #else
  9. static inline u64 perf_reg_value(struct pt_regs *regs, int idx)
  10. {
  11. return 0;
  12. }
  13. static inline int perf_reg_validate(u64 mask)
  14. {
  15. return mask ? -ENOSYS : 0;
  16. }
  17. static inline u64 perf_reg_abi(struct task_struct *task)
  18. {
  19. return PERF_SAMPLE_REGS_ABI_NONE;
  20. }
  21. #endif /* CONFIG_HAVE_PERF_REGS */
  22. #endif /* _LINUX_PERF_REGS_H */