Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1408987

Re: [PATCH v6 10/11] perf callchain: Support x86 target platform

From Hekuang <hekuang@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 10/11] perf callchain: Support x86 target platform
Date 2016-05-30 13:10 +0200
Message-ID <rEtf3-3mA-3@gated-at.bofh.it> (permalink)
References <rDLe1-kx-3@gated-at.bofh.it> <rDLe1-kx-5@gated-at.bofh.it> <rErdg-1TA-45@gated-at.bofh.it> <rErwC-2fk-19@gated-at.bofh.it> <rErQ3-2lt-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



在 2016/5/30 17:30, Jiri Olsa 写道:
> On Mon, May 30, 2016 at 05:11:35PM +0800, Hekuang wrote:
>> hi
>>
>> 在 2016/5/30 16:53, Jiri Olsa 写道:
>>> On Sat, May 28, 2016 at 11:59:59AM +0000, He Kuang wrote:
>>>> Support x86(32-bit) cross platform callchain unwind.
>>>>
>>>> Signed-off-by: He Kuang <hekuang@huawei.com>
>>>> ---
>>>>    tools/perf/arch/Build                              |  1 +
>>>>    tools/perf/arch/x86/util/unwind-libunwind.c        |  7 ++++---
>>>>    tools/perf/arch/x86/util/unwind-libunwind_x86_32.c | 21 +++++++++++++++++++++
>>>>    tools/perf/util/unwind-libunwind-local.c           |  4 ++++
>>>>    tools/perf/util/unwind-libunwind.c                 | 19 +++++++++++++------
>>>>    tools/perf/util/unwind.h                           | 10 ++++++++++
>>>>    6 files changed, 53 insertions(+), 9 deletions(-)
>>>>    create mode 100644 tools/perf/arch/x86/util/unwind-libunwind_x86_32.c
>>>>
>>>> diff --git a/tools/perf/arch/Build b/tools/perf/arch/Build
>>>> index 109eb75..3fc4af1 100644
>>>> --- a/tools/perf/arch/Build
>>>> +++ b/tools/perf/arch/Build
>>>> @@ -1,2 +1,3 @@
>>>>    libperf-y += common.o
>>>>    libperf-y += $(ARCH)/
>>>> +libperf-$(CONFIG_LIBUNWIND_X86)      += x86/util/unwind-libunwind_x86_32.o
>>> we have Build file directly in arch/x86/util/
>>>
>>> if you do it like this to include generic file easily
>>> we better fix the include then
>> This is because "libperf-y += $(ARCH)" will only sink into $(ARCH) folder,
>> for example on x86_64, only tools/perf/arch/x86 will be built. But for
>>   remote libunwind, we also need
>>   'tools/perf/arch/arm64/util/unwind-libunwind.o', while arm64 folder is
>> not added to libperf-y. Is there a gracefull to deal with this?
> you just need to include the file, right?
>
> 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?

Thank you.
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 10/11] perf callchain: Support x86 target platform He Kuang <hekuang@huawei.com> - 2016-05-28 14:10 +0200
  Re: [PATCH v6 10/11] perf callchain: Support x86 target platform Jiri Olsa <jolsa@redhat.com> - 2016-05-30 11:00 +0200
    Re: [PATCH v6 10/11] perf callchain: Support x86 target platform Hekuang <hekuang@huawei.com> - 2016-05-30 11:20 +0200
      Re: [PATCH v6 10/11] perf callchain: Support x86 target platform Jiri Olsa <jolsa@redhat.com> - 2016-05-30 11:40 +0200
        Re: [PATCH v6 10/11] perf callchain: Support x86 target platform Hekuang <hekuang@huawei.com> - 2016-05-30 13:10 +0200
          Re: [PATCH v6 10/11] perf callchain: Support x86 target platform Jiri Olsa <jolsa@redhat.com> - 2016-05-30 16:30 +0200
  Re: [PATCH v6 10/11] perf callchain: Support x86 target platform Jiri Olsa <jolsa@redhat.com> - 2016-05-30 11:00 +0200
  Re: [PATCH v6 10/11] perf callchain: Support x86 target platform Jiri Olsa <jolsa@redhat.com> - 2016-05-30 11:00 +0200

csiph-web