[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0906182324020.6890@gandalf.stny.rr.com>
Date: Thu, 18 Jun 2009 23:24:42 -0400 (EDT)
From: Steven Rostedt <rostedt@...dmis.org>
To: Jason Baron <jbaron@...hat.com>
cc: linux-kernel@...r.kernel.org, fweisbec@...il.com, mingo@...e.hu,
laijs@...fujitsu.com, peterz@...radead.org,
mathieu.desnoyers@...ymtl.ca, jiayingz@...gle.com,
bligh@...gle.com, roland@...hat.com, fche@...hat.com
Subject: Re: [PATCH 2/7] add syscall tracepoints
On Fri, 12 Jun 2009, Jason Baron wrote:
>
> Call arch_init_ftrace_syscalls at boot, so we can determine the set of syscalls
> for the syscall trace events.
>
>
> Signed-off-by: Jason Baron <jbaron@...hat.com>
>
> ---
> arch/x86/kernel/ftrace.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index 30baa5b..9f2aa83 100644
> --- a/arch/x86/kernel/ftrace.c
> +++ b/arch/x86/kernel/ftrace.c
> @@ -518,7 +518,7 @@ int syscall_name_to_nr(char *name)
> return -1;
> }
>
> -void arch_init_ftrace_syscalls(void)
> +int arch_init_ftrace_syscalls(void)
> {
> int i;
> struct syscall_metadata *meta;
> @@ -532,17 +532,19 @@ void arch_init_ftrace_syscalls(void)
> FTRACE_SYSCALL_MAX, GFP_KERNEL);
> if (!syscalls_metadata) {
> WARN_ON(1);
> - return;
> + return -ENOMEM;
> }
>
> for (i = 0; i < FTRACE_SYSCALL_MAX; i++) {
> meta = find_syscall_meta(psys_syscall_table[i]);
> syscalls_metadata[i] = meta;
> }
> - return;
> + return 0;
>
> /* Paranoid: avoid overflow */
> end:
> atomic_dec(&refs);
> + return 0;
> }
> +arch_initcall(arch_init_ftrace_syscalls);
If we add this, can't we make it static and remove the call to it from
kernel/trace/trace_syscalls.c ?
-- Steve
> #endif
> --
> 1.6.0.6
>
>
--
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