perf_event.h 763 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __ASM_SPARC_PERF_EVENT_H
  2. #define __ASM_SPARC_PERF_EVENT_H
  3. #ifdef CONFIG_PERF_EVENTS
  4. #include <asm/ptrace.h>
  5. #define perf_arch_fetch_caller_regs(regs, ip) \
  6. do { \
  7. unsigned long _pstate, _asi, _pil, _i7, _fp; \
  8. __asm__ __volatile__("rdpr %%pstate, %0\n\t" \
  9. "rd %%asi, %1\n\t" \
  10. "rdpr %%pil, %2\n\t" \
  11. "mov %%i7, %3\n\t" \
  12. "mov %%i6, %4\n\t" \
  13. : "=r" (_pstate), \
  14. "=r" (_asi), \
  15. "=r" (_pil), \
  16. "=r" (_i7), \
  17. "=r" (_fp)); \
  18. (regs)->tstate = (_pstate << 8) | \
  19. (_asi << 24) | (_pil << 20); \
  20. (regs)->tpc = (ip); \
  21. (regs)->tnpc = (regs)->tpc + 4; \
  22. (regs)->u_regs[UREG_I6] = _fp; \
  23. (regs)->u_regs[UREG_I7] = _i7; \
  24. } while (0)
  25. #endif
  26. #endif