From: Michael Cree Date: Tue, 8 Dec 2009 19:27:01 +0000 (-0500) Subject: alpha: Add minimal support for software performance events X-Git-Tag: 2.1b_release~9856^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a582e6f01b90211933e70edcec9bc0bbb1157402;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git alpha: Add minimal support for software performance events In the kernel the patch enables configuration of the perf event option, adds the perf_event_open syscall, and includes a minimal architecture specific asm/perf_event.h header file. Signed-off-by: Michael Cree Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Signed-off-by: Matt Turner --- diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 4434481..bd7261e 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -9,6 +9,7 @@ config ALPHA select HAVE_IDE select HAVE_OPROFILE select HAVE_SYSCALL_WRAPPERS + select HAVE_PERF_EVENTS help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory, diff --git a/arch/alpha/include/asm/perf_event.h b/arch/alpha/include/asm/perf_event.h new file mode 100644 index 0000000..3bef852 --- /dev/null +++ b/arch/alpha/include/asm/perf_event.h @@ -0,0 +1,9 @@ +#ifndef __ASM_ALPHA_PERF_EVENT_H +#define __ASM_ALPHA_PERF_EVENT_H + +/* Alpha only supports software events through this interface. */ +static inline void set_perf_event_pending(void) { } + +#define PERF_EVENT_INDEX_OFFSET 0 + +#endif /* __ASM_ALPHA_PERF_EVENT_H */ diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 62e823e..804e531 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -448,10 +448,11 @@ #define __NR_preadv 490 #define __NR_pwritev 491 #define __NR_rt_tgsigqueueinfo 492 +#define __NR_perf_event_open 493 #ifdef __KERNEL__ -#define NR_SYSCALLS 493 +#define NR_SYSCALLS 494 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index d0bc3c8..09acb78 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S @@ -511,6 +511,7 @@ sys_call_table: .quad sys_preadv /* 490 */ .quad sys_pwritev .quad sys_rt_tgsigqueueinfo + .quad sys_perf_event_open .size sys_call_table, . - sys_call_table .type sys_call_table, @object