linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Yanteng Si <siyanteng@loongson.cn>
Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	namhyung@kernel.org, irogers@google.com, adrian.hunter@intel.com,
	linux-perf-users@vger.kernel.org,
	loongson-kernel@lists.loongnix.cn, Leo Yan <leo.yan@linaro.org>,
	James Clark <james.clark@arm.com>,
	German Gomez <german.gomez@arm.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Mike Leach <mike.leach@linaro.org>, Will Deacon <will@kernel.org>
Subject: Re: [PATCH v2 17/17] tools arch arm64: Sync the perf_regs headers with the kernel sources
Date: Wed, 10 May 2023 12:26:41 -0300	[thread overview]
Message-ID: <ZFu3sY4AuuCGb9Nw@kernel.org> (raw)
In-Reply-To: <84e48c9d165a71c30b7a299baaa87a22c578ca0a.1683712945.git.siyanteng@loongson.cn>

Em Wed, May 10, 2023 at 06:25:24PM +0800, Yanteng Si escreveu:
> Picking the changes from:
> 
>   commit aa3e49b606e0796a ("arm64: asm/perf_regs.h: Avoid C++-style
>    comment in UAPI header")
>   commit 2ee0d7fd36a3f87b ("ARM64: perf: add support for perf
>    registers API")
>   commit cbb0c02caf4bd98b ("perf: arm64: Add SVE vector granule
>    register to user regs")
> 
> Silencing these perf build warnings:
> 
>   Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi
>    /asm/perf_regs.h' differs from latest version at 'arch/arm64
>     /include/uapi/asm/perf_regs.h'
>   diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64
>    /include/uapi/asm/perf_regs.h
> 
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
>  tools/arch/arm64/include/uapi/asm/perf_regs.h | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/arch/arm64/include/uapi/asm/perf_regs.h b/tools/arch/arm64/include/uapi/asm/perf_regs.h
> index fd157f46727e..86e556429e0e 100644
> --- a/tools/arch/arm64/include/uapi/asm/perf_regs.h
> +++ b/tools/arch/arm64/include/uapi/asm/perf_regs.h
> @@ -36,11 +36,13 @@ enum perf_event_arm_regs {
>  	PERF_REG_ARM64_LR,
>  	PERF_REG_ARM64_SP,
>  	PERF_REG_ARM64_PC,
> +	PERF_REG_ARM64_MAX,
>  
>  	/* Extended/pseudo registers */
> -	PERF_REG_ARM64_VG = 46, // SVE Vector Granule
> -
> -	PERF_REG_ARM64_MAX = PERF_REG_ARM64_PC + 1,
> -	PERF_REG_ARM64_EXTENDED_MAX = PERF_REG_ARM64_VG + 1
> +	PERF_REG_ARM64_VG = 46,				/* SVE Vector Granule */
> +	PERF_REG_ARM64_EXTENDED_MAX
>  };
> +
> +#define PERF_REG_EXTENDED_MASK	(1ULL << PERF_REG_ARM64_VG)
> +
>  #endif /* _ASM_ARM64_PERF_REGS_H */

This needs some more work, note that -DCORESIGHT=1 in the make command line.

I added some ARM folks that may help you,

- Arnaldo

  CC      /tmp/build/perf-tools/util/arm64-frame-pointer-unwind-support.o
  CC      /tmp/build/perf-tools/util/perf_regs.o
  CC      /tmp/build/perf-tools/util/header.o
In file included from util/arm64-frame-pointer-unwind-support.c:9:
util/../../arch/arm64/include/uapi/asm/perf_regs.h:46: error: "PERF_REG_EXTENDED_MASK" redefined [-Werror]
   46 | #define PERF_REG_EXTENDED_MASK  (1ULL << PERF_REG_ARM64_VG)
      | 
In file included from /var/home/acme/git/perf-tools/tools/perf/arch/x86/include/perf_regs.h:7,
                 from util/perf_regs.h:33,
                 from util/arm64-frame-pointer-unwind-support.c:5:
/var/home/acme/git/perf-tools/tools/arch/x86/include/uapi/asm/perf_regs.h:56: note: this is the location of the previous definition
   56 | #define PERF_REG_EXTENDED_MASK  (~((1ULL << PERF_REG_X86_XMM0) - 1))
      | 
cc1: all warnings being treated as errors
make[4]: *** [/var/home/acme/git/perf-tools/tools/build/Makefile.build:97: /tmp/build/perf-tools/util/arm64-frame-pointer-unwind-support.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from util/perf_regs.c:26:
util/../../arch/arm64/include/uapi/asm/perf_regs.h:46: error: "PERF_REG_EXTENDED_MASK" redefined [-Werror]
   46 | #define PERF_REG_EXTENDED_MASK  (1ULL << PERF_REG_ARM64_VG)
      | 
In file included from /var/home/acme/git/perf-tools/tools/perf/arch/x86/include/perf_regs.h:7,
                 from util/perf_regs.h:33,
                 from util/perf_regs.c:4:
/var/home/acme/git/perf-tools/tools/arch/x86/include/uapi/asm/perf_regs.h:56: note: this is the location of the previous definition
   56 | #define PERF_REG_EXTENDED_MASK  (~((1ULL << PERF_REG_X86_XMM0) - 1))
      | 
cc1: all warnings being treated as errors
make[4]: *** [/var/home/acme/git/perf-tools/tools/build/Makefile.build:97: /tmp/build/perf-tools/util/perf_regs.o] Error 1
make[3]: *** [/var/home/acme/git/perf-tools/tools/build/Makefile.build:140: util] Error 2
make[2]: *** [Makefile.perf:676: /tmp/build/perf-tools/perf-in.o] Error 2
make[1]: *** [Makefile.perf:236: sub-make] Error 2
make: *** [Makefile:113: install-bin] Error 2
make: Leaving directory '/var/home/acme/git/perf-tools/tools/perf'

 Performance counter stats for 'make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf-tools -C tools/perf install-bin':

       12326009385      cycles:u                                                              
       20646679547      instructions:u                   #    1.68  insn per cycle            

       4.225375000 seconds time elapsed

       2.853093000 seconds user
       1.630218000 seconds sys


⬢[acme@toolbox perf-tools]$

  reply	other threads:[~2023-05-10 15:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 10:21 [PATCH v2 00/17] tools perf: fix build warnings Yanteng Si
2023-05-10 10:21 ` [PATCH v2 01/17] tools headers UAPI: Sync the linux/in.h with the kernel sources Yanteng Si
2023-05-10 10:21 ` [PATCH v2 02/17] tools headers UAPI: Sync the linux/prctl.h " Yanteng Si
2023-05-10 10:21 ` [PATCH v2 03/17] tools headers UAPI: Sync the drm/drm.h " Yanteng Si
2023-05-10 10:22 ` [PATCH v2 04/17] tools headers UAPI: Sync the i915_drm.h " Yanteng Si
2023-05-10 10:22 ` [PATCH v2 05/17] tools headers UAPI: Sync the coresight-pmu headers copy " Yanteng Si
2023-05-10 15:41   ` Arnaldo Carvalho de Melo
2023-05-22  9:56     ` James Clark
2023-05-10 10:22 ` [PATCH v2 06/17] tools headers UAPI: Sync the linux/const.h with the kernel headers Yanteng Si
2023-05-10 10:22 ` [PATCH v2 07/17] tools headers UAPI: Sync the linux/perf_event.h " Yanteng Si
2023-05-10 15:44   ` Arnaldo Carvalho de Melo
2023-05-10 10:24 ` [PATCH v2 08/17] tools include UAPI: Sync the sound/asound.h copy with the kernel sources Yanteng Si
2023-05-10 10:24 ` [PATCH v2 09/17] tools headers UAPI: Sync the linux/mman.h " Yanteng Si
2023-05-10 10:24 ` [PATCH v2 10/17] tools headers UAPI: Sync the unistd " Yanteng Si
2023-05-10 10:24 ` [PATCH v2 11/17] tools headers kvm: Sync uapi/{asm/linux} kvm.h headers " Yanteng Si
2023-05-10 10:24 ` [PATCH v2 12/17] tools arch x86: Sync the disabled-features " Yanteng Si
2023-05-10 10:24 ` [PATCH v2 13/17] tools arch x86: Sync the memcpy_64 " Yanteng Si
2023-05-10 15:48   ` Arnaldo Carvalho de Melo
2023-05-10 10:24 ` [PATCH v2 14/17] tools arch x86: Sync the cpufeatures " Yanteng Si
2023-05-10 10:24 ` [PATCH v2 15/17] tools arch x86: Sync the msr-index.h copy " Yanteng Si
2023-05-10 10:25 ` [PATCH v2 16/17] tools arch x86: Sync the prctl headers " Yanteng Si
2023-05-10 10:25 ` [PATCH v2 17/17] tools arch arm64: Sync the perf_regs " Yanteng Si
2023-05-10 15:26   ` Arnaldo Carvalho de Melo [this message]
2023-05-15  4:08     ` Leo Yan
2023-05-20  3:11       ` Leo Yan
2023-05-10 17:06 ` [PATCH v2 00/17] tools perf: fix build warnings Arnaldo Carvalho de Melo
2023-05-15 11:08   ` Yanteng Si

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=ZFu3sY4AuuCGb9Nw@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=german.gomez@arm.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=siyanteng@loongson.cn \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).