public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hekuang <hekuang@huawei.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
	<alexander.shishkin@linux.intel.com>, <wangnan0@huawei.com>,
	<jpoimboe@redhat.com>, <ak@linux.intel.com>, <eranian@google.com>,
	<namhyung@kernel.org>, <adrian.hunter@intel.com>,
	<sukadev@linux.vnet.ibm.com>, <masami.hiramatsu.pt@hitachi.com>,
	<tumanova@linux.vnet.ibm.com>, <kan.liang@intel.com>,
	<penberg@kernel.org>, <dsahern@gmail.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 3/5] perf callchain: Add support for cross-platform unwind
Date: Fri, 27 May 2016 16:02:59 +0800	[thread overview]
Message-ID: <5747FF33.3070906@huawei.com> (raw)
In-Reply-To: <20160527073848.GA30974@krava>



在 2016/5/27 15:38, Jiri Olsa 写道:
> On Fri, May 27, 2016 at 03:13:04PM +0800, Hekuang wrote:
>
> SNIP
>
>>>     - I understand we need to compile 3 objects from unwind-libunwind.c,
>>>       how about we create 3 files like:
>>>
>>>       util/unwind-libunwind-local.c
>>>       util/unwind-libunwind-x86_32.c
>>>       util/unwind-libunwind-arm64.c
>>>
>>>       which would setup all necessary defines and include unwind-libunwind.c like:
>>>
>>>       ---
>>>       /* comments explaining every define ;-) */
>>>       ...
>>>       #define LOCAL... REMOTE..
>>>       ...
>>>       #include <util/unwind-libunwind-local.c>
>>>       ...
>>>       ----
>>>
>>>       this way we will keep all the special setup for given unwind object
>>>       in one place and you can also use simple rule in the Build file like
>>>       without defining special rule:
>>>
>>>       libperf-$(CONFIG_LIBUNWIND_X86)      += unwind-libunwind_x86_32.o
>>>       libperf-$(CONFIG_LIBUNWIND_AARCH64)  += unwind-libunwind_arm64.o
>>>
>>>       the same way for the arch object:
>>>
>>>       arch/x86/util/unwind-libunwind-local.c
>>>       arch/x86/util/unwind-libunwind-x86_32.c
>>>
>>>
>>> Not sure I thought everything through, but I think this way
>>> we'll keep it more maintainable and readable..
>>>
>>> let me know what you think
>> The only concern is that, if later we support more platforms,
>> there will be too much files named as 'tools/perf/util/unwind-libunwind*.c'
>> Is it acceptable or not?
>>
>> And I thought all files belongs to specific archs should
>> go to folder under 'tools/perf/arch/xxx', is that right?
> hum, I wouldn't worry about that.. but you're right,
> let's put them under arch

But only 'tools/perf/arch/$(host platform)' will be built, in our case,
we should built the unwind-libunwind-$(arch) as long as we have
the remote libunwind libraries. So, I think there's a conflict in the
existing build script and not easy to 'put them under arch'. That's why
I choose a complex way in my previous patch.

Do you have some suggestions?
>
> thanks,
> jirka
>

  reply	other threads:[~2016-05-27  8:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24  9:20 [PATCH v5 0/5] Add support for remote unwind He Kuang
2016-05-24  9:20 ` [PATCH v5 1/5] perf tools: Use LIBUNWIND_DIR for remote libunwind feature check He Kuang
2016-05-24  9:20 ` [PATCH v5 2/5] perf tools: Show warnings for unsupported cross-platform unwind He Kuang
2016-05-24  9:20 ` [PATCH v5 3/5] perf callchain: Add support for " He Kuang
2016-05-26 17:42   ` Jiri Olsa
2016-05-27  7:13     ` Hekuang
2016-05-27  7:38       ` Jiri Olsa
2016-05-27  8:02         ` Hekuang [this message]
2016-05-27  8:44           ` Jiri Olsa
2016-05-26 17:51   ` Jiri Olsa
2016-05-24  9:20 ` [PATCH v5 4/5] perf callchain: Support x86 target platform He Kuang
2016-05-26 17:57   ` Jiri Olsa
2016-05-24  9:20 ` [PATCH v5 5/5] perf callchain: Support aarch64 cross-platform He Kuang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5747FF33.3070906@huawei.com \
    --to=hekuang@huawei.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=jpoimboe@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=penberg@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sukadev@linux.vnet.ibm.com \
    --cc=tumanova@linux.vnet.ibm.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox