Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  *  linux/arch/arm/include/asm/perf_event.h
0004  *
0005  *  Copyright (C) 2009 picoChip Designs Ltd, Jamie Iles
0006  */
0007 
0008 #ifndef __ARM_PERF_EVENT_H__
0009 #define __ARM_PERF_EVENT_H__
0010 
0011 #ifdef CONFIG_PERF_EVENTS
0012 struct pt_regs;
0013 extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
0014 extern unsigned long perf_misc_flags(struct pt_regs *regs);
0015 #define perf_misc_flags(regs)   perf_misc_flags(regs)
0016 #endif
0017 
0018 #define perf_arch_fetch_caller_regs(regs, __ip) { \
0019     (regs)->ARM_pc = (__ip); \
0020     (regs)->ARM_fp = (unsigned long) __builtin_frame_address(0); \
0021     (regs)->ARM_sp = current_stack_pointer; \
0022     (regs)->ARM_cpsr = SVC_MODE; \
0023 }
0024 
0025 #endif /* __ARM_PERF_EVENT_H__ */