[PATCH 1/2] make arch_init_ftrace_syscalls multiply callable
Frank Ch. Eigler
fche@elastic.org
Sun Apr 5 14:18:00 GMT 2009
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
More information about the Systemtap
mailing list