public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Build failure due to Intel PT
Date: Tue, 25 Aug 2015 10:20:00 +0300	[thread overview]
Message-ID: <55DC1720.40802@intel.com> (raw)
In-Reply-To: <20150824200458.GD19203@kernel.org>

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.


  parent reply	other threads:[~2015-08-25  7:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=55DC1720.40802@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sukadev@linux.vnet.ibm.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