Re: [PATCH 1/2 v2] tracing/syscalls: core infrastructure for syscalls tracing

Frederic Weisbecker
2009-04-06T22:13:01Z

On Mon, Apr 06, 2009 at 02:55:55PM -0700, Tony Luck wrote:
> On Fri, Mar 13, 2009 at 7:42 AM, Frederic Weisbecker <fweisbec@gmail.com> wrote:
> > diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> > index ab1d772..dfe2a44 100644
> > --- a/include/linux/syscalls.h
> > +++ b/include/linux/syscalls.h
> > @@ -66,6 +66,7 @@ struct perf_counter_hw_event;
> >  #include <asm/signal.h>
> >  #include <linux/quota.h>
> >  #include <linux/key.h>
> > +#include <linux/ftrace.h>
>
> This causes some unpleasantness in the ia64 build with CONFIG_IA32_SUPPORT=y
>
> CC arch/ia64/ia32/sys_ia32.o
> In file included from arch/ia64/ia32/sys_ia32.c:55:
> arch/ia64/ia32/ia32priv.h:290:1: warning: "elf_check_arch" redefined
> In file included from include/linux/elf.h:7,
> from include/linux/module.h:14,
> from include/linux/ftrace.h:8,
> from include/linux/syscalls.h:68,
> from arch/ia64/ia32/sys_ia32.c:18:
> /home/aegl/generic-smp/arch/ia64/include/asm/elf.h:19:1: warning: this
> is the location of the previous definition
> In file included from arch/ia64/ia32/sys_ia32.c:55:
> arch/ia64/ia32/ia32priv.h:295:1: warning: "ELF_CLASS" redefined
> In file included from include/linux/elf.h:7,
> from include/linux/module.h:14,
> from include/linux/ftrace.h:8,
> from include/linux/syscalls.h:68,
> from arch/ia64/ia32/sys_ia32.c:18:
>
> and lots more like this. Suddenly having elf.h included in a lot of
> the ia32 compat
> files is the root problem.
>
> What does syscalls.h really need to pull in at this point ... is there
> a way for it to get it without pulling in so much extra stuff?

Ah, I see. I wondered somewhat when I included ftrace.h from syscall.h,
I didn't know why it stressed me but now I understand :-)

Though this is weird that both ia32 and ia64 definitions are allowed to be
included like that.

Anyway, I will put the syscalls tracing headers to a separate file to fix
that, thanks for reporting this!

Frederic.

> -Tony