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

From: Frederic Weisbecker
Date: Sun Mar 15 2009 - 12:05:55 EST


On Sun, Mar 15, 2009 at 06:30:18AM +0100, Ingo Molnar wrote:
>
> * Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > On Fri, 13 Mar 2009 15:42:12 +0100 Frederic Weisbecker <fweisbec@xxxxxxxxx> 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?
>
> It does not make much sense - the function will return NULL and
> we wont do any tracing. Frederic: FTRACE_SYSCALLS should either
> select KALLSYMS in kernel/trace/Kconfig, like the STACK_TRACER
> and FUNCTION_TRACER already does. Or perhaps, for really
> puritane tracing, we should emit simplified, non-symbolic trace
> data in the !KALLSYMS case.
>
> Ingo

You're right. But it would be somewhat pointless to trace the syscalls
without their names.
I will make it select KALLSYMS, it seems to me a sane way to fix it.

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/