This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 1/2] make arch_init_ftrace_syscalls multiply callable
- From: "Frank Ch. Eigler" <fche at elastic dot org>
- To: linux-kernel at vger dot kernel dot org, utrace-devel at redhat dot com
- Cc: systemtap at sources dot redhat dot com, fweisbec at gmail dot com, rostedt at goodmis dot org, mingo at elte dot hu, "Frank Ch. Eigler" <fche at elastic dot org>
- Date: Sun, 5 Apr 2009 10:17:53 -0400
- Subject: [PATCH 1/2] make arch_init_ftrace_syscalls multiply callable
- References: <1238941074-27424-1-git-send-email-fche@elastic.org>
Since both the utrace-based ftrace engine and the original
syscall-specific ftrace engine use the syscall pretty-printer, this
initialization function needs to be callable from each of them.
Signed-off-by: Frank Ch. Eigler <fche@elastic.org>
---
arch/x86/kernel/ftrace.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 1d0d7f4..1d99d3d 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -498,6 +498,9 @@ void arch_init_ftrace_syscalls(void)
if (atomic_inc_return(&refs) != 1)
goto end;
+ if (syscalls_metadata)
+ return;
+
syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) *
FTRACE_SYSCALL_MAX, GFP_KERNEL);
if (!syscalls_metadata) {
--
1.6.0.6