From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755669AbbHYLom (ORCPT ); Tue, 25 Aug 2015 07:44:42 -0400 Received: from mga01.intel.com ([192.55.52.88]:34908 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754784AbbHYLol (ORCPT ); Tue, 25 Aug 2015 07:44:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,745,1432623600"; d="scan'208";a="790526083" Message-ID: <55DC5485.80803@intel.com> Date: Tue, 25 Aug 2015 14:41:57 +0300 From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo CC: Sukadev Bhattiprolu , linux-kernel@vger.kernel.org Subject: Re: Build failure due to Intel PT References: <20150824185131.GA6606@us.ibm.com> <20150824200458.GD19203@kernel.org> <55DC1720.40802@intel.com> <20150825113544.GH19203@kernel.org> In-Reply-To: <20150825113544.GH19203@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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