From nobody Sun Feb 8 11:26:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29AA970CC5; Thu, 14 Mar 2024 14:43:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710427410; cv=none; b=UzgpiADwmTamhKtxuU3HjkIwc934ULUHX4min2gjtX7Idrk3biUcyYlPo9gEoBmTXKo5aU5JE5mPrvf0Jf/DL6T7DBNuHvsQ+Rv+rVwdsWv1POInr+I+BsEXPfya/fCHpg16GZ4FpC8fbEMY5cpRDfRCgerFN1mOE5iYHAZAx1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710427410; c=relaxed/simple; bh=4/2Ns/Hq0Rs34aMNvef4R5Xss7mQNMjLMM4CeUMLvx8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EZ2ipMKHasMRLnBBySLjlTHIL3VN01Zbzxi3nFgHd4uyL4i/Rc9VzTemTzgYz8ltjBodNUd+RYu/nKCG6VdPyP30kKcOLG8//sNtDHKr/tPCnlOx0JARAS0NxP4OPRjQ92DT9wfQ0869CTymhrGOWfJZiLf8hG4vI2uPMLh8HEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UL8gJ98w; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UL8gJ98w" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EE16C433A6; Thu, 14 Mar 2024 14:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710427410; bh=4/2Ns/Hq0Rs34aMNvef4R5Xss7mQNMjLMM4CeUMLvx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UL8gJ98w0flwQfFABIjrdl5/TenDw20tyvagKuqPKNUnscVStyLfAq8OlvE/G2KYY fAubKZDL/YKsQhr0oFQrjKoDxMRAhLwwS7GI09o975IfiSwwB6MMaBfzEx64wKUFMc DN7vG60QGr71vhvIjmbozdNjBq8go6LDNb+cXLzf9Dd253Iuedqp9LfcCfhi8SGz7T Xe0omP78UOp9+f4VE14VuEF5vcC4Yefo7rLChZ4L5pT2TABNkh3ydVhDFkJ5nzJseu vInz41YVLvkiNf4SnPllNpT44lyq/oebkYpwuTs91dtHOEmRgLmk+2HkEJldXvS2uA KK85xD+poaF1Q== From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 1/3] perf beauty: Move uapi/linux/usbdevice_fs.h copy out of the directory used to build perf Date: Thu, 14 Mar 2024 11:43:18 -0300 Message-ID: <20240314144320.743217-2-acme@kernel.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240314144320.743217-1-acme@kernel.org> References: <20240314144320.743217-1-acme@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnaldo Carvalho de Melo It is mostly used only to generate string tables, not to build perf, so move it to the tools/perf/trace/beauty/include/ hierarchy, that is used just for scrapping. This is a something that should've have happened, as happened with the linux/socket.h scrapper, do it now as Ian suggested while doing an audit/refactor session in the headers used by perf. No other tools/ living code uses it, just coming from either 'make install_headers' or from the system /usr/include/ directory. Suggested-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/CAP-5=3DfWZVrpRufO4w-S4EcSi9STXcTAN2ERLw= TSN7yrSSA-otQ@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.perf | 4 ++-- tools/perf/check-headers.sh | 2 +- .../trace/beauty}/include/uapi/linux/usbdevice_fs.h | 0 tools/perf/trace/beauty/usbdevfs_ioctl.sh | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) rename tools/{ =3D> perf/trace/beauty}/include/uapi/linux/usbdevice_fs.h (= 100%) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 523c3b7d6c9d3f51..53ec3765b4b2bd1b 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -623,8 +623,8 @@ $(prctl_option_array): $(prctl_hdr_dir)/prctl.h $(prctl= _option_tbl) usbdevfs_ioctl_array :=3D $(beauty_ioctl_outdir)/usbdevfs_ioctl_array.c usbdevfs_ioctl_tbl :=3D $(srctree)/tools/perf/trace/beauty/usbdevfs_ioctl.= sh =20 -$(usbdevfs_ioctl_array): $(linux_uapi_dir)/usbdevice_fs.h $(usbdevfs_ioctl= _tbl) - $(Q)$(SHELL) '$(usbdevfs_ioctl_tbl)' $(linux_uapi_dir) > $@ +$(usbdevfs_ioctl_array): $(beauty_uapi_linux_dir)/usbdevice_fs.h $(usbdevf= s_ioctl_tbl) + $(Q)$(SHELL) '$(usbdevfs_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@ =20 x86_arch_prctl_code_array :=3D $(beauty_outdir)/x86_arch_prctl_code_array.c x86_arch_prctl_code_tbl :=3D $(srctree)/tools/perf/trace/beauty/x86_arch_p= rctl.sh diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index c2c26d6b87ef52f9..356ddb76a9541018 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -21,7 +21,6 @@ FILES=3D( "include/uapi/linux/sched.h" "include/uapi/linux/seccomp.h" "include/uapi/linux/stat.h" - "include/uapi/linux/usbdevice_fs.h" "include/uapi/linux/vhost.h" "include/uapi/sound/asound.h" "include/linux/bits.h" @@ -98,6 +97,7 @@ BEAUTY_FILES=3D( "include/linux/socket.h" "include/uapi/linux/fs.h" "include/uapi/linux/mount.h" + "include/uapi/linux/usbdevice_fs.h" ) =20 declare -a FAILURES diff --git a/tools/include/uapi/linux/usbdevice_fs.h b/tools/perf/trace/bea= uty/include/uapi/linux/usbdevice_fs.h similarity index 100% rename from tools/include/uapi/linux/usbdevice_fs.h rename to tools/perf/trace/beauty/include/uapi/linux/usbdevice_fs.h diff --git a/tools/perf/trace/beauty/usbdevfs_ioctl.sh b/tools/perf/trace/b= eauty/usbdevfs_ioctl.sh index b39cfb3720b80624..12a30a9a8e0c8f44 100755 --- a/tools/perf/trace/beauty/usbdevfs_ioctl.sh +++ b/tools/perf/trace/beauty/usbdevfs_ioctl.sh @@ -1,21 +1,21 @@ #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 =20 -[ $# -eq 1 ] && header_dir=3D$1 || header_dir=3Dtools/include/uapi/linux/ +[ $# -eq 1 ] && beauty_uapi_linux_dir=3D$1 || beauty_uapi_linux_dir=3Dtool= s/perf/trace/beauty/include/uapi/linux/ =20 # also as: # #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) =20 printf "static const char *usbdevfs_ioctl_cmds[] =3D {\n" regex=3D"^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)(\(\w+\))?[[:space:= ]]+_IO[CWR]{0,2}\([[:space:]]*(_IOC_\w+,[[:space:]]*)?'U'[[:space:]]*,[[:sp= ace:]]*([[:digit:]]+).*" -grep -E "$regex" ${header_dir}/usbdevice_fs.h | grep -E -v 'USBDEVFS_\w+32= [[:space:]]' | \ +grep -E "$regex" ${beauty_uapi_linux_dir}/usbdevice_fs.h | grep -E -v 'USB= DEVFS_\w+32[[:space:]]' | \ sed -r "s/$regex/\4 \1/g" | \ sort | xargs printf "\t[%s] =3D \"%s\",\n" printf "};\n\n" printf "#if 0\n" printf "static const char *usbdevfs_ioctl_32_cmds[] =3D {\n" regex=3D"^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)[[:space:]]+_IO[WR]= {0,2}\([[:space:]]*'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*" -grep -E $regex ${header_dir}/usbdevice_fs.h | grep -E 'USBDEVFS_\w+32[[:sp= ace:]]' | \ +grep -E $regex ${beauty_uapi_linux_dir}/usbdevice_fs.h | grep -E 'USBDEVFS= _\w+32[[:space:]]' | \ sed -r "s/$regex/\2 \1/g" | \ sort | xargs printf "\t[%s] =3D \"%s\",\n" printf "};\n" --=20 2.43.2 From nobody Sun Feb 8 11:26:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 965227172A; Thu, 14 Mar 2024 14:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710427412; cv=none; b=cfBZahJnUbUV+uLtMhzQeEuWRYlt4BsX3ry5GLzU22xhncySqHLN3L4RCLnPeDICLmHYTpPtc3WoizZSrCfPJNxj/ckzfz1H4Ip5FqWACiUNj53Ii2Dp5K8U7Vry4l0Rr+r3UVeQw+0Ns6en/iU2kX+voaEPPuhbFbja7b2gJwM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710427412; c=relaxed/simple; bh=0CsKTVsV7I+F+KykRRbGJEPArCzk7FL+LI861CU65N0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pOLmK2DefqbfDQwachXDPR7EEnUu0llLLyE2cYec0Tz9V2YXnscCOiry1QO+g91KsvMnXh//GQmy2g54BuHWgyEXwhz0uhQ6DZLaqpff1LnxusZrg+JYZEMzh+tecawqd8f1309X7uwd3jImBOo5w0DUZuvU5F8eES7fjt8PQR8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GpE60dsJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GpE60dsJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70645C43399; Thu, 14 Mar 2024 14:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710427412; bh=0CsKTVsV7I+F+KykRRbGJEPArCzk7FL+LI861CU65N0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GpE60dsJ9Lx2kwlqP/6aen34iZ0dgQzlN111pLhGg/BfgNKCE/5Fqwn8BejvEc+x6 qG4KtFOOho4sycRcJ51odIluFOVjuogkAC4tlngSc63zZ3+W7qwS/aEt93W0eRDKzS yBfOUy0vhL1SGfkf732/hpgr3fFsB8i0gOpatJloe4G1XxH3v2U3U4w5hMXChi1QGV tnxWCfCayNHKbY+dmh8m8vi7HZ6hES1a/K7uCcrt9kELe5V2rwvwA31TODCEa+5x33 2lr47My4cmGbMFSqe9BNq7vDZopzfcbL2wPBrY6knXc//+j9+R83tyro4HEPH/Ov2K h5py27EwFsHcQ== From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 2/3] perf beauty: Move uapi/sound/asound.h copy out of the directory used to build perf Date: Thu, 14 Mar 2024 11:43:19 -0300 Message-ID: <20240314144320.743217-3-acme@kernel.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240314144320.743217-1-acme@kernel.org> References: <20240314144320.743217-1-acme@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnaldo Carvalho de Melo It is used only to generate string tables, not to build perf, so move it to the tools/perf/trace/beauty/include/ hierarchy, that is used just for scrapping. This is a something that should've have happened, as happened with the linux/socket.h scrapper, do it now as Ian suggested while doing an audit/refactor session in the headers used by perf. Suggested-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/CAP-5=3DfWZVrpRufO4w-S4EcSi9STXcTAN2ERLw= TSN7yrSSA-otQ@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.perf | 9 +++++---- tools/perf/check-headers.sh | 2 +- .../{ =3D> perf/trace/beauty}/include/uapi/sound/asound.h | 0 tools/perf/trace/beauty/sndrv_ctl_ioctl.sh | 4 ++-- tools/perf/trace/beauty/sndrv_pcm_ioctl.sh | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) rename tools/{ =3D> perf/trace/beauty}/include/uapi/sound/asound.h (100%) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 53ec3765b4b2bd1b..757777d968602ded 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -473,6 +473,7 @@ arm64-sysreg-defs-clean: =20 beauty_linux_dir :=3D $(srctree)/tools/perf/trace/beauty/include/linux/ beauty_uapi_linux_dir :=3D $(srctree)/tools/perf/trace/beauty/include/uapi= /linux/ +beauty_uapi_sound_dir :=3D $(srctree)/tools/perf/trace/beauty/include/uapi= /sound/ linux_uapi_dir :=3D $(srctree)/tools/include/uapi/linux asm_generic_uapi_dir :=3D $(srctree)/tools/include/uapi/asm-generic arch_asm_uapi_dir :=3D $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/ @@ -526,15 +527,15 @@ sndrv_ctl_ioctl_array :=3D $(beauty_ioctl_outdir)/snd= rv_ctl_ioctl_array.c sndrv_ctl_hdr_dir :=3D $(srctree)/tools/include/uapi/sound sndrv_ctl_ioctl_tbl :=3D $(srctree)/tools/perf/trace/beauty/sndrv_ctl_ioct= l.sh =20 -$(sndrv_ctl_ioctl_array): $(sndrv_ctl_hdr_dir)/asound.h $(sndrv_ctl_ioctl_= tbl) - $(Q)$(SHELL) '$(sndrv_ctl_ioctl_tbl)' $(sndrv_ctl_hdr_dir) > $@ +$(sndrv_ctl_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_ctl_io= ctl_tbl) + $(Q)$(SHELL) '$(sndrv_ctl_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@ =20 sndrv_pcm_ioctl_array :=3D $(beauty_ioctl_outdir)/sndrv_pcm_ioctl_array.c sndrv_pcm_hdr_dir :=3D $(srctree)/tools/include/uapi/sound sndrv_pcm_ioctl_tbl :=3D $(srctree)/tools/perf/trace/beauty/sndrv_pcm_ioct= l.sh =20 -$(sndrv_pcm_ioctl_array): $(sndrv_pcm_hdr_dir)/asound.h $(sndrv_pcm_ioctl_= tbl) - $(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(sndrv_pcm_hdr_dir) > $@ +$(sndrv_pcm_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_pcm_io= ctl_tbl) + $(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@ =20 kcmp_type_array :=3D $(beauty_outdir)/kcmp_type_array.c kcmp_hdr_dir :=3D $(srctree)/tools/include/uapi/linux/ diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index 356ddb76a9541018..93ad7a787a19d550 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -22,7 +22,6 @@ FILES=3D( "include/uapi/linux/seccomp.h" "include/uapi/linux/stat.h" "include/uapi/linux/vhost.h" - "include/uapi/sound/asound.h" "include/linux/bits.h" "include/vdso/bits.h" "include/linux/const.h" @@ -98,6 +97,7 @@ BEAUTY_FILES=3D( "include/uapi/linux/fs.h" "include/uapi/linux/mount.h" "include/uapi/linux/usbdevice_fs.h" + "include/uapi/sound/asound.h" ) =20 declare -a FAILURES diff --git a/tools/include/uapi/sound/asound.h b/tools/perf/trace/beauty/in= clude/uapi/sound/asound.h similarity index 100% rename from tools/include/uapi/sound/asound.h rename to tools/perf/trace/beauty/include/uapi/sound/asound.h diff --git a/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh b/tools/perf/trace/= beauty/sndrv_ctl_ioctl.sh index e0803b9575932420..572939a1288455a4 100755 --- a/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh +++ b/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh @@ -1,9 +1,9 @@ #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 =20 -[ $# -eq 1 ] && header_dir=3D$1 || header_dir=3Dtools/include/uapi/sound/ +[ $# -eq 1 ] && beauty_uapi_sound_dir=3D$1 || beauty_uapi_sound_dir=3Dtool= s/perf/trace/beauty/include/uapi/sound/ =20 printf "static const char *sndrv_ctl_ioctl_cmds[] =3D {\n" -grep "^#define[\t ]\+SNDRV_CTL_IOCTL_" $header_dir/asound.h | \ +grep "^#define[\t ]\+SNDRV_CTL_IOCTL_" $beauty_uapi_sound_dir/asound.h | \ sed -r 's/^#define +SNDRV_CTL_IOCTL_([A-Z0-9_]+)[\t ]+_IO[RW]*\( *.U., *(= 0x[[:xdigit:]]+),?.*/\t[\2] =3D \"\1\",/g' printf "};\n" diff --git a/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh b/tools/perf/trace/= beauty/sndrv_pcm_ioctl.sh index 7a464a7bf91399bf..33afae9a1c07ca5e 100755 --- a/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh +++ b/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh @@ -1,9 +1,9 @@ #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 =20 -[ $# -eq 1 ] && header_dir=3D$1 || header_dir=3Dtools/include/uapi/sound/ +[ $# -eq 1 ] && beauty_uapi_sound_dir=3D$1 || beauty_uapi_sound_dir=3Dtool= s/perf/trace/beauty/include/uapi/sound/ =20 printf "static const char *sndrv_pcm_ioctl_cmds[] =3D {\n" -grep "^#define[\t ]\+SNDRV_PCM_IOCTL_" $header_dir/asound.h | \ +grep "^#define[\t ]\+SNDRV_PCM_IOCTL_" $beauty_uapi_sound_dir/asound.h | \ sed -r 's/^#define +SNDRV_PCM_IOCTL_([A-Z0-9_]+)[\t ]+_IO[RW]*\( *.A., *(= 0x[[:xdigit:]]+),?.*/\t[\2] =3D \"\1\",/g' printf "};\n" --=20 2.43.2 From nobody Sun Feb 8 11:26:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CA9071746; Thu, 14 Mar 2024 14:43:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710427414; cv=none; b=o5h1970uGtVyLCp9TKxKKiUyv81ly7Y3T9cb6zHNw05hsZudnTt6v9rTzUVbk+BbHebT1zQfd6YnZqRwqnGujuWcKQYE0O+mxYc/v8/LTcm8MSBeQlVqnMlIMAMUQKxWtNzfjlk3k35Ed/RaXNY5ULcKzOwAbiELy4P2ZM3Nh6A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710427414; c=relaxed/simple; bh=FeH9KIAieASP7N2t5QySoaSYptggQ1Z30dxYLQNICXQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k98wGHBo0+0Yk6qJte4D6QHlSmOHb/yMeO4XDohTID9XEbVdkAqYksSdCv2bgS6v++3qxHVmAr6uxJhOXc/k8rK3knQthiHg5/wST2zKQOggGHkZwMxYGlhWVlvm0WOa3UoEOJs7QdfB74vQT89/pdpCdKxE0+KAeU4cx/+PWZg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XIOenNHV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XIOenNHV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82EA7C433F1; Thu, 14 Mar 2024 14:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710427414; bh=FeH9KIAieASP7N2t5QySoaSYptggQ1Z30dxYLQNICXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XIOenNHVZpNt3pfknt2SSY2kcFbS/Kr/6DCda5U8iT/UfA5s7nl8GqQHmxaIB8ReR 6pdimDvMf4YFbg0OCQuViRiGrIK9aTuJuYuwOrGwk4W87+WPWoJAbQjOB9HWUHhrb+ 1voaqPoE9I44L+MiXZRmUg0TYmdNTQiO33eR8tp5yLoxb6JnOs3bOSk/ZiV0DSrkMy wFeJTRX1H3mUiwHKsRXNcyyk75Mzayaw3XDs97Lgpn6nh39MBbUKGavShnoKVa/rWh KUOKFZ1PgZWMhRoGHVkfbmj6ZrD4BtltLW9FIM4UsRh4wvAE9opB1+YiTBrfLz4vOR 3ApvnVqClY8yQ== From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 3/3] perf beauty: Move arch/x86/include/asm/irq_vectors.h copy out of the directory used to build perf Date: Thu, 14 Mar 2024 11:43:20 -0300 Message-ID: <20240314144320.743217-4-acme@kernel.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240314144320.743217-1-acme@kernel.org> References: <20240314144320.743217-1-acme@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnaldo Carvalho de Melo It is used only to generate string tables, not to build perf, so move it to the tools/perf/trace/beauty/include/ hierarchy, that is used just for scrapping. This is a something that should've have happened, as happened with the linux/socket.h scrapper, do it now as Ian suggested while doing an audit/refactor session in the headers used by perf. No other tools/ living code uses it. Suggested-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/CAP-5=3DfWZVrpRufO4w-S4EcSi9STXcTAN2ERLw= TSN7yrSSA-otQ@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.perf | 6 ++++-- tools/perf/check-headers.sh | 2 +- .../trace/beauty}/arch/x86/include/asm/irq_vectors.h | 0 tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) rename tools/{ =3D> perf/trace/beauty}/arch/x86/include/asm/irq_vectors.h = (100%) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 757777d968602ded..c75342b21089fc6f 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -474,6 +474,8 @@ arm64-sysreg-defs-clean: beauty_linux_dir :=3D $(srctree)/tools/perf/trace/beauty/include/linux/ beauty_uapi_linux_dir :=3D $(srctree)/tools/perf/trace/beauty/include/uapi= /linux/ beauty_uapi_sound_dir :=3D $(srctree)/tools/perf/trace/beauty/include/uapi= /sound/ +beauty_arch_asm_dir :=3D $(srctree)/tools/perf/trace/beauty/arch/x86/inclu= de/asm/ + linux_uapi_dir :=3D $(srctree)/tools/include/uapi/linux asm_generic_uapi_dir :=3D $(srctree)/tools/include/uapi/asm-generic arch_asm_uapi_dir :=3D $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/ @@ -636,8 +638,8 @@ $(x86_arch_prctl_code_array): $(x86_arch_asm_uapi_dir)/= prctl.h $(x86_arch_prctl_ x86_arch_irq_vectors_array :=3D $(beauty_outdir)/x86_arch_irq_vectors_arra= y.c x86_arch_irq_vectors_tbl :=3D $(srctree)/tools/perf/trace/beauty/tracepoin= ts/x86_irq_vectors.sh =20 -$(x86_arch_irq_vectors_array): $(x86_arch_asm_dir)/irq_vectors.h $(x86_arc= h_irq_vectors_tbl) - $(Q)$(SHELL) '$(x86_arch_irq_vectors_tbl)' $(x86_arch_asm_dir) > $@ +$(x86_arch_irq_vectors_array): $(beauty_arch_asm_dir)/irq_vectors.h $(x86_= arch_irq_vectors_tbl) + $(Q)$(SHELL) '$(x86_arch_irq_vectors_tbl)' $(beauty_arch_asm_dir) > $@ =20 x86_arch_MSRs_array :=3D $(beauty_outdir)/x86_arch_MSRs_array.c x86_arch_MSRs_tbl :=3D $(srctree)/tools/perf/trace/beauty/tracepoints/x86_= msr.sh diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index 93ad7a787a19d550..b35eba5e99c8d91f 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -34,7 +34,6 @@ FILES=3D( "arch/x86/include/asm/cpufeatures.h" "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/uapi/asm/prctl.h" "arch/x86/lib/x86-opcode-map.txt" @@ -93,6 +92,7 @@ SYNC_CHECK_FILES=3D( =20 declare -a BEAUTY_FILES BEAUTY_FILES=3D( + "arch/x86/include/asm/irq_vectors.h" "include/linux/socket.h" "include/uapi/linux/fs.h" "include/uapi/linux/mount.h" diff --git a/tools/arch/x86/include/asm/irq_vectors.h b/tools/perf/trace/be= auty/arch/x86/include/asm/irq_vectors.h similarity index 100% rename from tools/arch/x86/include/asm/irq_vectors.h rename to tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h diff --git a/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh b/tools= /perf/trace/beauty/tracepoints/x86_irq_vectors.sh index 87dc68c7de0c297e..d8e927dd2bb75c41 100755 --- a/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh +++ b/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh @@ -3,12 +3,12 @@ # (C) 2019, Arnaldo Carvalho de Melo =20 if [ $# -ne 1 ] ; then - arch_x86_header_dir=3Dtools/arch/x86/include/asm/ + beauty_arch_asm_dir=3Dtools/perf/trace/beauty/arch/x86/include/asm/ else - arch_x86_header_dir=3D$1 + beauty_arch_asm_dir=3D$1 fi =20 -x86_irq_vectors=3D${arch_x86_header_dir}/irq_vectors.h +x86_irq_vectors=3D${beauty_arch_asm_dir}/irq_vectors.h =20 # FIRST_EXTERNAL_VECTOR is not that useful, find what is its number # and then replace whatever is using it and that is useful, which at --=20 2.43.2