All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Kim Phillips <kim.phillips@amd.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Ian Rogers <irogers@google.com>, Ingo Molnar <mingo@redhat.com>,
	Jiri Olsa <jolsa@redhat.com>,
	Joao Martins <joao.m.martins@oracle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Michael Petlan <mpetlan@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Robert Richter <robert.richter@amd.com>,
	Stephane Eranian <eranian@google.com>,
	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
Date: Fri, 10 Sep 2021 18:40:17 -0300	[thread overview]
Message-ID: <YTvQwQk91tM/ag0f@kernel.org> (raw)
In-Reply-To: <YTvG5ndtSQtRHte2@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 <asm/amd-ibs.h>
> >           |          ^~~~~~~~~~~~~~~
> >     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 <inttypes.h>
>  
>  #include <linux/string.h>
> -#include <asm/amd-ibs.h>
> +#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 <asm/msr-index.h>
+#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 <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memcpy_\(erms\|orig\))"'
 check arch/x86/lib/memset_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -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$"'

      reply	other threads:[~2021-09-10 21:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 22:15 [PATCH 0/3] perf report: Add support to print a textual representation of IBS raw sample data Kim Phillips
2021-08-17 22:15 ` [PATCH 1/3] perf env: Add perf_env__cpuid, perf_env__{nr_}pmu_mappings Kim Phillips
2021-08-17 22:15 ` [PATCH 2/3] perf report: Add tools/arch/x86/include/asm/amd-ibs.h Kim Phillips
2021-08-17 22:15 ` [PATCH 3/3] perf report: Add support to print a textual representation of IBS raw sample data Kim Phillips
2021-09-09 21:58 ` [PATCH 0/3] " Kim Phillips
2021-09-10 13:47   ` Arnaldo Carvalho de Melo
2021-09-10 14:08     ` Arnaldo Carvalho de Melo
2021-09-10 14:11       ` Arnaldo Carvalho de Melo
2021-09-10 14:17         ` Arnaldo Carvalho de Melo
2021-09-10 19:48           ` Another bug: " Arnaldo Carvalho de Melo
2021-09-10 20:58             ` Arnaldo Carvalho de Melo
2021-09-10 21:40               ` Arnaldo Carvalho de Melo [this message]

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=YTvQwQk91tM/ag0f@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=joao.m.martins@oracle.com \
    --cc=jolsa@redhat.com \
    --cc=kim.phillips@amd.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.