aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Stone <[email protected]>2009-08-24 14:43:12 -0700
committerFrederic Weisbecker <[email protected]>2009-08-26 00:24:19 +0200
commit3d27d8cb34fc156beb86de2338ca4029873a5cc6 (patch)
tree51be3d9b84fa6a7899b69c499cb7630ebca366b0
parent667000011927b4fcc359beac4a2447889db6d349 (diff)
tracing: Make syscall tracepoints conditional
The syscall enter/exit tracepoints are only supported on archs that HAVE_SYSCALL_TRACEPOINTS, so the declarations should be #ifdef'ed. Also, the definition of syscall_regfunc and syscall_unregfunc should depend on this same config, rather than the ftrace-specific one. Signed-off-by: Josh Stone <[email protected]> Cc: Jason Baron <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Li Zefan <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Jiaying Zhang <[email protected]> Cc: Martin Bligh <[email protected]> Cc: Lai Jiangshan <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
-rw-r--r--include/trace/syscall.h4
-rw-r--r--kernel/tracepoint.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
index 9661dd406b93..5dcb7e3a544c 100644
--- a/include/trace/syscall.h
+++ b/include/trace/syscall.h
@@ -8,6 +8,8 @@
#include <asm/ptrace.h>
+#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
+
extern void syscall_regfunc(void);
extern void syscall_unregfunc(void);
@@ -25,6 +27,8 @@ DECLARE_TRACE_WITH_CALLBACK(syscall_exit,
syscall_unregfunc
);
+#endif
+
/*
* A syscall entry in the ftrace syscalls array.
*
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index be86b9a01a09..9e0a36f0e2a9 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -576,7 +576,7 @@ __initcall(init_tracepoints);
#endif /* CONFIG_MODULES */
-#ifdef CONFIG_FTRACE_SYSCALLS
+#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
static DEFINE_MUTEX(regfunc_mutex);
static int sys_tracepoint_refcount;