perf_event.h 515 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2012 ARM Ltd.
  4. */
  5. #ifndef __ASM_PERF_EVENT_H
  6. #define __ASM_PERF_EVENT_H
  7. #include <asm/stack_pointer.h>
  8. #include <asm/ptrace.h>
  9. #ifdef CONFIG_PERF_EVENTS
  10. #define perf_arch_bpf_user_pt_regs(regs) &regs->user_regs
  11. #endif
  12. #define perf_arch_fetch_caller_regs(regs, __ip) { \
  13. (regs)->pc = (__ip); \
  14. (regs)->regs[29] = (unsigned long) __builtin_frame_address(0); \
  15. (regs)->sp = current_stack_pointer; \
  16. (regs)->pstate = PSR_MODE_EL1h; \
  17. }
  18. #endif