Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1215328 > unrolled thread
| Started by | Wang Nan <wangnan0@huawei.com> |
|---|---|
| First post | 2015-08-28 15:00 +0200 |
| Last post | 2015-08-31 16:10 +0200 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] perf tools: Fix cross compiling error Wang Nan <wangnan0@huawei.com> - 2015-08-28 15:00 +0200
Re: [PATCH] perf tools: Fix cross compiling error Arnaldo Carvalho de Melo <acme@redhat.com> - 2015-08-31 16:00 +0200
Re: [PATCH] perf tools: Fix cross compiling error Adrian Hunter <adrian.hunter@intel.com> - 2015-08-31 16:10 +0200
Re: [PATCH] perf tools: Fix cross compiling error Jiri Olsa <jolsa@redhat.com> - 2015-08-31 16:10 +0200
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2015-08-28 15:00 +0200 |
| Subject | [PATCH] perf tools: Fix cross compiling error |
| Message-ID | <q2rqa-3IB-13@gated-at.bofh.it> |
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. 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@redhat.com> |
|---|---|
| Date | 2015-08-31 16:00 +0200 |
| Message-ID | <q3xMT-13i-39@gated-at.bofh.it> |
| In reply to | #1215328 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Adrian Hunter <adrian.hunter@intel.com> |
|---|---|
| Date | 2015-08-31 16:10 +0200 |
| Message-ID | <q3xWx-1u3-9@gated-at.bofh.it> |
| In reply to | #1216198 |
On 31/08/15 17:02, Jiri Olsa wrote: > On Mon, Aug 31, 2015 at 10:54:51AM -0300, Arnaldo Carvalho de Melo wrote: >> 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 > > hum, didn't you guys want to change it like this: > > libperf-$(CONFIG_X86) += tsc.o > libperf-$(CONFIG_AUXTRACE) += tsc.o > > thats why I made that fix for duplicates objects in obj-y: > 0bdede8a3e4f tools build: Allow duplicate objects in the object list Yes. I need to send V2 of my original patch "perf tools: Fix build on powerpc broken by pt/bts". Will do shortly. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2015-08-31 16:10 +0200 |
| Message-ID | <q3xWx-1u3-11@gated-at.bofh.it> |
| In reply to | #1216198 |
On Mon, Aug 31, 2015 at 10:54:51AM -0300, Arnaldo Carvalho de Melo wrote: > 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 hum, didn't you guys want to change it like this: libperf-$(CONFIG_X86) += tsc.o libperf-$(CONFIG_AUXTRACE) += tsc.o thats why I made that fix for duplicates objects in obj-y: 0bdede8a3e4f tools build: Allow duplicate objects in the object list jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web