alpha: Add minimal support for software performance events
authorMichael Cree <mcree@orcon.net.nz>
Tue, 8 Dec 2009 19:27:01 +0000 (14:27 -0500)
committerMatt Turner <mattst88@gmail.com>
Fri, 18 Dec 2009 06:11:30 +0000 (01:11 -0500)
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 <mcree@orcon.net.nz>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Matt Turner <mattst88@gmail.com>
arch/alpha/Kconfig
arch/alpha/include/asm/perf_event.h [new file with mode: 0644]
arch/alpha/include/asm/unistd.h
arch/alpha/kernel/systbls.S

index 443448154f32e9c7143ca759fe32ee475f9e818e..bd7261ea8f9401adcf96e7df1664a9042401cdd6 100644 (file)
@@ -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 (file)
index 0000000..3bef852
--- /dev/null
@@ -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 */
index 62e823e68f65c2f7c9af8bb99e20c5a21bd9d7b7..804e5311c84188fbc14a62b7afb97bc35a232003 100644 (file)
 #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
index d0bc3c8c3ed32e6fab16b187da40493751af00fb..09acb786e72b0d665d3aa9e38346148adbdb08c5 100644 (file)
@@ -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