lkml.org 
[lkml]   [2009]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/7] add syscall tracepoints
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@redhat.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)

1. It's called at boot, so can be __init.

2. This patch breaks bisectability, now the declaration and definition
of this function don't match.

> {
> 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);
> #endif


\
 
 \ /
  Last update: 2009-06-19 10:27    [W:0.281 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site