public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Wang Nan <wangnan0@huawei.com>
Cc: linux-kernel@vger.kernel.org, lizefan@huawei.com,
	pi3orama@163.com, Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH] perf tools: Fix cross compiling error
Date: Mon, 31 Aug 2015 10:54:51 -0300	[thread overview]
Message-ID: <20150831135451.GA16351@redhat.com> (raw)
In-Reply-To: <1440766442-48116-1-git-send-email-wangnan0@huawei.com>

Em Fri, Aug 28, 2015 at 12:54:02PM +0000, Wang Nan escreveu:
> Cross compiling perf to other platform failed due to missing symbol:
> 
>   ...
>   AR       /pathofperf/libperf.a
>   LD       /pathofperf/tests/perf-in.o
>   LD       /pathofperf/perf-in.o
>   LINK     /pathofperf/perf
> /pathofperf/libperf.a(libperf-in.o): In function `intel_pt_synth_branch_sample':
> /usr/src/kernel/tools/perf/util/intel-pt.c:899: undefined reference to `tsc_to_perf_time'
> /pathofperf/libperf.a(libperf-in.o): In function `intel_pt_synth_transaction_sample':
> /usr/src/kernel/tools/perf/util/intel-pt.c:992: undefined reference to `tsc_to_perf_time'
> /pathofperf/libperf.a(libperf-in.o): In function `intel_pt_synth_instruction_sample':
> /usr/src/kernel/tools/perf/util/intel-pt.c:943: undefined reference to `tsc_to_perf_time'
>   ...
> 
> This is because we allow newly introduced intel-pt-decoder to be
> compiled to not only X86, but tsc.c which required by it is compiled
> for x86 only.
> 
> This patch fix the compiling error by allow tsc.c to be compiled if
> CONFIG_AUXTRACE is set, no matter the target platform.

There were some changes in this area, i.e. x86 needs tsc, and auxtrace
as well, so both should express that via:

 libperf-$(CONFIG_X86) += tsc.o
 libperf-$(CONFIG_AUXTRACE) += tsc.o

Because on !x86 we want to process perf.data files containing Intel PT.

Adding Jiri and Adrian to the CC list.

- Arnaldo
 
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/util/Build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/Build b/tools/perf/util/Build
> index fd2f084..c8d9c7e 100644
> --- a/tools/perf/util/Build
> +++ b/tools/perf/util/Build
> @@ -74,7 +74,7 @@ libperf-y += stat-shadow.o
>  libperf-y += record.o
>  libperf-y += srcline.o
>  libperf-y += data.o
> -libperf-$(CONFIG_X86) += tsc.o
> +libperf-$(CONFIG_AUXTRACE) += tsc.o
>  libperf-y += cloexec.o
>  libperf-y += thread-stack.o
>  libperf-$(CONFIG_AUXTRACE) += auxtrace.o
> -- 
> 1.8.3.4

  reply	other threads:[~2015-08-31 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28 12:54 [PATCH] perf tools: Fix cross compiling error Wang Nan
2015-08-31 13:54 ` Arnaldo Carvalho de Melo [this message]
2015-08-31 14:02   ` Jiri Olsa
2015-08-31 14:02     ` Adrian Hunter

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=20150831135451.GA16351@redhat.com \
    --to=acme@redhat.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=pi3orama@163.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