Re: [PATCH 2/2 v2] tracing/syscalls: support for syscalls tracing on x86-64

Andrew Morton
2009-03-15T04:05:26Z

On Fri, 13 Mar 2009 15:42:12 +0100 Frederic Weisbecker <fweisbec@gmail.com> wrote:

> +static struct syscall_metadata *find_syscall_meta(unsigned long *syscall)
> +{
> + struct syscall_metadata *start;
> + struct syscall_metadata *stop;
> + char str[KSYM_SYMBOL_LEN];
> +
> +
> + start = (struct syscall_metadata *)__start_syscalls_metadata;
> + stop = (struct syscall_metadata *)__stop_syscalls_metadata;
> + kallsyms_lookup((unsigned long) syscall, NULL, NULL, NULL, str);
> +
> + for ( ; start < stop; start++) {
> + if (start->name && !strcmp(start->name, str))
> + return start;
> + }
> + return NULL;
> +}

afacit this feature can be enabled when CONFIG_KALLSYMS=n. Does that make
sense?