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


Groups > linux.kernel > #1212750

Re: Build failure due to Intel PT

From Adrian Hunter <adrian.hunter@intel.com>
Newsgroups linux.kernel
Subject Re: Build failure due to Intel PT
Date 2015-08-25 09:30 +0200
Message-ID <q1gQ9-86J-1@gated-at.bofh.it> (permalink)
References <q158n-7Qs-33@gated-at.bofh.it> <q16e6-1hz-23@gated-at.bofh.it>
Organization Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki

Show all headers | View raw


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.

--
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/

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


Thread

Build failure due to Intel PT Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2015-08-24 21:00 +0200
  Re: Build failure due to Intel PT Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-24 22:10 +0200
    Re: Build failure due to Intel PT Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2015-08-24 22:50 +0200
    Re: Build failure due to Intel PT Adrian Hunter <adrian.hunter@intel.com> - 2015-08-25 09:30 +0200
      Re: Build failure due to Intel PT Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-25 13:40 +0200
        Re: Build failure due to Intel PT Adrian Hunter <adrian.hunter@intel.com> - 2015-08-25 13:50 +0200
          Re: Build failure due to Intel PT Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-25 16:30 +0200

csiph-web