[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1251150194-1713-3-git-send-email-jistone@redhat.com>
Date: Mon, 24 Aug 2009 14:43:12 -0700
From: Josh Stone <jistone@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Josh Stone <jistone@...hat.com>, Jason Baron <jbaron@...hat.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>, Li Zefan <lizf@...fujitsu.com>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Jiaying Zhang <jiayingz@...gle.com>,
Martin Bligh <mbligh@...gle.com>,
Lai Jiangshan <laijs@...fujitsu.com>
Subject: [PATCH v4 2/4] 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 need the
should use this same flag, rather than the ftrace-specific one.
Signed-off-by: Josh Stone <jistone@...hat.com>
Cc: Jason Baron <jbaron@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Li Zefan <lizf@...fujitsu.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: Jiaying Zhang <jiayingz@...gle.com>
Cc: Martin Bligh <mbligh@...gle.com>
Cc: Lai Jiangshan <laijs@...fujitsu.com>
---
include/trace/syscall.h | 4 ++++
kernel/tracepoint.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
index 9661dd4..5dcb7e3 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 43bca1f..6c2e12c 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -579,7 +579,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;
--
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists