Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1807525pxb; Fri, 10 Sep 2021 14:41:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaboZTlcuStWNstZpqHIHl7hgLXBFRWdyHwGyYqaaVbTHuj1v0MzPyBHR/qBQnA+LnLg53 X-Received: by 2002:a05:6638:419e:: with SMTP id az30mr6237796jab.90.1631310073949; Fri, 10 Sep 2021 14:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631310073; cv=none; d=google.com; s=arc-20160816; b=YJ5xXv5eu5Kg95n26fLS5P50Q9mdi+oocKsUyXnmLhy1gqUGCzJOqFY69XvmJNwNW3 hyvDoeNVQyEHvghkq95fqR7WVj5wlmYUZtwDS/ZrBrv8+igv4OstDvVXjfd/96LLZjnb +2ykgUT2M6nkOYmOvmVzQ21YDJrtVN8hIh0gJ3yEUWBUGUx/gLUWtNiNnRjpDPr3VdZ/ 2D6IFn+S/QO80d2ldMylCV3B2LX1xCMHll50UEXWE/kLLmn94hzsZ4KYSFXjtpzN6vVQ yEXPuU4tVIZIwC323KljAWH/B5ubK4CW3GnHUTwbCQKexkLjUSUX9WCm0F8MW17QyYAb FlxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oMOeHSYIg3yLpaiLkHhdtsk+Nrv3Nps5nPx18Po+w24=; b=GmXwMOJCZkWFuVpwVcLgBLJe3ZSbPvOQBaK7YXGcZrCQIwGemd+RAY04JBNOLWSbjJ 9641qSoSPMRn5QXidD8jpY86dSyUocy9t2eSjDk166luN1O454sinr98p7DEpUiXqicW zTbvMbBRyuP+adcwC0VJdjg4TNnrJzwhR/1uB1sSl0WJePGUzFv4Ah85PX5MyyMJuNmw 7aYcPC1iXJJxloj7ftopYMy/DZrth2UV2x7HoVT8Xomu5CYFSlom9pb2u2+7W6nf2HJC hdaj5IzuycqTcaMgh1ep6TQfxlboFV9dffwNNubwWRllrUgJaHTwOmLwV0QYPAy3P0G+ JNCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gbq9zpY6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si5246508jaa.92.2021.09.10.14.41.02; Fri, 10 Sep 2021 14:41:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gbq9zpY6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233223AbhIJVle (ORCPT + 99 others); Fri, 10 Sep 2021 17:41:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:36208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbhIJVld (ORCPT ); Fri, 10 Sep 2021 17:41:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A2C6A611F0; Fri, 10 Sep 2021 21:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631310022; bh=iVEY9VLFCJeYEo9jsUnCHylE3ARaYTaAKIEjcJoUS7U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gbq9zpY6ve25Xt9LOF9kuB3SjMvkFDq+YC2o8dQM3UyRDO2D3qXijc58rtyQS6grU RZqhUjD7qe9x/5iVPcIvkCxT4FQntuDs3RuQSxzuh+14FyiSk6RjWAw36rTzsONutj b30+nhJmfeGWbEpSAwouNfJmFu4jBzEUcyy+Exh2CnqjcI/CkacpcUEs9Zq8RANniU p3MHPRWD6ttqYSKu1DVstJv4f3mkKqvp/4eSFyYuRvWDNBJOpDKRtK3vPp1Y/JVeRK uuxl08dSYA8KAqwd8ThrRo9Hh+1lFcqYjq+52WFm+uiNF1kbcs/shbxmHptZbb/JwT 160qzuCPabpWA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id C3AB04038F; Fri, 10 Sep 2021 18:40:17 -0300 (-03) Date: Fri, 10 Sep 2021 18:40:17 -0300 From: Arnaldo Carvalho de Melo To: Kim Phillips Cc: Arnaldo Carvalho de Melo , Alexander Shishkin , Boris Ostrovsky , Ian Rogers , Ingo Molnar , Jiri Olsa , Joao Martins , Konrad Rzeszutek Wilk , Mark Rutland , Michael Petlan , Namhyung Kim , Peter Zijlstra , Robert Richter , Stephane Eranian , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: Another bug: Re: [PATCH 0/3] perf report: Add support to print a textual representation of IBS raw sample data Message-ID: References: <20210817221509.88391-1-kim.phillips@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Sep 10, 2021 at 05:58:14PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Sep 10, 2021 at 04:48:42PM -0300, Arnaldo Carvalho de Melo escreveu: > > > > All the cross builds are failing: > > > > 28 9.20 debian:experimental-x-arm64 : FAIL gcc version 10.2.1 20210110 (Debian 10.2.1-6) > > util/amd-sample-raw.c:12:10: fatal error: asm/amd-ibs.h: No such file or directory > > 12 | #include > > | ^~~~~~~~~~~~~~~ > > compilation terminated. > > Trying with the same trick used by intel-pt to build on all arches: > > diff --git a/tools/perf/util/amd-sample-raw.c b/tools/perf/util/amd-sample-raw.c > index fbb7d61c50489374..d19d765195c54b79 100644 > --- a/tools/perf/util/amd-sample-raw.c > +++ b/tools/perf/util/amd-sample-raw.c > @@ -9,7 +9,7 @@ > #include > > #include > -#include > +#include "../../arch/x86/include/asm/amd-ibs.h" > > #include "debug.h" > #include "session.h" Not enough, this one is needed for msr-index.h, same reason, a bit more involved, but check-patch.h has a few entries like that, see below. Now it seems to be ok: # export BUILD_TARBALL=http://192.168.100.2/perf/perf-5.14.0.tar.xz # dm android-ndk:r12b-arm android-ndk:r15c-arm debian:experimental-x-arm64 debian:experimental-x-mips debian:experimental-x-mips64 debian:experimental-x-mipsel fedora:24-x-ARC-uClibc fedora:34-x-ARC-glibc fedora:34-x-ARC-uClibc mageia:7 openmandriva:cooker ubuntu:16.04-x-arm ubuntu:16.04-x-arm64 ubuntu:16.04-x-powerpc ubuntu:16.04-x-powerpc64 ubuntu:16.04-x-powerpc64el ubuntu:16.04-x-s390 ubuntu:18.04-x-arm ubuntu:18.04-x-arm64 ubuntu:18.04-x-m68k ubuntu:18.04-x-powerpc ubuntu:18.04-x-powerpc64 ubuntu:18.04-x-powerpc64el ubuntu:18.04-x-riscv64 ubuntu:18.04-x-s390 ubuntu:18.04-x-sh4 ubuntu:18.04-x-sparc64 ubuntu:20.04-x-powerpc64el ubuntu:20.04-x-s390 ubuntu:21.04-x-mips ubuntu:21.04-x-mips64 1 29.83 android-ndk:r12b-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) 2 40.15 android-ndk:r15c-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) 3 49.76 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110 4 38.37 debian:experimental-x-mips : Ok mips-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110 5 45.28 debian:experimental-x-mips64 : Ok mips64-linux-gnuabi64-gcc (Debian 10.2.1-6) 10.2.1 20210110 6 45.15 debian:experimental-x-mipsel : Ok mipsel-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110 7: fedora:24-x-ARC-uClibc Some more to go, but should be ok by now. - Arnaldo diff --git a/tools/arch/x86/include/asm/amd-ibs.h b/tools/arch/x86/include/asm/amd-ibs.h index 46e1df45efc04627..174e7d83fcbdb22f 100644 --- a/tools/arch/x86/include/asm/amd-ibs.h +++ b/tools/arch/x86/include/asm/amd-ibs.h @@ -4,7 +4,7 @@ * 55898 Rev 0.35 - Feb 5, 2021 */ -#include +#include "msr-index.h" /* * IBS Hardware MSRs diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index 4a6b2b4ec5074a49..f1e46277e8226b5a 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -34,7 +34,6 @@ arch/x86/include/asm/inat_types.h arch/x86/include/asm/emulate_prefix.h arch/x86/include/asm/irq_vectors.h arch/x86/include/asm/msr-index.h -arch/x86/include/asm/amd-ibs.h arch/x86/include/uapi/asm/prctl.h arch/x86/lib/x86-opcode-map.txt arch/x86/tools/gen-insn-attr-x86.awk @@ -145,6 +144,7 @@ done # diff with extra ignore lines check arch/x86/lib/memcpy_64.S '-I "^EXPORT_SYMBOL" -I "^#include " -I"^SYM_FUNC_START\(_LOCAL\)*(memcpy_\(erms\|orig\))"' check arch/x86/lib/memset_64.S '-I "^EXPORT_SYMBOL" -I "^#include " -I"^SYM_FUNC_START\(_LOCAL\)*(memset_\(erms\|orig\))"' +check arch/x86/include/asm/amd-ibs.h '-I "^#include [<\"]\(asm/\)*msr-index.h"' check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common\(-tools\)*.h>"' check include/uapi/linux/mman.h '-I "^#include <\(uapi/\)*asm/mman.h>"' check include/linux/build_bug.h '-I "^#\(ifndef\|endif\)\( \/\/\)* static_assert$"'