Re: [PATCH v6 10/11] perf callchain: Support x86 target platform
From: Jiri Olsa
Date: Mon May 30 2016 - 10:24:17 EST
On Mon, May 30, 2016 at 06:58:40PM +0800, Hekuang wrote:
SNIP
> > I think it's ok to include arch/arm/....c
> > from arch/x86/util/unwind-libunwind-arm64.c
> >
> > jirka
>
> By following your advise, if ARCH=x86, the file tree will
> be like this:
>
> arch/x86
> - arch/x86/util/unwind-libunwind-arm64.c
> - arch/x86/util/unwind-libunwind-x86_32.c
> - arch/x86/util/unwind-libunwind-x86_64.c
> - arch/x86/util/unwind-libunwind-arm.c
>
> And for ARCH=arm ïhost machine is arm, it should be considered)
> arch/arm
> - arch/arm/util/unwind-libunwind-arm64.c
> - arch/arm/util/unwind-libunwind-x86_32.c
> - arch/arm/util/unwind-libunwind-x86_64.c
> - arch/arm/util/unwind-libunwind-arm.c
>
> For arm64:
> arch/arm64
> - arch/arm64/util/unwind-libunwind-arm64.c
> - arch/arm64/util/unwind-libunwind-x86_32.c
> - arch/arm64/util/unwind-libunwind-x86_64.c
> - arch/arm64/util/unwind-libunwind-arm.c
>
> But in my patch, the file tree is like this:
>
> arch
> - arch/arm64/util/unwind-libunwind-arm64.c
> - arch/x86/util/unwind-libunwind-x86_64.c
> - arch/x86/util/unwind-libunwind-x86_32.c
> - arch/arm/util/unwind-libunwind-arm.c
>
> I admit that
>
> +libperf-$(CONFIG_LIBUNWIND_X86) += x86/util/unwind-libunwind_x86_32.o
>
> is not so good, but do you think the above file tree is
> too redunctant?
i see.. we could leave it like that, I just wish
it'd be more clear.. one last thought:
how about moving libunwind arch files into special folder:
util/libunwind/arm64.c
util/libunwind/x86_32.c
util/libunwind/x86_64.c
util/libunwind/arm.c
thanks,
jirka