2010-02-03 03:24:58 +08:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/include/asm/perf_event.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 picoChip Designs Ltd, Jamie Iles
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ARM_PERF_EVENT_H__
|
|
|
|
#define __ARM_PERF_EVENT_H__
|
|
|
|
|
2014-09-30 00:15:32 +08:00
|
|
|
#ifdef CONFIG_PERF_EVENTS
|
2012-09-13 23:40:46 +08:00
|
|
|
struct pt_regs;
|
|
|
|
extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
|
|
|
|
extern unsigned long perf_misc_flags(struct pt_regs *regs);
|
|
|
|
#define perf_misc_flags(regs) perf_misc_flags(regs)
|
2012-11-22 20:05:55 +08:00
|
|
|
#endif
|
2012-09-13 23:40:46 +08:00
|
|
|
|
2015-05-08 13:43:03 +08:00
|
|
|
#define perf_arch_fetch_caller_regs(regs, __ip) { \
|
|
|
|
(regs)->ARM_pc = (__ip); \
|
|
|
|
(regs)->ARM_fp = (unsigned long) __builtin_frame_address(0); \
|
|
|
|
(regs)->ARM_sp = current_stack_pointer; \
|
|
|
|
(regs)->ARM_cpsr = SVC_MODE; \
|
|
|
|
}
|
|
|
|
|
2010-02-03 03:24:58 +08:00
|
|
|
#endif /* __ARM_PERF_EVENT_H__ */
|