* Build failure due to Intel PT
@ 2015-08-24 18:51 Sukadev Bhattiprolu
2015-08-24 20:04 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 7+ messages in thread
From: Sukadev Bhattiprolu @ 2015-08-24 18:51 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, adrian.hunter; +Cc: linux-kernel
I am trying to build perf tool on Powerpc and get this:
util/intel-pt-decoder/intel-pt-insn-decoder.c: In function ‘intel_pt_insn_decoder’:
util/intel-pt-decoder/intel-pt-insn-decoder.c:138:3: error: switch missing default case [-Werror=switch-default]
switch (insn->immediate.nbytes) {
^
cc1: all warnings being treated as errors
Besides adding a 'default' case, can this file be skipped when building on
non-x86 architectures?
I am on the perf/core branch, with HEAD pointing to:
commit c0b4dffbc529244d3e4e3bd392f2bffa2d8531a7
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Mon Aug 24 13:33:14 2015 -0300
perf annotate: Reset the dso find_symbol cache when removing symbols
Sukadev
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Build failure due to Intel PT 2015-08-24 18:51 Build failure due to Intel PT Sukadev Bhattiprolu @ 2015-08-24 20:04 ` Arnaldo Carvalho de Melo 2015-08-24 20:41 ` Sukadev Bhattiprolu 2015-08-25 7:20 ` Adrian Hunter 0 siblings, 2 replies; 7+ messages in thread From: Arnaldo Carvalho de Melo @ 2015-08-24 20:04 UTC (permalink / raw) To: Sukadev Bhattiprolu; +Cc: Adrian Hunter, linux-kernel Em Mon, Aug 24, 2015 at 11:51:31AM -0700, Sukadev Bhattiprolu escreveu: > > I am trying to build perf tool on Powerpc and get this: > > util/intel-pt-decoder/intel-pt-insn-decoder.c: In function ‘intel_pt_insn_decoder’: > util/intel-pt-decoder/intel-pt-insn-decoder.c:138:3: error: switch missing default case [-Werror=switch-default] > switch (insn->immediate.nbytes) { > ^ > cc1: all warnings being treated as errors > Besides adding a 'default' case, can this file be skipped when building on > non-x86 architectures? Not sure, what about processing a perf.data file generated on a x86 system using a PowerPC workstation? Adrian, I am assuming this is only used when postprocessing, is that right? - Arnaldo > I am on the perf/core branch, with HEAD pointing to: > > commit c0b4dffbc529244d3e4e3bd392f2bffa2d8531a7 > Author: Arnaldo Carvalho de Melo <acme@redhat.com> > Date: Mon Aug 24 13:33:14 2015 -0300 > > perf annotate: Reset the dso find_symbol cache when removing symbols > > Sukadev ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Build failure due to Intel PT 2015-08-24 20:04 ` Arnaldo Carvalho de Melo @ 2015-08-24 20:41 ` Sukadev Bhattiprolu 2015-08-25 7:20 ` Adrian Hunter 1 sibling, 0 replies; 7+ messages in thread From: Sukadev Bhattiprolu @ 2015-08-24 20:41 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: Adrian Hunter, linux-kernel Arnaldo Carvalho de Melo [acme@kernel.org] wrote: | | > Besides adding a 'default' case, can this file be skipped when building on | > non-x86 architectures? | | Not sure, what about processing a perf.data file generated on a x86 | system using a PowerPC workstation? I am not sure either. Is that well supported? Anyway, I tried to build with WERROR=0 and get link errors like: linux-acme.git/tools/perf/perf-obj/libperf.a(libperf-in.o): In function `intel_pt_synth_branch_sample': sources/linux-acme.git/tools/perf/util/intel-pt.c:871: undefined reference to `tsc_to_perf_time' linux-acme.git/tools/perf/perf-obj/libperf.a(libperf-in.o): In function `intel_pt_sample': sources/linux-acme.git/tools/perf/util/intel-pt.c:915: undefined reference to `tsc_to_perf_time' sources/linux-acme.git/tools/perf/util/intel-pt.c:962: undefined reference to `tsc_to_perf_time' linux-acme.git/tools/perf/perf-obj/libperf.a(libperf-in.o): In function `intel_pt_process_event': sources/linux-acme.git/tools/perf/util/intel-pt.c:1454: undefined reference to `perf_time_to_tsc' ... ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Build failure due to Intel PT 2015-08-24 20:04 ` Arnaldo Carvalho de Melo 2015-08-24 20:41 ` Sukadev Bhattiprolu @ 2015-08-25 7:20 ` Adrian Hunter 2015-08-25 11:35 ` Arnaldo Carvalho de Melo 1 sibling, 1 reply; 7+ messages in thread From: Adrian Hunter @ 2015-08-25 7:20 UTC (permalink / raw) To: Arnaldo Carvalho de Melo, Sukadev Bhattiprolu; +Cc: linux-kernel On 24/08/15 23:04, Arnaldo Carvalho de Melo wrote: > Em Mon, Aug 24, 2015 at 11:51:31AM -0700, Sukadev Bhattiprolu escreveu: >> >> I am trying to build perf tool on Powerpc and get this: >> >> util/intel-pt-decoder/intel-pt-insn-decoder.c: In function ‘intel_pt_insn_decoder’: >> util/intel-pt-decoder/intel-pt-insn-decoder.c:138:3: error: switch missing default case [-Werror=switch-default] >> switch (insn->immediate.nbytes) { >> ^ >> cc1: all warnings being treated as errors > >> Besides adding a 'default' case, can this file be skipped when building on >> non-x86 architectures? > > Not sure, what about processing a perf.data file generated on a x86 > system using a PowerPC workstation? > > Adrian, I am assuming this is only used when postprocessing, is that > right? Yes. I think it is good design to allow perf.data files from any architecture to be processed on any other architecture. Nevertheless, specific features can be configured out as desired. For example, in this case, the option NO_AUXTRACE would work e.g. make NO_AUXTRACE=1 CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc -C tools/perf works for me. So I will make a fix for the problems and send it in a moment. Also, I must point point out that while I missed the 'default case' error, the link errors are not entirely my fault, but were also a result of: commit ecefde629fadd3fcca2ea4c6a799d6e6aab8781f Date: Thu Feb 19 13:22:33 2015 -0500 perf tools: Only include tsc file for x86 The perf_time_to_tsc and tsc_to_perf_time functions are only used for x86. Make inclusion of tsc.c dependent on x86 as well. So it seems that people really don't want to support other architectures by default. That would mean, for example, defaulting to NO_AUXTRACE=1 for non-x86. I will make a patch for that, and Arnaldo can decide. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Build failure due to Intel PT 2015-08-25 7:20 ` Adrian Hunter @ 2015-08-25 11:35 ` Arnaldo Carvalho de Melo 2015-08-25 11:41 ` Adrian Hunter 0 siblings, 1 reply; 7+ messages in thread From: Arnaldo Carvalho de Melo @ 2015-08-25 11:35 UTC (permalink / raw) To: Adrian Hunter; +Cc: Sukadev Bhattiprolu, linux-kernel Em Tue, Aug 25, 2015 at 10:20:00AM +0300, Adrian Hunter escreveu: > On 24/08/15 23:04, Arnaldo Carvalho de Melo wrote: > > Em Mon, Aug 24, 2015 at 11:51:31AM -0700, Sukadev Bhattiprolu escreveu: > >> I am trying to build perf tool on Powerpc and get this: > >> util/intel-pt-decoder/intel-pt-insn-decoder.c: In function ‘intel_pt_insn_decoder’: > >> util/intel-pt-decoder/intel-pt-insn-decoder.c:138:3: error: switch missing default case [-Werror=switch-default] > >> switch (insn->immediate.nbytes) { > >> ^ > >> cc1: all warnings being treated as errors > >> Besides adding a 'default' case, can this file be skipped when building on > >> non-x86 architectures? > > Not sure, what about processing a perf.data file generated on a x86 > > system using a PowerPC workstation? > > Adrian, I am assuming this is only used when postprocessing, is that > > right? > Yes. I think it is good design to allow perf.data files from any > architecture to be processed on any other architecture. Nevertheless, > specific features can be configured out as desired. For example, > in this case, the option NO_AUXTRACE would work e.g. > make NO_AUXTRACE=1 CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc -C tools/perf > works for me. > So I will make a fix for the problems and send it in a moment. > Also, I must point point out that while I missed the 'default case' error, > the link errors are not entirely my fault, but were also a result of: > commit ecefde629fadd3fcca2ea4c6a799d6e6aab8781f > Date: Thu Feb 19 13:22:33 2015 -0500 > > perf tools: Only include tsc file for x86 > > The perf_time_to_tsc and tsc_to_perf_time functions are only used for x86. > > Make inclusion of tsc.c dependent on x86 as well. > > So it seems that people really don't want to support other architectures > by default. That would mean, for example, defaulting to NO_AUXTRACE=1 > for non-x86. I will make a patch for that, and Arnaldo can decide. Humm, misunderstandings happen, so if that thing needs to be reverted, we should do it, and fix the problem to keep the property of being able to 'perf report' any perf.data file, even the ones that were generated on another arch. And detect if there are cross compilers installed and add those to the 'make -C tools/perf build-perf'. I just installed gcc-powerpc64-linux-gnu, will try to use that with build-perf. - Arnaldo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Build failure due to Intel PT 2015-08-25 11:35 ` Arnaldo Carvalho de Melo @ 2015-08-25 11:41 ` Adrian Hunter 2015-08-25 14:24 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 7+ messages in thread From: Adrian Hunter @ 2015-08-25 11:41 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: Sukadev Bhattiprolu, linux-kernel On 25/08/15 14:35, Arnaldo Carvalho de Melo wrote: > Em Tue, Aug 25, 2015 at 10:20:00AM +0300, Adrian Hunter escreveu: >> On 24/08/15 23:04, Arnaldo Carvalho de Melo wrote: >>> Em Mon, Aug 24, 2015 at 11:51:31AM -0700, Sukadev Bhattiprolu escreveu: >>>> I am trying to build perf tool on Powerpc and get this: > >>>> util/intel-pt-decoder/intel-pt-insn-decoder.c: In function ‘intel_pt_insn_decoder’: >>>> util/intel-pt-decoder/intel-pt-insn-decoder.c:138:3: error: switch missing default case [-Werror=switch-default] >>>> switch (insn->immediate.nbytes) { >>>> ^ >>>> cc1: all warnings being treated as errors > >>>> Besides adding a 'default' case, can this file be skipped when building on >>>> non-x86 architectures? > >>> Not sure, what about processing a perf.data file generated on a x86 >>> system using a PowerPC workstation? > >>> Adrian, I am assuming this is only used when postprocessing, is that >>> right? > >> Yes. I think it is good design to allow perf.data files from any >> architecture to be processed on any other architecture. Nevertheless, >> specific features can be configured out as desired. For example, >> in this case, the option NO_AUXTRACE would work e.g. > >> make NO_AUXTRACE=1 CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc -C tools/perf > >> works for me. > >> So I will make a fix for the problems and send it in a moment. > >> Also, I must point point out that while I missed the 'default case' error, >> the link errors are not entirely my fault, but were also a result of: > >> commit ecefde629fadd3fcca2ea4c6a799d6e6aab8781f >> Date: Thu Feb 19 13:22:33 2015 -0500 >> >> perf tools: Only include tsc file for x86 >> >> The perf_time_to_tsc and tsc_to_perf_time functions are only used for x86. >> >> Make inclusion of tsc.c dependent on x86 as well. >> >> So it seems that people really don't want to support other architectures >> by default. That would mean, for example, defaulting to NO_AUXTRACE=1 > >> for non-x86. I will make a patch for that, and Arnaldo can decide. > > Humm, misunderstandings happen, so if that thing needs to be reverted, > we should do it, and fix the problem to keep the property of being able > to 'perf report' any perf.data file, even the ones that were generated > on another arch. > > And detect if there are cross compilers installed and add those to the > 'make -C tools/perf build-perf'. > > I just installed gcc-powerpc64-linux-gnu, will try to use that with > build-perf. Just in case you didn't see them, note that I sent fixes: [PATCH 1/2] perf tools: Fix build on powerpc broken by pt/bts [PATCH 2/2] perf tools: Make NO_AUXTRACE default for non-x86 architectures ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Build failure due to Intel PT 2015-08-25 11:41 ` Adrian Hunter @ 2015-08-25 14:24 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 7+ messages in thread From: Arnaldo Carvalho de Melo @ 2015-08-25 14:24 UTC (permalink / raw) To: Adrian Hunter; +Cc: Sukadev Bhattiprolu, linux-kernel Em Tue, Aug 25, 2015 at 02:41:57PM +0300, Adrian Hunter escreveu: > On 25/08/15 14:35, Arnaldo Carvalho de Melo wrote: > > Em Tue, Aug 25, 2015 at 10:20:00AM +0300, Adrian Hunter escreveu: > >> On 24/08/15 23:04, Arnaldo Carvalho de Melo wrote: > >>> Em Mon, Aug 24, 2015 at 11:51:31AM -0700, Sukadev Bhattiprolu escreveu: > >>>> I am trying to build perf tool on Powerpc and get this: > > > >>>> util/intel-pt-decoder/intel-pt-insn-decoder.c: In function ‘intel_pt_insn_decoder’: > >>>> util/intel-pt-decoder/intel-pt-insn-decoder.c:138:3: error: switch missing default case [-Werror=switch-default] > >>>> switch (insn->immediate.nbytes) { > >>>> ^ > >>>> cc1: all warnings being treated as errors > > > >>>> Besides adding a 'default' case, can this file be skipped when building on > >>>> non-x86 architectures? > > > >>> Not sure, what about processing a perf.data file generated on a x86 > >>> system using a PowerPC workstation? > > > >>> Adrian, I am assuming this is only used when postprocessing, is that > >>> right? > > > >> Yes. I think it is good design to allow perf.data files from any > >> architecture to be processed on any other architecture. Nevertheless, > >> specific features can be configured out as desired. For example, > >> in this case, the option NO_AUXTRACE would work e.g. > > > >> make NO_AUXTRACE=1 CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc -C tools/perf > > > >> works for me. > > > >> So I will make a fix for the problems and send it in a moment. > > > >> Also, I must point point out that while I missed the 'default case' error, > >> the link errors are not entirely my fault, but were also a result of: > > > >> commit ecefde629fadd3fcca2ea4c6a799d6e6aab8781f > >> Date: Thu Feb 19 13:22:33 2015 -0500 > >> > >> perf tools: Only include tsc file for x86 > >> > >> The perf_time_to_tsc and tsc_to_perf_time functions are only used for x86. > >> > >> Make inclusion of tsc.c dependent on x86 as well. > >> > >> So it seems that people really don't want to support other architectures > >> by default. That would mean, for example, defaulting to NO_AUXTRACE=1 > > > >> for non-x86. I will make a patch for that, and Arnaldo can decide. > > > > Humm, misunderstandings happen, so if that thing needs to be reverted, > > we should do it, and fix the problem to keep the property of being able > > to 'perf report' any perf.data file, even the ones that were generated > > on another arch. > > > > And detect if there are cross compilers installed and add those to the > > 'make -C tools/perf build-perf'. > > > > I just installed gcc-powerpc64-linux-gnu, will try to use that with > > build-perf. > > Just in case you didn't see them, note that I sent fixes: I saw both, I think 1/2 should be applied, but not the other one, i.e. we should default to building a binary that is capable of processing any perf.data file. - Arnaldo > [PATCH 1/2] perf tools: Fix build on powerpc broken by pt/bts > [PATCH 2/2] perf tools: Make NO_AUXTRACE default for non-x86 architectures ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-08-25 14:24 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-08-24 18:51 Build failure due to Intel PT Sukadev Bhattiprolu 2015-08-24 20:04 ` Arnaldo Carvalho de Melo 2015-08-24 20:41 ` Sukadev Bhattiprolu 2015-08-25 7:20 ` Adrian Hunter 2015-08-25 11:35 ` Arnaldo Carvalho de Melo 2015-08-25 11:41 ` Adrian Hunter 2015-08-25 14:24 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox