* linux-next: manual merge of the perf tree with the origin tree
@ 2026-05-21 10:19 Mark Brown
2026-05-21 14:55 ` Thorsten Leemhuis
2026-05-21 17:03 ` Arnaldo Carvalho de Melo
0 siblings, 2 replies; 16+ messages in thread
From: Mark Brown @ 2026-05-21 10:19 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Namhyung Kim
Cc: Arnaldo Carvalho de Melo, Ian Rogers, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 12704 bytes --]
Hi all,
Today's linux-next merge of the perf tree got a conflict in:
tools/perf/Makefile.perf
between commit:
552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
from the origin tree and commits:
32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
537609924c437 ("perf trace beauty: Make beauty generated C code standalone .o files")
from the perf tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc tools/perf/Makefile.perf
index 76b35ac19acbf,fc92d6ceac5b0..0000000000000
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@@ -508,232 -509,7 +508,6 @@@ arm64-sysreg-defs-clean
$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir) \
prefix= subdir= clean > /dev/null
- beauty_linux_dir := $(srctree)/tools/perf/trace/beauty/include/linux/
- beauty_uapi_linux_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/linux/
- beauty_uapi_sound_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/sound/
- beauty_arch_asm_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/asm/
- beauty_x86_arch_asm_uapi_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/uapi/asm/
-
- linux_uapi_dir := $(srctree)/tools/include/uapi/linux
- asm_generic_uapi_dir := $(srctree)/tools/include/uapi/asm-generic
- arch_asm_uapi_dir := $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/
- x86_arch_asm_dir := $(srctree)/tools/arch/x86/include/asm/
-
- beauty_outdir := $(OUTPUT)trace/beauty/generated
- beauty_ioctl_outdir := $(beauty_outdir)/ioctl
-
- # Create output directory if not already present
- $(shell [ -d '$(beauty_ioctl_outdir)' ] || mkdir -p '$(beauty_ioctl_outdir)')
-
- syscall_array := $(beauty_outdir)/syscalltbl.c
- syscall_tbl := $(srctree)/tools/perf/trace/beauty/syscalltbl.sh
- syscall_tbl_data := $(srctree)/tools/scripts/syscall.tbl \
- $(wildcard $(srctree)/tools/perf/arch/*/entry/syscalls/syscall*.tbl)
-
- $(syscall_array): $(syscall_tbl) $(syscall_tbl_data)
- $(Q)$(SHELL) '$(syscall_tbl)' $(srctree)/tools $@
-
- fs_at_flags_array := $(beauty_outdir)/fs_at_flags_array.c
- fs_at_flags_tbl := $(srctree)/tools/perf/trace/beauty/fs_at_flags.sh
-
- $(fs_at_flags_array): $(beauty_uapi_linux_dir)/fcntl.h $(fs_at_flags_tbl)
- $(Q)$(SHELL) '$(fs_at_flags_tbl)' $(beauty_uapi_linux_dir) > $@
-
- clone_flags_array := $(beauty_outdir)/clone_flags_array.c
- clone_flags_tbl := $(srctree)/tools/perf/trace/beauty/clone.sh
-
- $(clone_flags_array): $(beauty_uapi_linux_dir)/sched.h $(clone_flags_tbl)
- $(Q)$(SHELL) '$(clone_flags_tbl)' $(beauty_uapi_linux_dir) > $@
-
- drm_ioctl_array := $(beauty_ioctl_outdir)/drm_ioctl_array.c
- drm_hdr_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/drm
- drm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/drm_ioctl.sh
-
- $(drm_ioctl_array): $(drm_hdr_dir)/drm.h $(drm_hdr_dir)/i915_drm.h $(drm_ioctl_tbl)
- $(Q)$(SHELL) '$(drm_ioctl_tbl)' $(drm_hdr_dir) > $@
-
- fadvise_advice_array := $(beauty_outdir)/fadvise_advice_array.c
- fadvise_advice_tbl := $(srctree)/tools/perf/trace/beauty/fadvise.sh
-
- $(fadvise_advice_array): $(beauty_uapi_linux_dir)/fadvise.h $(fadvise_advice_tbl)
- $(Q)$(SHELL) '$(fadvise_advice_tbl)' $(beauty_uapi_linux_dir) > $@
-
- fsmount_arrays := $(beauty_outdir)/fsmount_arrays.c
- fsmount_tbls := $(srctree)/tools/perf/trace/beauty/fsmount.sh
-
- $(fsmount_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_tbls)
- $(Q)$(SHELL) '$(fsmount_tbls)' $(beauty_uapi_linux_dir) > $@
-
- fsmount_attr_arrays := $(beauty_outdir)/fsmount_attr_arrays.c
- fsmount_attr_tbls := $(srctree)/tools/perf/trace/beauty/fsmount_attr.sh
-
- $(fsmount_attr_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_attr_tbls)
- $(Q)$(SHELL) '$(fsmount_attr_tbls)' $(beauty_uapi_linux_dir) > $@
-
- fspick_arrays := $(beauty_outdir)/fspick_arrays.c
- fspick_tbls := $(srctree)/tools/perf/trace/beauty/fspick.sh
-
- $(fspick_arrays): $(beauty_uapi_linux_dir)/mount.h $(fspick_tbls)
- $(Q)$(SHELL) '$(fspick_tbls)' $(beauty_uapi_linux_dir) > $@
-
- fsconfig_arrays := $(beauty_outdir)/fsconfig_arrays.c
- fsconfig_tbls := $(srctree)/tools/perf/trace/beauty/fsconfig.sh
-
- $(fsconfig_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsconfig_tbls)
- $(Q)$(SHELL) '$(fsconfig_tbls)' $(beauty_uapi_linux_dir) > $@
-
- pkey_alloc_access_rights_array := $(beauty_outdir)/pkey_alloc_access_rights_array.c
- asm_generic_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
- pkey_alloc_access_rights_tbl := $(srctree)/tools/perf/trace/beauty/pkey_alloc_access_rights.sh
-
- $(pkey_alloc_access_rights_array): $(asm_generic_hdr_dir)/mman-common.h $(pkey_alloc_access_rights_tbl)
- $(Q)$(SHELL) '$(pkey_alloc_access_rights_tbl)' $(asm_generic_hdr_dir) > $@
-
- sndrv_ctl_ioctl_array := $(beauty_ioctl_outdir)/sndrv_ctl_ioctl_array.c
- sndrv_ctl_hdr_dir := $(srctree)/tools/include/uapi/sound
- sndrv_ctl_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh
-
- $(sndrv_ctl_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_ctl_ioctl_tbl)
- $(Q)$(SHELL) '$(sndrv_ctl_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@
-
- sndrv_pcm_ioctl_array := $(beauty_ioctl_outdir)/sndrv_pcm_ioctl_array.c
- sndrv_pcm_hdr_dir := $(srctree)/tools/include/uapi/sound
- sndrv_pcm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh
-
- $(sndrv_pcm_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_pcm_ioctl_tbl)
- $(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@
-
- kcmp_type_array := $(beauty_outdir)/kcmp_type_array.c
- kcmp_hdr_dir := $(srctree)/tools/include/uapi/linux/
- kcmp_type_tbl := $(srctree)/tools/perf/trace/beauty/kcmp_type.sh
-
- $(kcmp_type_array): $(kcmp_hdr_dir)/kcmp.h $(kcmp_type_tbl)
- $(Q)$(SHELL) '$(kcmp_type_tbl)' $(kcmp_hdr_dir) > $@
-
- kvm_ioctl_array := $(beauty_ioctl_outdir)/kvm_ioctl_array.c
- kvm_hdr_dir := $(srctree)/tools/include/uapi/linux
- kvm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/kvm_ioctl.sh
-
- $(kvm_ioctl_array): $(kvm_hdr_dir)/kvm.h $(kvm_ioctl_tbl)
- $(Q)$(SHELL) '$(kvm_ioctl_tbl)' $(kvm_hdr_dir) > $@
-
- socket_arrays := $(beauty_outdir)/socket.c
- socket_tbl := $(srctree)/tools/perf/trace/beauty/socket.sh
-
- $(socket_arrays): $(linux_uapi_dir)/in.h $(beauty_linux_dir)/socket.h $(socket_tbl)
- $(Q)$(SHELL) '$(socket_tbl)' $(linux_uapi_dir) $(beauty_linux_dir) > $@
-
- sockaddr_arrays := $(beauty_outdir)/sockaddr.c
- sockaddr_tbl := $(srctree)/tools/perf/trace/beauty/sockaddr.sh
-
- $(sockaddr_arrays): $(beauty_linux_dir)/socket.h $(sockaddr_tbl)
- $(Q)$(SHELL) '$(sockaddr_tbl)' $(beauty_linux_dir) > $@
-
- vhost_virtio_ioctl_array := $(beauty_ioctl_outdir)/vhost_virtio_ioctl_array.c
- vhost_virtio_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/vhost_virtio_ioctl.sh
-
- $(vhost_virtio_ioctl_array): $(beauty_uapi_linux_dir)/vhost.h $(vhost_virtio_ioctl_tbl)
- $(Q)$(SHELL) '$(vhost_virtio_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@
-
- perf_ioctl_array := $(beauty_ioctl_outdir)/perf_ioctl_array.c
- perf_hdr_dir := $(srctree)/tools/include/uapi/linux
- perf_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/perf_ioctl.sh
-
- $(perf_ioctl_array): $(perf_hdr_dir)/perf_event.h $(perf_ioctl_tbl)
- $(Q)$(SHELL) '$(perf_ioctl_tbl)' $(perf_hdr_dir) > $@
-
- madvise_behavior_array := $(beauty_outdir)/madvise_behavior_array.c
- madvise_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
- madvise_behavior_tbl := $(srctree)/tools/perf/trace/beauty/madvise_behavior.sh
-
- $(madvise_behavior_array): $(madvise_hdr_dir)/mman-common.h $(madvise_behavior_tbl)
- $(Q)$(SHELL) '$(madvise_behavior_tbl)' $(madvise_hdr_dir) > $@
-
- mmap_flags_array := $(beauty_outdir)/mmap_flags_array.c
- mmap_flags_tbl := $(srctree)/tools/perf/trace/beauty/mmap_flags.sh
-
- $(mmap_flags_array): $(linux_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman-common.h $(mmap_flags_tbl)
- $(Q)$(SHELL) '$(mmap_flags_tbl)' $(linux_uapi_dir) $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@
-
- mremap_flags_array := $(beauty_outdir)/mremap_flags_array.c
- mremap_flags_tbl := $(srctree)/tools/perf/trace/beauty/mremap_flags.sh
-
- $(mremap_flags_array): $(linux_uapi_dir)/mman.h $(mremap_flags_tbl)
- $(Q)$(SHELL) '$(mremap_flags_tbl)' $(linux_uapi_dir) > $@
-
- mount_flags_array := $(beauty_outdir)/mount_flags_array.c
- mount_flags_tbl := $(srctree)/tools/perf/trace/beauty/mount_flags.sh
-
- $(mount_flags_array): $(beauty_uapi_linux_dir)/mount.h $(mount_flags_tbl)
- $(Q)$(SHELL) '$(mount_flags_tbl)' $(beauty_uapi_linux_dir) > $@
-
- move_mount_flags_array := $(beauty_outdir)/move_mount_flags_array.c
- move_mount_flags_tbl := $(srctree)/tools/perf/trace/beauty/move_mount_flags.sh
-
- $(move_mount_flags_array): $(beauty_uapi_linux_dir)/mount.h $(move_mount_flags_tbl)
- $(Q)$(SHELL) '$(move_mount_flags_tbl)' $(beauty_uapi_linux_dir) > $@
-
- mmap_prot_array := $(beauty_outdir)/mmap_prot_array.c
- mmap_prot_tbl := $(srctree)/tools/perf/trace/beauty/mmap_prot.sh
-
- $(mmap_prot_array): $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman-common.h $(mmap_prot_tbl)
- $(Q)$(SHELL) '$(mmap_prot_tbl)' $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@
-
- prctl_option_array := $(beauty_outdir)/prctl_option_array.c
- prctl_option_tbl := $(srctree)/tools/perf/trace/beauty/prctl_option.sh
-
- $(prctl_option_array): $(beauty_uapi_linux_dir)/prctl.h $(prctl_option_tbl)
- $(Q)$(SHELL) '$(prctl_option_tbl)' $(beauty_uapi_linux_dir) > $@
-
- usbdevfs_ioctl_array := $(beauty_ioctl_outdir)/usbdevfs_ioctl_array.c
- usbdevfs_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/usbdevfs_ioctl.sh
-
- $(usbdevfs_ioctl_array): $(beauty_uapi_linux_dir)/usbdevice_fs.h $(usbdevfs_ioctl_tbl)
- $(Q)$(SHELL) '$(usbdevfs_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@
-
- x86_arch_prctl_code_array := $(beauty_outdir)/x86_arch_prctl_code_array.c
- x86_arch_prctl_code_tbl := $(srctree)/tools/perf/trace/beauty/x86_arch_prctl.sh
-
- $(x86_arch_prctl_code_array): $(beauty_x86_arch_asm_uapi_dir)/prctl.h $(x86_arch_prctl_code_tbl)
- $(Q)$(SHELL) '$(x86_arch_prctl_code_tbl)' $(beauty_x86_arch_asm_uapi_dir) > $@
-
- x86_arch_irq_vectors_array := $(beauty_outdir)/x86_arch_irq_vectors_array.c
- x86_arch_irq_vectors_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh
-
- $(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) > $@
-
- x86_arch_MSRs_array := $(beauty_outdir)/x86_arch_MSRs_array.c
- x86_arch_MSRs_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_msr.sh
-
- $(x86_arch_MSRs_array): $(x86_arch_asm_dir)/msr-index.h $(x86_arch_MSRs_tbl)
- $(Q)$(SHELL) '$(x86_arch_MSRs_tbl)' $(x86_arch_asm_dir) > $@
-
- rename_flags_array := $(beauty_outdir)/rename_flags_array.c
- rename_flags_tbl := $(srctree)/tools/perf/trace/beauty/rename_flags.sh
-
- $(rename_flags_array): $(beauty_uapi_linux_dir)/fs.h $(rename_flags_tbl)
- $(Q)$(SHELL) '$(rename_flags_tbl)' $(beauty_uapi_linux_dir) > $@
-
- arch_errno_name_array := $(beauty_outdir)/arch_errno_name_array.c
- arch_errno_hdr_dir := $(srctree)/tools
- arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
-
- $(arch_errno_name_array): $(arch_errno_tbl)
- $(Q)$(SHELL) '$(arch_errno_tbl)' '$(patsubst -%,,$(CC))' $(arch_errno_hdr_dir) > $@
-
- statx_mask_array := $(beauty_outdir)/statx_mask_array.c
- statx_mask_tbl := $(srctree)/tools/perf/trace/beauty/statx_mask.sh
-
- $(statx_mask_array): $(beauty_uapi_linux_dir)/stat.h $(statx_mask_tbl)
- $(Q)$(SHELL) '$(statx_mask_tbl)' $(beauty_uapi_linux_dir) > $@
-
- sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
- sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh
-
- $(sync_file_range_arrays): $(beauty_uapi_linux_dir)/fs.h $(sync_file_range_tbls)
- $(Q)$(SHELL) '$(sync_file_range_tbls)' $(beauty_uapi_linux_dir) > $@
--
TESTS_CORESIGHT_DIR := $(srctree)/tools/perf/tests/shell/coresight
tests-coresight-targets: FORCE
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: linux-next: manual merge of the perf tree with the origin tree
2026-05-21 10:19 linux-next: manual merge of the perf tree with the origin tree Mark Brown
@ 2026-05-21 14:55 ` Thorsten Leemhuis
2026-05-21 15:04 ` Ian Rogers
2026-05-21 17:03 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 16+ messages in thread
From: Thorsten Leemhuis @ 2026-05-21 14:55 UTC (permalink / raw)
To: Mark Brown, Arnaldo Carvalho de Melo, Namhyung Kim
Cc: Arnaldo Carvalho de Melo, Ian Rogers, Linux Kernel Mailing List,
Linux Next Mailing List
On 5/21/26 12:19, Mark Brown wrote:
>
> Today's linux-next merge of the perf tree got a conflict in:
>
> tools/perf/Makefile.perf
>
> between commit:
>
> 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
>
> from the origin tree and commits:
>
> 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
> 537609924c437 ("perf trace beauty: Make beauty generated C code standalone .o files")
>
> from the perf tree.
Wonder if something went wrong here, as I ran into a build problem with
perf today:
"""
> trace/beauty/fsmount.c: In function ‘fsmount__scnprintf_attr_flags’:
> trace/beauty/fsmount.c:37:10: fatal error: trace/beauty/generated/fsmount_attr_arrays.c: No such file or directory
> 37 | #include "trace/beauty/generated/fsmount_attr_arrays.c"
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[4]: *** [/builddir/build/BUILD/kernel-7.1.0-build/kernel-next-20260521/linux-7.1.0-0.0.next.20260521.432.vanilla.fc45.x86_64/tools/build/Makefile.build:95: trace/beauty/fsmount.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
"""
Full log:
https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-x86_64/10492250-next-next-all/builder-live.log.gz
Seems Intel's kernel test robot had a similar exprience that was
bisected to "[7390/7547] Merge branch 'perf-tools-next'" (with a "low
confidence bisect report"):
https://lore.kernel.org/all/202605211515.bBZSRAkp-lkp@intel.com/
Ciao, Thorsten
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc tools/perf/Makefile.perf
> index 76b35ac19acbf,fc92d6ceac5b0..0000000000000
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@@ -508,232 -509,7 +508,6 @@@ arm64-sysreg-defs-clean
> $(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir) \
> prefix= subdir= clean > /dev/null
>
> - beauty_linux_dir := $(srctree)/tools/perf/trace/beauty/include/linux/
> - beauty_uapi_linux_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/linux/
> - beauty_uapi_sound_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/sound/
> - beauty_arch_asm_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/asm/
> - beauty_x86_arch_asm_uapi_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/uapi/asm/
> -
> - linux_uapi_dir := $(srctree)/tools/include/uapi/linux
> - asm_generic_uapi_dir := $(srctree)/tools/include/uapi/asm-generic
> - arch_asm_uapi_dir := $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/
> - x86_arch_asm_dir := $(srctree)/tools/arch/x86/include/asm/
> -
> - beauty_outdir := $(OUTPUT)trace/beauty/generated
> - beauty_ioctl_outdir := $(beauty_outdir)/ioctl
> -
> - # Create output directory if not already present
> - $(shell [ -d '$(beauty_ioctl_outdir)' ] || mkdir -p '$(beauty_ioctl_outdir)')
> -
> - syscall_array := $(beauty_outdir)/syscalltbl.c
> - syscall_tbl := $(srctree)/tools/perf/trace/beauty/syscalltbl.sh
> - syscall_tbl_data := $(srctree)/tools/scripts/syscall.tbl \
> - $(wildcard $(srctree)/tools/perf/arch/*/entry/syscalls/syscall*.tbl)
> -
> - $(syscall_array): $(syscall_tbl) $(syscall_tbl_data)
> - $(Q)$(SHELL) '$(syscall_tbl)' $(srctree)/tools $@
> -
> - fs_at_flags_array := $(beauty_outdir)/fs_at_flags_array.c
> - fs_at_flags_tbl := $(srctree)/tools/perf/trace/beauty/fs_at_flags.sh
> -
> - $(fs_at_flags_array): $(beauty_uapi_linux_dir)/fcntl.h $(fs_at_flags_tbl)
> - $(Q)$(SHELL) '$(fs_at_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - clone_flags_array := $(beauty_outdir)/clone_flags_array.c
> - clone_flags_tbl := $(srctree)/tools/perf/trace/beauty/clone.sh
> -
> - $(clone_flags_array): $(beauty_uapi_linux_dir)/sched.h $(clone_flags_tbl)
> - $(Q)$(SHELL) '$(clone_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - drm_ioctl_array := $(beauty_ioctl_outdir)/drm_ioctl_array.c
> - drm_hdr_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/drm
> - drm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/drm_ioctl.sh
> -
> - $(drm_ioctl_array): $(drm_hdr_dir)/drm.h $(drm_hdr_dir)/i915_drm.h $(drm_ioctl_tbl)
> - $(Q)$(SHELL) '$(drm_ioctl_tbl)' $(drm_hdr_dir) > $@
> -
> - fadvise_advice_array := $(beauty_outdir)/fadvise_advice_array.c
> - fadvise_advice_tbl := $(srctree)/tools/perf/trace/beauty/fadvise.sh
> -
> - $(fadvise_advice_array): $(beauty_uapi_linux_dir)/fadvise.h $(fadvise_advice_tbl)
> - $(Q)$(SHELL) '$(fadvise_advice_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - fsmount_arrays := $(beauty_outdir)/fsmount_arrays.c
> - fsmount_tbls := $(srctree)/tools/perf/trace/beauty/fsmount.sh
> -
> - $(fsmount_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_tbls)
> - $(Q)$(SHELL) '$(fsmount_tbls)' $(beauty_uapi_linux_dir) > $@
> -
> - fsmount_attr_arrays := $(beauty_outdir)/fsmount_attr_arrays.c
> - fsmount_attr_tbls := $(srctree)/tools/perf/trace/beauty/fsmount_attr.sh
> -
> - $(fsmount_attr_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_attr_tbls)
> - $(Q)$(SHELL) '$(fsmount_attr_tbls)' $(beauty_uapi_linux_dir) > $@
> -
> - fspick_arrays := $(beauty_outdir)/fspick_arrays.c
> - fspick_tbls := $(srctree)/tools/perf/trace/beauty/fspick.sh
> -
> - $(fspick_arrays): $(beauty_uapi_linux_dir)/mount.h $(fspick_tbls)
> - $(Q)$(SHELL) '$(fspick_tbls)' $(beauty_uapi_linux_dir) > $@
> -
> - fsconfig_arrays := $(beauty_outdir)/fsconfig_arrays.c
> - fsconfig_tbls := $(srctree)/tools/perf/trace/beauty/fsconfig.sh
> -
> - $(fsconfig_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsconfig_tbls)
> - $(Q)$(SHELL) '$(fsconfig_tbls)' $(beauty_uapi_linux_dir) > $@
> -
> - pkey_alloc_access_rights_array := $(beauty_outdir)/pkey_alloc_access_rights_array.c
> - asm_generic_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
> - pkey_alloc_access_rights_tbl := $(srctree)/tools/perf/trace/beauty/pkey_alloc_access_rights.sh
> -
> - $(pkey_alloc_access_rights_array): $(asm_generic_hdr_dir)/mman-common.h $(pkey_alloc_access_rights_tbl)
> - $(Q)$(SHELL) '$(pkey_alloc_access_rights_tbl)' $(asm_generic_hdr_dir) > $@
> -
> - sndrv_ctl_ioctl_array := $(beauty_ioctl_outdir)/sndrv_ctl_ioctl_array.c
> - sndrv_ctl_hdr_dir := $(srctree)/tools/include/uapi/sound
> - sndrv_ctl_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh
> -
> - $(sndrv_ctl_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_ctl_ioctl_tbl)
> - $(Q)$(SHELL) '$(sndrv_ctl_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@
> -
> - sndrv_pcm_ioctl_array := $(beauty_ioctl_outdir)/sndrv_pcm_ioctl_array.c
> - sndrv_pcm_hdr_dir := $(srctree)/tools/include/uapi/sound
> - sndrv_pcm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh
> -
> - $(sndrv_pcm_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_pcm_ioctl_tbl)
> - $(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@
> -
> - kcmp_type_array := $(beauty_outdir)/kcmp_type_array.c
> - kcmp_hdr_dir := $(srctree)/tools/include/uapi/linux/
> - kcmp_type_tbl := $(srctree)/tools/perf/trace/beauty/kcmp_type.sh
> -
> - $(kcmp_type_array): $(kcmp_hdr_dir)/kcmp.h $(kcmp_type_tbl)
> - $(Q)$(SHELL) '$(kcmp_type_tbl)' $(kcmp_hdr_dir) > $@
> -
> - kvm_ioctl_array := $(beauty_ioctl_outdir)/kvm_ioctl_array.c
> - kvm_hdr_dir := $(srctree)/tools/include/uapi/linux
> - kvm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/kvm_ioctl.sh
> -
> - $(kvm_ioctl_array): $(kvm_hdr_dir)/kvm.h $(kvm_ioctl_tbl)
> - $(Q)$(SHELL) '$(kvm_ioctl_tbl)' $(kvm_hdr_dir) > $@
> -
> - socket_arrays := $(beauty_outdir)/socket.c
> - socket_tbl := $(srctree)/tools/perf/trace/beauty/socket.sh
> -
> - $(socket_arrays): $(linux_uapi_dir)/in.h $(beauty_linux_dir)/socket.h $(socket_tbl)
> - $(Q)$(SHELL) '$(socket_tbl)' $(linux_uapi_dir) $(beauty_linux_dir) > $@
> -
> - sockaddr_arrays := $(beauty_outdir)/sockaddr.c
> - sockaddr_tbl := $(srctree)/tools/perf/trace/beauty/sockaddr.sh
> -
> - $(sockaddr_arrays): $(beauty_linux_dir)/socket.h $(sockaddr_tbl)
> - $(Q)$(SHELL) '$(sockaddr_tbl)' $(beauty_linux_dir) > $@
> -
> - vhost_virtio_ioctl_array := $(beauty_ioctl_outdir)/vhost_virtio_ioctl_array.c
> - vhost_virtio_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/vhost_virtio_ioctl.sh
> -
> - $(vhost_virtio_ioctl_array): $(beauty_uapi_linux_dir)/vhost.h $(vhost_virtio_ioctl_tbl)
> - $(Q)$(SHELL) '$(vhost_virtio_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - perf_ioctl_array := $(beauty_ioctl_outdir)/perf_ioctl_array.c
> - perf_hdr_dir := $(srctree)/tools/include/uapi/linux
> - perf_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/perf_ioctl.sh
> -
> - $(perf_ioctl_array): $(perf_hdr_dir)/perf_event.h $(perf_ioctl_tbl)
> - $(Q)$(SHELL) '$(perf_ioctl_tbl)' $(perf_hdr_dir) > $@
> -
> - madvise_behavior_array := $(beauty_outdir)/madvise_behavior_array.c
> - madvise_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
> - madvise_behavior_tbl := $(srctree)/tools/perf/trace/beauty/madvise_behavior.sh
> -
> - $(madvise_behavior_array): $(madvise_hdr_dir)/mman-common.h $(madvise_behavior_tbl)
> - $(Q)$(SHELL) '$(madvise_behavior_tbl)' $(madvise_hdr_dir) > $@
> -
> - mmap_flags_array := $(beauty_outdir)/mmap_flags_array.c
> - mmap_flags_tbl := $(srctree)/tools/perf/trace/beauty/mmap_flags.sh
> -
> - $(mmap_flags_array): $(linux_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman-common.h $(mmap_flags_tbl)
> - $(Q)$(SHELL) '$(mmap_flags_tbl)' $(linux_uapi_dir) $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@
> -
> - mremap_flags_array := $(beauty_outdir)/mremap_flags_array.c
> - mremap_flags_tbl := $(srctree)/tools/perf/trace/beauty/mremap_flags.sh
> -
> - $(mremap_flags_array): $(linux_uapi_dir)/mman.h $(mremap_flags_tbl)
> - $(Q)$(SHELL) '$(mremap_flags_tbl)' $(linux_uapi_dir) > $@
> -
> - mount_flags_array := $(beauty_outdir)/mount_flags_array.c
> - mount_flags_tbl := $(srctree)/tools/perf/trace/beauty/mount_flags.sh
> -
> - $(mount_flags_array): $(beauty_uapi_linux_dir)/mount.h $(mount_flags_tbl)
> - $(Q)$(SHELL) '$(mount_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - move_mount_flags_array := $(beauty_outdir)/move_mount_flags_array.c
> - move_mount_flags_tbl := $(srctree)/tools/perf/trace/beauty/move_mount_flags.sh
> -
> - $(move_mount_flags_array): $(beauty_uapi_linux_dir)/mount.h $(move_mount_flags_tbl)
> - $(Q)$(SHELL) '$(move_mount_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - mmap_prot_array := $(beauty_outdir)/mmap_prot_array.c
> - mmap_prot_tbl := $(srctree)/tools/perf/trace/beauty/mmap_prot.sh
> -
> - $(mmap_prot_array): $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman-common.h $(mmap_prot_tbl)
> - $(Q)$(SHELL) '$(mmap_prot_tbl)' $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@
> -
> - prctl_option_array := $(beauty_outdir)/prctl_option_array.c
> - prctl_option_tbl := $(srctree)/tools/perf/trace/beauty/prctl_option.sh
> -
> - $(prctl_option_array): $(beauty_uapi_linux_dir)/prctl.h $(prctl_option_tbl)
> - $(Q)$(SHELL) '$(prctl_option_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - usbdevfs_ioctl_array := $(beauty_ioctl_outdir)/usbdevfs_ioctl_array.c
> - usbdevfs_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/usbdevfs_ioctl.sh
> -
> - $(usbdevfs_ioctl_array): $(beauty_uapi_linux_dir)/usbdevice_fs.h $(usbdevfs_ioctl_tbl)
> - $(Q)$(SHELL) '$(usbdevfs_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - x86_arch_prctl_code_array := $(beauty_outdir)/x86_arch_prctl_code_array.c
> - x86_arch_prctl_code_tbl := $(srctree)/tools/perf/trace/beauty/x86_arch_prctl.sh
> -
> - $(x86_arch_prctl_code_array): $(beauty_x86_arch_asm_uapi_dir)/prctl.h $(x86_arch_prctl_code_tbl)
> - $(Q)$(SHELL) '$(x86_arch_prctl_code_tbl)' $(beauty_x86_arch_asm_uapi_dir) > $@
> -
> - x86_arch_irq_vectors_array := $(beauty_outdir)/x86_arch_irq_vectors_array.c
> - x86_arch_irq_vectors_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh
> -
> - $(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) > $@
> -
> - x86_arch_MSRs_array := $(beauty_outdir)/x86_arch_MSRs_array.c
> - x86_arch_MSRs_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_msr.sh
> -
> - $(x86_arch_MSRs_array): $(x86_arch_asm_dir)/msr-index.h $(x86_arch_MSRs_tbl)
> - $(Q)$(SHELL) '$(x86_arch_MSRs_tbl)' $(x86_arch_asm_dir) > $@
> -
> - rename_flags_array := $(beauty_outdir)/rename_flags_array.c
> - rename_flags_tbl := $(srctree)/tools/perf/trace/beauty/rename_flags.sh
> -
> - $(rename_flags_array): $(beauty_uapi_linux_dir)/fs.h $(rename_flags_tbl)
> - $(Q)$(SHELL) '$(rename_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - arch_errno_name_array := $(beauty_outdir)/arch_errno_name_array.c
> - arch_errno_hdr_dir := $(srctree)/tools
> - arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
> -
> - $(arch_errno_name_array): $(arch_errno_tbl)
> - $(Q)$(SHELL) '$(arch_errno_tbl)' '$(patsubst -%,,$(CC))' $(arch_errno_hdr_dir) > $@
> -
> - statx_mask_array := $(beauty_outdir)/statx_mask_array.c
> - statx_mask_tbl := $(srctree)/tools/perf/trace/beauty/statx_mask.sh
> -
> - $(statx_mask_array): $(beauty_uapi_linux_dir)/stat.h $(statx_mask_tbl)
> - $(Q)$(SHELL) '$(statx_mask_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
> - sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh
> -
> - $(sync_file_range_arrays): $(beauty_uapi_linux_dir)/fs.h $(sync_file_range_tbls)
> - $(Q)$(SHELL) '$(sync_file_range_tbls)' $(beauty_uapi_linux_dir) > $@
> --
> TESTS_CORESIGHT_DIR := $(srctree)/tools/perf/tests/shell/coresight
>
> tests-coresight-targets: FORCE
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: linux-next: manual merge of the perf tree with the origin tree
2026-05-21 14:55 ` Thorsten Leemhuis
@ 2026-05-21 15:04 ` Ian Rogers
2026-05-21 15:30 ` Mark Brown
0 siblings, 1 reply; 16+ messages in thread
From: Ian Rogers @ 2026-05-21 15:04 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: Mark Brown, Arnaldo Carvalho de Melo, Namhyung Kim,
Arnaldo Carvalho de Melo, Linux Kernel Mailing List,
Linux Next Mailing List
On Thu, May 21, 2026 at 7:55 AM Thorsten Leemhuis <linux@leemhuis.info> wrote:
>
> On 5/21/26 12:19, Mark Brown wrote:
> >
> > Today's linux-next merge of the perf tree got a conflict in:
> >
> > tools/perf/Makefile.perf
> >
> > between commit:
> >
> > 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
> >
> > from the origin tree and commits:
> >
> > 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
I believe this commit has issues with "perf trace: Add beautifier
script for fsmount flags":
https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git/commit/?h=perf-tools&id=552636b9317c8a843dd4496d77e56976ab48c76b
This change went to the perf-tools tree and then to linux/master,
while "perf build: Pre-generate BPF skeleton tooling during umbrella
prepare phase" has gone to perf-tools-next and then to linux-next.
I'll look into a fix.
Thanks,
Ian
> > 537609924c437 ("perf trace beauty: Make beauty generated C code standalone .o files")
> >
> > from the perf tree.
>
> Wonder if something went wrong here, as I ran into a build problem with
> perf today:
>
> """
> > trace/beauty/fsmount.c: In function ‘fsmount__scnprintf_attr_flags’:
> > trace/beauty/fsmount.c:37:10: fatal error: trace/beauty/generated/fsmount_attr_arrays.c: No such file or directory
> > 37 | #include "trace/beauty/generated/fsmount_attr_arrays.c"
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > compilation terminated.
> > make[4]: *** [/builddir/build/BUILD/kernel-7.1.0-build/kernel-next-20260521/linux-7.1.0-0.0.next.20260521.432.vanilla.fc45.x86_64/tools/build/Makefile.build:95: trace/beauty/fsmount.o] Error 1
> > make[4]: *** Waiting for unfinished jobs....
> """
>
> Full log:
> https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-x86_64/10492250-next-next-all/builder-live.log.gz
>
> Seems Intel's kernel test robot had a similar exprience that was
> bisected to "[7390/7547] Merge branch 'perf-tools-next'" (with a "low
> confidence bisect report"):
> https://lore.kernel.org/all/202605211515.bBZSRAkp-lkp@intel.com/
>
> Ciao, Thorsten
>
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging. You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> >
> > diff --cc tools/perf/Makefile.perf
> > index 76b35ac19acbf,fc92d6ceac5b0..0000000000000
> > --- a/tools/perf/Makefile.perf
> > +++ b/tools/perf/Makefile.perf
> > @@@ -508,232 -509,7 +508,6 @@@ arm64-sysreg-defs-clean
> > $(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir) \
> > prefix= subdir= clean > /dev/null
> >
> > - beauty_linux_dir := $(srctree)/tools/perf/trace/beauty/include/linux/
> > - beauty_uapi_linux_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/linux/
> > - beauty_uapi_sound_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/sound/
> > - beauty_arch_asm_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/asm/
> > - beauty_x86_arch_asm_uapi_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/uapi/asm/
> > -
> > - linux_uapi_dir := $(srctree)/tools/include/uapi/linux
> > - asm_generic_uapi_dir := $(srctree)/tools/include/uapi/asm-generic
> > - arch_asm_uapi_dir := $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/
> > - x86_arch_asm_dir := $(srctree)/tools/arch/x86/include/asm/
> > -
> > - beauty_outdir := $(OUTPUT)trace/beauty/generated
> > - beauty_ioctl_outdir := $(beauty_outdir)/ioctl
> > -
> > - # Create output directory if not already present
> > - $(shell [ -d '$(beauty_ioctl_outdir)' ] || mkdir -p '$(beauty_ioctl_outdir)')
> > -
> > - syscall_array := $(beauty_outdir)/syscalltbl.c
> > - syscall_tbl := $(srctree)/tools/perf/trace/beauty/syscalltbl.sh
> > - syscall_tbl_data := $(srctree)/tools/scripts/syscall.tbl \
> > - $(wildcard $(srctree)/tools/perf/arch/*/entry/syscalls/syscall*.tbl)
> > -
> > - $(syscall_array): $(syscall_tbl) $(syscall_tbl_data)
> > - $(Q)$(SHELL) '$(syscall_tbl)' $(srctree)/tools $@
> > -
> > - fs_at_flags_array := $(beauty_outdir)/fs_at_flags_array.c
> > - fs_at_flags_tbl := $(srctree)/tools/perf/trace/beauty/fs_at_flags.sh
> > -
> > - $(fs_at_flags_array): $(beauty_uapi_linux_dir)/fcntl.h $(fs_at_flags_tbl)
> > - $(Q)$(SHELL) '$(fs_at_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - clone_flags_array := $(beauty_outdir)/clone_flags_array.c
> > - clone_flags_tbl := $(srctree)/tools/perf/trace/beauty/clone.sh
> > -
> > - $(clone_flags_array): $(beauty_uapi_linux_dir)/sched.h $(clone_flags_tbl)
> > - $(Q)$(SHELL) '$(clone_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - drm_ioctl_array := $(beauty_ioctl_outdir)/drm_ioctl_array.c
> > - drm_hdr_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/drm
> > - drm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/drm_ioctl.sh
> > -
> > - $(drm_ioctl_array): $(drm_hdr_dir)/drm.h $(drm_hdr_dir)/i915_drm.h $(drm_ioctl_tbl)
> > - $(Q)$(SHELL) '$(drm_ioctl_tbl)' $(drm_hdr_dir) > $@
> > -
> > - fadvise_advice_array := $(beauty_outdir)/fadvise_advice_array.c
> > - fadvise_advice_tbl := $(srctree)/tools/perf/trace/beauty/fadvise.sh
> > -
> > - $(fadvise_advice_array): $(beauty_uapi_linux_dir)/fadvise.h $(fadvise_advice_tbl)
> > - $(Q)$(SHELL) '$(fadvise_advice_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - fsmount_arrays := $(beauty_outdir)/fsmount_arrays.c
> > - fsmount_tbls := $(srctree)/tools/perf/trace/beauty/fsmount.sh
> > -
> > - $(fsmount_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_tbls)
> > - $(Q)$(SHELL) '$(fsmount_tbls)' $(beauty_uapi_linux_dir) > $@
> > -
> > - fsmount_attr_arrays := $(beauty_outdir)/fsmount_attr_arrays.c
> > - fsmount_attr_tbls := $(srctree)/tools/perf/trace/beauty/fsmount_attr.sh
> > -
> > - $(fsmount_attr_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_attr_tbls)
> > - $(Q)$(SHELL) '$(fsmount_attr_tbls)' $(beauty_uapi_linux_dir) > $@
> > -
> > - fspick_arrays := $(beauty_outdir)/fspick_arrays.c
> > - fspick_tbls := $(srctree)/tools/perf/trace/beauty/fspick.sh
> > -
> > - $(fspick_arrays): $(beauty_uapi_linux_dir)/mount.h $(fspick_tbls)
> > - $(Q)$(SHELL) '$(fspick_tbls)' $(beauty_uapi_linux_dir) > $@
> > -
> > - fsconfig_arrays := $(beauty_outdir)/fsconfig_arrays.c
> > - fsconfig_tbls := $(srctree)/tools/perf/trace/beauty/fsconfig.sh
> > -
> > - $(fsconfig_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsconfig_tbls)
> > - $(Q)$(SHELL) '$(fsconfig_tbls)' $(beauty_uapi_linux_dir) > $@
> > -
> > - pkey_alloc_access_rights_array := $(beauty_outdir)/pkey_alloc_access_rights_array.c
> > - asm_generic_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
> > - pkey_alloc_access_rights_tbl := $(srctree)/tools/perf/trace/beauty/pkey_alloc_access_rights.sh
> > -
> > - $(pkey_alloc_access_rights_array): $(asm_generic_hdr_dir)/mman-common.h $(pkey_alloc_access_rights_tbl)
> > - $(Q)$(SHELL) '$(pkey_alloc_access_rights_tbl)' $(asm_generic_hdr_dir) > $@
> > -
> > - sndrv_ctl_ioctl_array := $(beauty_ioctl_outdir)/sndrv_ctl_ioctl_array.c
> > - sndrv_ctl_hdr_dir := $(srctree)/tools/include/uapi/sound
> > - sndrv_ctl_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh
> > -
> > - $(sndrv_ctl_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_ctl_ioctl_tbl)
> > - $(Q)$(SHELL) '$(sndrv_ctl_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@
> > -
> > - sndrv_pcm_ioctl_array := $(beauty_ioctl_outdir)/sndrv_pcm_ioctl_array.c
> > - sndrv_pcm_hdr_dir := $(srctree)/tools/include/uapi/sound
> > - sndrv_pcm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh
> > -
> > - $(sndrv_pcm_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_pcm_ioctl_tbl)
> > - $(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@
> > -
> > - kcmp_type_array := $(beauty_outdir)/kcmp_type_array.c
> > - kcmp_hdr_dir := $(srctree)/tools/include/uapi/linux/
> > - kcmp_type_tbl := $(srctree)/tools/perf/trace/beauty/kcmp_type.sh
> > -
> > - $(kcmp_type_array): $(kcmp_hdr_dir)/kcmp.h $(kcmp_type_tbl)
> > - $(Q)$(SHELL) '$(kcmp_type_tbl)' $(kcmp_hdr_dir) > $@
> > -
> > - kvm_ioctl_array := $(beauty_ioctl_outdir)/kvm_ioctl_array.c
> > - kvm_hdr_dir := $(srctree)/tools/include/uapi/linux
> > - kvm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/kvm_ioctl.sh
> > -
> > - $(kvm_ioctl_array): $(kvm_hdr_dir)/kvm.h $(kvm_ioctl_tbl)
> > - $(Q)$(SHELL) '$(kvm_ioctl_tbl)' $(kvm_hdr_dir) > $@
> > -
> > - socket_arrays := $(beauty_outdir)/socket.c
> > - socket_tbl := $(srctree)/tools/perf/trace/beauty/socket.sh
> > -
> > - $(socket_arrays): $(linux_uapi_dir)/in.h $(beauty_linux_dir)/socket.h $(socket_tbl)
> > - $(Q)$(SHELL) '$(socket_tbl)' $(linux_uapi_dir) $(beauty_linux_dir) > $@
> > -
> > - sockaddr_arrays := $(beauty_outdir)/sockaddr.c
> > - sockaddr_tbl := $(srctree)/tools/perf/trace/beauty/sockaddr.sh
> > -
> > - $(sockaddr_arrays): $(beauty_linux_dir)/socket.h $(sockaddr_tbl)
> > - $(Q)$(SHELL) '$(sockaddr_tbl)' $(beauty_linux_dir) > $@
> > -
> > - vhost_virtio_ioctl_array := $(beauty_ioctl_outdir)/vhost_virtio_ioctl_array.c
> > - vhost_virtio_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/vhost_virtio_ioctl.sh
> > -
> > - $(vhost_virtio_ioctl_array): $(beauty_uapi_linux_dir)/vhost.h $(vhost_virtio_ioctl_tbl)
> > - $(Q)$(SHELL) '$(vhost_virtio_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - perf_ioctl_array := $(beauty_ioctl_outdir)/perf_ioctl_array.c
> > - perf_hdr_dir := $(srctree)/tools/include/uapi/linux
> > - perf_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/perf_ioctl.sh
> > -
> > - $(perf_ioctl_array): $(perf_hdr_dir)/perf_event.h $(perf_ioctl_tbl)
> > - $(Q)$(SHELL) '$(perf_ioctl_tbl)' $(perf_hdr_dir) > $@
> > -
> > - madvise_behavior_array := $(beauty_outdir)/madvise_behavior_array.c
> > - madvise_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
> > - madvise_behavior_tbl := $(srctree)/tools/perf/trace/beauty/madvise_behavior.sh
> > -
> > - $(madvise_behavior_array): $(madvise_hdr_dir)/mman-common.h $(madvise_behavior_tbl)
> > - $(Q)$(SHELL) '$(madvise_behavior_tbl)' $(madvise_hdr_dir) > $@
> > -
> > - mmap_flags_array := $(beauty_outdir)/mmap_flags_array.c
> > - mmap_flags_tbl := $(srctree)/tools/perf/trace/beauty/mmap_flags.sh
> > -
> > - $(mmap_flags_array): $(linux_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman-common.h $(mmap_flags_tbl)
> > - $(Q)$(SHELL) '$(mmap_flags_tbl)' $(linux_uapi_dir) $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@
> > -
> > - mremap_flags_array := $(beauty_outdir)/mremap_flags_array.c
> > - mremap_flags_tbl := $(srctree)/tools/perf/trace/beauty/mremap_flags.sh
> > -
> > - $(mremap_flags_array): $(linux_uapi_dir)/mman.h $(mremap_flags_tbl)
> > - $(Q)$(SHELL) '$(mremap_flags_tbl)' $(linux_uapi_dir) > $@
> > -
> > - mount_flags_array := $(beauty_outdir)/mount_flags_array.c
> > - mount_flags_tbl := $(srctree)/tools/perf/trace/beauty/mount_flags.sh
> > -
> > - $(mount_flags_array): $(beauty_uapi_linux_dir)/mount.h $(mount_flags_tbl)
> > - $(Q)$(SHELL) '$(mount_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - move_mount_flags_array := $(beauty_outdir)/move_mount_flags_array.c
> > - move_mount_flags_tbl := $(srctree)/tools/perf/trace/beauty/move_mount_flags.sh
> > -
> > - $(move_mount_flags_array): $(beauty_uapi_linux_dir)/mount.h $(move_mount_flags_tbl)
> > - $(Q)$(SHELL) '$(move_mount_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - mmap_prot_array := $(beauty_outdir)/mmap_prot_array.c
> > - mmap_prot_tbl := $(srctree)/tools/perf/trace/beauty/mmap_prot.sh
> > -
> > - $(mmap_prot_array): $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman-common.h $(mmap_prot_tbl)
> > - $(Q)$(SHELL) '$(mmap_prot_tbl)' $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@
> > -
> > - prctl_option_array := $(beauty_outdir)/prctl_option_array.c
> > - prctl_option_tbl := $(srctree)/tools/perf/trace/beauty/prctl_option.sh
> > -
> > - $(prctl_option_array): $(beauty_uapi_linux_dir)/prctl.h $(prctl_option_tbl)
> > - $(Q)$(SHELL) '$(prctl_option_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - usbdevfs_ioctl_array := $(beauty_ioctl_outdir)/usbdevfs_ioctl_array.c
> > - usbdevfs_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/usbdevfs_ioctl.sh
> > -
> > - $(usbdevfs_ioctl_array): $(beauty_uapi_linux_dir)/usbdevice_fs.h $(usbdevfs_ioctl_tbl)
> > - $(Q)$(SHELL) '$(usbdevfs_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - x86_arch_prctl_code_array := $(beauty_outdir)/x86_arch_prctl_code_array.c
> > - x86_arch_prctl_code_tbl := $(srctree)/tools/perf/trace/beauty/x86_arch_prctl.sh
> > -
> > - $(x86_arch_prctl_code_array): $(beauty_x86_arch_asm_uapi_dir)/prctl.h $(x86_arch_prctl_code_tbl)
> > - $(Q)$(SHELL) '$(x86_arch_prctl_code_tbl)' $(beauty_x86_arch_asm_uapi_dir) > $@
> > -
> > - x86_arch_irq_vectors_array := $(beauty_outdir)/x86_arch_irq_vectors_array.c
> > - x86_arch_irq_vectors_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh
> > -
> > - $(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) > $@
> > -
> > - x86_arch_MSRs_array := $(beauty_outdir)/x86_arch_MSRs_array.c
> > - x86_arch_MSRs_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_msr.sh
> > -
> > - $(x86_arch_MSRs_array): $(x86_arch_asm_dir)/msr-index.h $(x86_arch_MSRs_tbl)
> > - $(Q)$(SHELL) '$(x86_arch_MSRs_tbl)' $(x86_arch_asm_dir) > $@
> > -
> > - rename_flags_array := $(beauty_outdir)/rename_flags_array.c
> > - rename_flags_tbl := $(srctree)/tools/perf/trace/beauty/rename_flags.sh
> > -
> > - $(rename_flags_array): $(beauty_uapi_linux_dir)/fs.h $(rename_flags_tbl)
> > - $(Q)$(SHELL) '$(rename_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - arch_errno_name_array := $(beauty_outdir)/arch_errno_name_array.c
> > - arch_errno_hdr_dir := $(srctree)/tools
> > - arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
> > -
> > - $(arch_errno_name_array): $(arch_errno_tbl)
> > - $(Q)$(SHELL) '$(arch_errno_tbl)' '$(patsubst -%,,$(CC))' $(arch_errno_hdr_dir) > $@
> > -
> > - statx_mask_array := $(beauty_outdir)/statx_mask_array.c
> > - statx_mask_tbl := $(srctree)/tools/perf/trace/beauty/statx_mask.sh
> > -
> > - $(statx_mask_array): $(beauty_uapi_linux_dir)/stat.h $(statx_mask_tbl)
> > - $(Q)$(SHELL) '$(statx_mask_tbl)' $(beauty_uapi_linux_dir) > $@
> > -
> > - sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
> > - sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh
> > -
> > - $(sync_file_range_arrays): $(beauty_uapi_linux_dir)/fs.h $(sync_file_range_tbls)
> > - $(Q)$(SHELL) '$(sync_file_range_tbls)' $(beauty_uapi_linux_dir) > $@
> > --
> > TESTS_CORESIGHT_DIR := $(srctree)/tools/perf/tests/shell/coresight
> >
> > tests-coresight-targets: FORCE
>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: linux-next: manual merge of the perf tree with the origin tree
2026-05-21 15:04 ` Ian Rogers
@ 2026-05-21 15:30 ` Mark Brown
2026-05-21 15:33 ` Ian Rogers
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Mark Brown @ 2026-05-21 15:30 UTC (permalink / raw)
To: Ian Rogers
Cc: Thorsten Leemhuis, Arnaldo Carvalho de Melo, Namhyung Kim,
Arnaldo Carvalho de Melo, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]
On Thu, May 21, 2026 at 08:04:11AM -0700, Ian Rogers wrote:
> On Thu, May 21, 2026 at 7:55 AM Thorsten Leemhuis <linux@leemhuis.info> wrote:
> > On 5/21/26 12:19, Mark Brown wrote:
> > > between commit:
> > > 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
> > > from the origin tree and commits:
> > > 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
> I believe this commit has issues with "perf trace: Add beautifier
> script for fsmount flags":
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git/commit/?h=perf-tools&id=552636b9317c8a843dd4496d77e56976ab48c76b
> This change went to the perf-tools tree and then to linux/master,
> while "perf build: Pre-generate BPF skeleton tooling during umbrella
> prepare phase" has gone to perf-tools-next and then to linux-next.
> I'll look into a fix.
Yes, that's exactly the conflict I identified above - the lack of
coordination there was pretty surprising TBH, and also the fact that
552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
went in after -rc1.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: linux-next: manual merge of the perf tree with the origin tree
2026-05-21 15:30 ` Mark Brown
@ 2026-05-21 15:33 ` Ian Rogers
2026-05-21 15:35 ` [PATCH v1] perf build: Fix fsmount.o build Ian Rogers
2026-05-21 15:44 ` linux-next: manual merge of the perf tree with the origin tree Ian Rogers
2 siblings, 0 replies; 16+ messages in thread
From: Ian Rogers @ 2026-05-21 15:33 UTC (permalink / raw)
To: Mark Brown
Cc: Thorsten Leemhuis, Arnaldo Carvalho de Melo, Namhyung Kim,
Arnaldo Carvalho de Melo, Linux Kernel Mailing List,
Linux Next Mailing List
On Thu, May 21, 2026 at 8:31 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, May 21, 2026 at 08:04:11AM -0700, Ian Rogers wrote:
> > On Thu, May 21, 2026 at 7:55 AM Thorsten Leemhuis <linux@leemhuis.info> wrote:
> > > On 5/21/26 12:19, Mark Brown wrote:
>
> > > > between commit:
>
> > > > 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
>
> > > > from the origin tree and commits:
>
> > > > 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
>
> > I believe this commit has issues with "perf trace: Add beautifier
> > script for fsmount flags":
> > https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git/commit/?h=perf-tools&id=552636b9317c8a843dd4496d77e56976ab48c76b
> > This change went to the perf-tools tree and then to linux/master,
> > while "perf build: Pre-generate BPF skeleton tooling during umbrella
> > prepare phase" has gone to perf-tools-next and then to linux-next.
> > I'll look into a fix.
>
> Yes, that's exactly the conflict I identified above - the lack of
> coordination there was pretty surprising TBH, and also the fact that
> 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
> went in after -rc1.
You're right, I'm only just waking up :-) I'm about to send the fix.
Thanks,
Ian
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH v1] perf build: Fix fsmount.o build
2026-05-21 15:30 ` Mark Brown
2026-05-21 15:33 ` Ian Rogers
@ 2026-05-21 15:35 ` Ian Rogers
2026-05-21 15:58 ` Mark Brown
2026-05-21 16:51 ` Namhyung Kim
2026-05-21 15:44 ` linux-next: manual merge of the perf tree with the origin tree Ian Rogers
2 siblings, 2 replies; 16+ messages in thread
From: Ian Rogers @ 2026-05-21 15:35 UTC (permalink / raw)
To: broonie, acme, namhyung
Cc: arnaldo.melo, irogers, linux-kernel, linux-next, linux
A merge conflict between:
commit 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
commit 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
Resulted in a missed build dependency in the merge:
commit 61da860eee07 Merge branch 'perf-tools-next' of https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
Fix the build by adding the necessary build dependencies.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/trace/beauty/Build | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/perf/trace/beauty/Build b/tools/perf/trace/beauty/Build
index 93cde93461a3..996e63cdf765 100644
--- a/tools/perf/trace/beauty/Build
+++ b/tools/perf/trace/beauty/Build
@@ -111,6 +111,13 @@ $(fsmount_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_tbls)
$(call rule_mkdir)
$(Q)$(call echo-cmd,gen)$(SHELL) '$(fsmount_tbls)' $(beauty_uapi_linux_dir) > $@
+fsmount_attr_arrays := $(beauty_outdir)/fsmount_attr_arrays.c
+fsmount_attr_tbls := $(srctree)/tools/perf/trace/beauty/fsmount_attr.sh
+
+$(fsmount_attr_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_attr_tbls)
+ $(call rule_mkdir)
+ $(Q)$(call echo-cmd,gen)$(SHELL) '$(fsmount_attr_tbls)' $(beauty_uapi_linux_dir) > $@
+
fspick_arrays := $(beauty_outdir)/fspick_arrays.c
fspick_tbls := $(srctree)/tools/perf/trace/beauty/fspick.sh
@@ -285,7 +292,7 @@ $(OUTPUT)trace/beauty/syscalltbl.o: $(syscall_array)
$(OUTPUT)trace/beauty/fsconfig.o: $(fsconfig_arrays)
$(OUTPUT)trace/beauty/clone.o: $(clone_flags_array)
$(OUTPUT)trace/beauty/fs_at_flags.o: $(fs_at_flags_array)
-$(OUTPUT)trace/beauty/fsmount.o: $(fsmount_arrays)
+$(OUTPUT)trace/beauty/fsmount.o: $(fsmount_arrays) $(fsmount_attr_arrays)
$(OUTPUT)trace/beauty/fspick.o: $(fspick_arrays)
$(OUTPUT)trace/beauty/ioctl.o: $(drm_ioctl_array) $(sndrv_pcm_ioctl_array) $(sndrv_ctl_ioctl_array) $(kvm_ioctl_array) $(vhost_virtio_ioctl_array) $(perf_ioctl_array) $(usbdevfs_ioctl_array)
$(OUTPUT)trace/beauty/kcmp.o: $(kcmp_type_array)
--
2.54.0.746.g67dd491aae-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH v1] perf build: Fix fsmount.o build
2026-05-21 15:35 ` [PATCH v1] perf build: Fix fsmount.o build Ian Rogers
@ 2026-05-21 15:58 ` Mark Brown
2026-05-21 16:51 ` Namhyung Kim
1 sibling, 0 replies; 16+ messages in thread
From: Mark Brown @ 2026-05-21 15:58 UTC (permalink / raw)
To: Ian Rogers; +Cc: acme, namhyung, arnaldo.melo, linux-kernel, linux-next, linux
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
On Thu, May 21, 2026 at 08:35:58AM -0700, Ian Rogers wrote:
> A merge conflict between:
> commit 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
> commit 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
> Resulted in a missed build dependency in the merge:
> commit 61da860eee07 Merge branch 'perf-tools-next' of https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
I'll add this into -next tomorrow as part of the fixup.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH v1] perf build: Fix fsmount.o build
2026-05-21 15:35 ` [PATCH v1] perf build: Fix fsmount.o build Ian Rogers
2026-05-21 15:58 ` Mark Brown
@ 2026-05-21 16:51 ` Namhyung Kim
1 sibling, 0 replies; 16+ messages in thread
From: Namhyung Kim @ 2026-05-21 16:51 UTC (permalink / raw)
To: Ian Rogers; +Cc: broonie, acme, arnaldo.melo, linux-kernel, linux-next, linux
Hi Ian,
On Thu, May 21, 2026 at 08:35:58AM -0700, Ian Rogers wrote:
> A merge conflict between:
> commit 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
> commit 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
> Resulted in a missed build dependency in the merge:
> commit 61da860eee07 Merge branch 'perf-tools-next' of https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
>
> Fix the build by adding the necessary build dependencies.
Thanks for fixing this. I believe the right fix would be to merge
perf-tools into perf-tools-next with this resolution.
Thanks,
Namhyung
>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/trace/beauty/Build | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/trace/beauty/Build b/tools/perf/trace/beauty/Build
> index 93cde93461a3..996e63cdf765 100644
> --- a/tools/perf/trace/beauty/Build
> +++ b/tools/perf/trace/beauty/Build
> @@ -111,6 +111,13 @@ $(fsmount_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_tbls)
> $(call rule_mkdir)
> $(Q)$(call echo-cmd,gen)$(SHELL) '$(fsmount_tbls)' $(beauty_uapi_linux_dir) > $@
>
> +fsmount_attr_arrays := $(beauty_outdir)/fsmount_attr_arrays.c
> +fsmount_attr_tbls := $(srctree)/tools/perf/trace/beauty/fsmount_attr.sh
> +
> +$(fsmount_attr_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_attr_tbls)
> + $(call rule_mkdir)
> + $(Q)$(call echo-cmd,gen)$(SHELL) '$(fsmount_attr_tbls)' $(beauty_uapi_linux_dir) > $@
> +
> fspick_arrays := $(beauty_outdir)/fspick_arrays.c
> fspick_tbls := $(srctree)/tools/perf/trace/beauty/fspick.sh
>
> @@ -285,7 +292,7 @@ $(OUTPUT)trace/beauty/syscalltbl.o: $(syscall_array)
> $(OUTPUT)trace/beauty/fsconfig.o: $(fsconfig_arrays)
> $(OUTPUT)trace/beauty/clone.o: $(clone_flags_array)
> $(OUTPUT)trace/beauty/fs_at_flags.o: $(fs_at_flags_array)
> -$(OUTPUT)trace/beauty/fsmount.o: $(fsmount_arrays)
> +$(OUTPUT)trace/beauty/fsmount.o: $(fsmount_arrays) $(fsmount_attr_arrays)
> $(OUTPUT)trace/beauty/fspick.o: $(fspick_arrays)
> $(OUTPUT)trace/beauty/ioctl.o: $(drm_ioctl_array) $(sndrv_pcm_ioctl_array) $(sndrv_ctl_ioctl_array) $(kvm_ioctl_array) $(vhost_virtio_ioctl_array) $(perf_ioctl_array) $(usbdevfs_ioctl_array)
> $(OUTPUT)trace/beauty/kcmp.o: $(kcmp_type_array)
> --
> 2.54.0.746.g67dd491aae-goog
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: linux-next: manual merge of the perf tree with the origin tree
2026-05-21 15:30 ` Mark Brown
2026-05-21 15:33 ` Ian Rogers
2026-05-21 15:35 ` [PATCH v1] perf build: Fix fsmount.o build Ian Rogers
@ 2026-05-21 15:44 ` Ian Rogers
2026-05-21 16:59 ` Namhyung Kim
2 siblings, 1 reply; 16+ messages in thread
From: Ian Rogers @ 2026-05-21 15:44 UTC (permalink / raw)
To: Mark Brown
Cc: Thorsten Leemhuis, Arnaldo Carvalho de Melo, Namhyung Kim,
Arnaldo Carvalho de Melo, Linux Kernel Mailing List,
Linux Next Mailing List
On Thu, May 21, 2026 at 8:31 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, May 21, 2026 at 08:04:11AM -0700, Ian Rogers wrote:
> > On Thu, May 21, 2026 at 7:55 AM Thorsten Leemhuis <linux@leemhuis.info> wrote:
> > > On 5/21/26 12:19, Mark Brown wrote:
>
> > > > between commit:
>
> > > > 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
>
> > > > from the origin tree and commits:
>
> > > > 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
>
> > I believe this commit has issues with "perf trace: Add beautifier
> > script for fsmount flags":
> > https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git/commit/?h=perf-tools&id=552636b9317c8a843dd4496d77e56976ab48c76b
> > This change went to the perf-tools tree and then to linux/master,
> > while "perf build: Pre-generate BPF skeleton tooling during umbrella
> > prepare phase" has gone to perf-tools-next and then to linux-next.
> > I'll look into a fix.
>
> Yes, that's exactly the conflict I identified above - the lack of
> coordination there was pretty surprising TBH, and also the fact that
> 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
> went in after -rc1.
So I sent the fix:
https://lore.kernel.org/lkml/20260521153558.1421014-1-irogers@google.com/
I'm pretty oblivious to the ins and outs of merging, but hopefully,
you can work with the fix and the commit message.
How this happened: after the initial perf-tools PR for v7.1 Arnaldo
and Namhyung prepared a fixes PR, a large part of which involved
syncing kernel headers between the regular kernel include and
tools/include. That sync exposed a bug in the "beautifier" scripts
(caught by Sashiko) that scrape data from header files for "perf
trace" an strace like command that displays values for syscall
parameters, not just numbers. Namhyung wrote a fix along with the
header file merge and put it into the perf-tools branch for the PR.
Anyway, I think the issue was that perf-tools-next wasn't up-to-date
with linux/master and therefore didn't include Namhyung's change. I
think we can do better in the future but there were good intentions
all around. Sorry for the breakage.
Thanks,
Ian
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: linux-next: manual merge of the perf tree with the origin tree
2026-05-21 15:44 ` linux-next: manual merge of the perf tree with the origin tree Ian Rogers
@ 2026-05-21 16:59 ` Namhyung Kim
0 siblings, 0 replies; 16+ messages in thread
From: Namhyung Kim @ 2026-05-21 16:59 UTC (permalink / raw)
To: Ian Rogers
Cc: Mark Brown, Thorsten Leemhuis, Arnaldo Carvalho de Melo,
Arnaldo Carvalho de Melo, Linux Kernel Mailing List,
Linux Next Mailing List
On Thu, May 21, 2026 at 08:44:00AM -0700, Ian Rogers wrote:
> On Thu, May 21, 2026 at 8:31 AM Mark Brown <broonie@kernel.org> wrote:
> >
> > On Thu, May 21, 2026 at 08:04:11AM -0700, Ian Rogers wrote:
> > > On Thu, May 21, 2026 at 7:55 AM Thorsten Leemhuis <linux@leemhuis.info> wrote:
> > > > On 5/21/26 12:19, Mark Brown wrote:
> >
> > > > > between commit:
> >
> > > > > 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
> >
> > > > > from the origin tree and commits:
> >
> > > > > 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
> >
> > > I believe this commit has issues with "perf trace: Add beautifier
> > > script for fsmount flags":
> > > https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git/commit/?h=perf-tools&id=552636b9317c8a843dd4496d77e56976ab48c76b
> > > This change went to the perf-tools tree and then to linux/master,
> > > while "perf build: Pre-generate BPF skeleton tooling during umbrella
> > > prepare phase" has gone to perf-tools-next and then to linux-next.
> > > I'll look into a fix.
> >
> > Yes, that's exactly the conflict I identified above - the lack of
> > coordination there was pretty surprising TBH, and also the fact that
> > 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
> > went in after -rc1.
>
> So I sent the fix:
> https://lore.kernel.org/lkml/20260521153558.1421014-1-irogers@google.com/
> I'm pretty oblivious to the ins and outs of merging, but hopefully,
> you can work with the fix and the commit message.
>
> How this happened: after the initial perf-tools PR for v7.1 Arnaldo
> and Namhyung prepared a fixes PR, a large part of which involved
> syncing kernel headers between the regular kernel include and
> tools/include. That sync exposed a bug in the "beautifier" scripts
> (caught by Sashiko) that scrape data from header files for "perf
> trace" an strace like command that displays values for syscall
> parameters, not just numbers. Namhyung wrote a fix along with the
> header file merge and put it into the perf-tools branch for the PR.
Right, thanks for the explanation.
>
> Anyway, I think the issue was that perf-tools-next wasn't up-to-date
> with linux/master and therefore didn't include Namhyung's change. I
> think we can do better in the future but there were good intentions
> all around. Sorry for the breakage.
Normally we merge perf-tools fixes after it's applied to Linus' tree and
it used to have no problems. This time we have conflicting changes and
it's found thanks to linux-next continuous integration.
And sorry for unsmooth handling of the conflict. I should've noticed
you as I see there would be some conflicts.
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: linux-next: manual merge of the perf tree with the origin tree
2026-05-21 10:19 linux-next: manual merge of the perf tree with the origin tree Mark Brown
2026-05-21 14:55 ` Thorsten Leemhuis
@ 2026-05-21 17:03 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-05-21 17:03 UTC (permalink / raw)
To: Mark Brown
Cc: Arnaldo Carvalho de Melo, Namhyung Kim, Arnaldo Carvalho de Melo,
Ian Rogers, Linux Kernel Mailing List, Linux Next Mailing List
On Thu, May 21, 2026 at 11:19:03AM +0100, Mark Brown wrote:
> Hi all,
>
> Today's linux-next merge of the perf tree got a conflict in:
>
> tools/perf/Makefile.perf
>
> between commit:
>
> 552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
>
> from the origin tree and commits:
>
> 32969ef6e3e19 ("perf build: Pre-generate BPF skeleton tooling during umbrella prepare phase")
> 537609924c437 ("perf trace beauty: Make beauty generated C code standalone .o files")
>
> from the perf tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
I'm fixing this up, the patch below isn't enough, what Ian provided +
the following make it build for me, I'm testing this all and will push
perf-tools-next merged with torvalds/master soon.
- Arnaldo
⬢ [acme@toolbx perf-tools-next]$ git diff
diff --cc tools/perf/builtin-trace.c
index 0730c1d9f0b3adc7,48615ddccd93a1e8..0000000000000000
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@@ -783,11 -771,10 +783,6 @@@ static const char *bpf_cmd[] =
};
static DEFINE_STRARRAY(bpf_cmd, "BPF_");
- static const char *fsmount_flags[] = {
- [1] = "CLOEXEC",
- };
- static DEFINE_STRARRAY(fsmount_flags, "FSMOUNT_");
-#include "trace/beauty/generated/fsconfig_arrays.c"
-
-static DEFINE_STRARRAY(fsconfig_cmds, "FSCONFIG_");
--
static const char *epoll_ctl_ops[] = { "ADD", "DEL", "MOD", };
static DEFINE_STRARRAY_OFFSET(epoll_ctl_ops, "EPOLL_CTL_", 1);
⬢ [acme@toolbx perf-tools-next]$
> diff --cc tools/perf/Makefile.perf
> index 76b35ac19acbf,fc92d6ceac5b0..0000000000000
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@@ -508,232 -509,7 +508,6 @@@ arm64-sysreg-defs-clean
> $(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir) \
> prefix= subdir= clean > /dev/null
>
> - beauty_linux_dir := $(srctree)/tools/perf/trace/beauty/include/linux/
> - beauty_uapi_linux_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/linux/
> - beauty_uapi_sound_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/sound/
> - beauty_arch_asm_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/asm/
> - beauty_x86_arch_asm_uapi_dir := $(srctree)/tools/perf/trace/beauty/arch/x86/include/uapi/asm/
> -
> - linux_uapi_dir := $(srctree)/tools/include/uapi/linux
> - asm_generic_uapi_dir := $(srctree)/tools/include/uapi/asm-generic
> - arch_asm_uapi_dir := $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/
> - x86_arch_asm_dir := $(srctree)/tools/arch/x86/include/asm/
> -
> - beauty_outdir := $(OUTPUT)trace/beauty/generated
> - beauty_ioctl_outdir := $(beauty_outdir)/ioctl
> -
> - # Create output directory if not already present
> - $(shell [ -d '$(beauty_ioctl_outdir)' ] || mkdir -p '$(beauty_ioctl_outdir)')
> -
> - syscall_array := $(beauty_outdir)/syscalltbl.c
> - syscall_tbl := $(srctree)/tools/perf/trace/beauty/syscalltbl.sh
> - syscall_tbl_data := $(srctree)/tools/scripts/syscall.tbl \
> - $(wildcard $(srctree)/tools/perf/arch/*/entry/syscalls/syscall*.tbl)
> -
> - $(syscall_array): $(syscall_tbl) $(syscall_tbl_data)
> - $(Q)$(SHELL) '$(syscall_tbl)' $(srctree)/tools $@
> -
> - fs_at_flags_array := $(beauty_outdir)/fs_at_flags_array.c
> - fs_at_flags_tbl := $(srctree)/tools/perf/trace/beauty/fs_at_flags.sh
> -
> - $(fs_at_flags_array): $(beauty_uapi_linux_dir)/fcntl.h $(fs_at_flags_tbl)
> - $(Q)$(SHELL) '$(fs_at_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - clone_flags_array := $(beauty_outdir)/clone_flags_array.c
> - clone_flags_tbl := $(srctree)/tools/perf/trace/beauty/clone.sh
> -
> - $(clone_flags_array): $(beauty_uapi_linux_dir)/sched.h $(clone_flags_tbl)
> - $(Q)$(SHELL) '$(clone_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - drm_ioctl_array := $(beauty_ioctl_outdir)/drm_ioctl_array.c
> - drm_hdr_dir := $(srctree)/tools/perf/trace/beauty/include/uapi/drm
> - drm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/drm_ioctl.sh
> -
> - $(drm_ioctl_array): $(drm_hdr_dir)/drm.h $(drm_hdr_dir)/i915_drm.h $(drm_ioctl_tbl)
> - $(Q)$(SHELL) '$(drm_ioctl_tbl)' $(drm_hdr_dir) > $@
> -
> - fadvise_advice_array := $(beauty_outdir)/fadvise_advice_array.c
> - fadvise_advice_tbl := $(srctree)/tools/perf/trace/beauty/fadvise.sh
> -
> - $(fadvise_advice_array): $(beauty_uapi_linux_dir)/fadvise.h $(fadvise_advice_tbl)
> - $(Q)$(SHELL) '$(fadvise_advice_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - fsmount_arrays := $(beauty_outdir)/fsmount_arrays.c
> - fsmount_tbls := $(srctree)/tools/perf/trace/beauty/fsmount.sh
> -
> - $(fsmount_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_tbls)
> - $(Q)$(SHELL) '$(fsmount_tbls)' $(beauty_uapi_linux_dir) > $@
> -
> - fsmount_attr_arrays := $(beauty_outdir)/fsmount_attr_arrays.c
> - fsmount_attr_tbls := $(srctree)/tools/perf/trace/beauty/fsmount_attr.sh
> -
> - $(fsmount_attr_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_attr_tbls)
> - $(Q)$(SHELL) '$(fsmount_attr_tbls)' $(beauty_uapi_linux_dir) > $@
> -
> - fspick_arrays := $(beauty_outdir)/fspick_arrays.c
> - fspick_tbls := $(srctree)/tools/perf/trace/beauty/fspick.sh
> -
> - $(fspick_arrays): $(beauty_uapi_linux_dir)/mount.h $(fspick_tbls)
> - $(Q)$(SHELL) '$(fspick_tbls)' $(beauty_uapi_linux_dir) > $@
> -
> - fsconfig_arrays := $(beauty_outdir)/fsconfig_arrays.c
> - fsconfig_tbls := $(srctree)/tools/perf/trace/beauty/fsconfig.sh
> -
> - $(fsconfig_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsconfig_tbls)
> - $(Q)$(SHELL) '$(fsconfig_tbls)' $(beauty_uapi_linux_dir) > $@
> -
> - pkey_alloc_access_rights_array := $(beauty_outdir)/pkey_alloc_access_rights_array.c
> - asm_generic_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
> - pkey_alloc_access_rights_tbl := $(srctree)/tools/perf/trace/beauty/pkey_alloc_access_rights.sh
> -
> - $(pkey_alloc_access_rights_array): $(asm_generic_hdr_dir)/mman-common.h $(pkey_alloc_access_rights_tbl)
> - $(Q)$(SHELL) '$(pkey_alloc_access_rights_tbl)' $(asm_generic_hdr_dir) > $@
> -
> - sndrv_ctl_ioctl_array := $(beauty_ioctl_outdir)/sndrv_ctl_ioctl_array.c
> - sndrv_ctl_hdr_dir := $(srctree)/tools/include/uapi/sound
> - sndrv_ctl_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh
> -
> - $(sndrv_ctl_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_ctl_ioctl_tbl)
> - $(Q)$(SHELL) '$(sndrv_ctl_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@
> -
> - sndrv_pcm_ioctl_array := $(beauty_ioctl_outdir)/sndrv_pcm_ioctl_array.c
> - sndrv_pcm_hdr_dir := $(srctree)/tools/include/uapi/sound
> - sndrv_pcm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh
> -
> - $(sndrv_pcm_ioctl_array): $(beauty_uapi_sound_dir)/asound.h $(sndrv_pcm_ioctl_tbl)
> - $(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(beauty_uapi_sound_dir) > $@
> -
> - kcmp_type_array := $(beauty_outdir)/kcmp_type_array.c
> - kcmp_hdr_dir := $(srctree)/tools/include/uapi/linux/
> - kcmp_type_tbl := $(srctree)/tools/perf/trace/beauty/kcmp_type.sh
> -
> - $(kcmp_type_array): $(kcmp_hdr_dir)/kcmp.h $(kcmp_type_tbl)
> - $(Q)$(SHELL) '$(kcmp_type_tbl)' $(kcmp_hdr_dir) > $@
> -
> - kvm_ioctl_array := $(beauty_ioctl_outdir)/kvm_ioctl_array.c
> - kvm_hdr_dir := $(srctree)/tools/include/uapi/linux
> - kvm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/kvm_ioctl.sh
> -
> - $(kvm_ioctl_array): $(kvm_hdr_dir)/kvm.h $(kvm_ioctl_tbl)
> - $(Q)$(SHELL) '$(kvm_ioctl_tbl)' $(kvm_hdr_dir) > $@
> -
> - socket_arrays := $(beauty_outdir)/socket.c
> - socket_tbl := $(srctree)/tools/perf/trace/beauty/socket.sh
> -
> - $(socket_arrays): $(linux_uapi_dir)/in.h $(beauty_linux_dir)/socket.h $(socket_tbl)
> - $(Q)$(SHELL) '$(socket_tbl)' $(linux_uapi_dir) $(beauty_linux_dir) > $@
> -
> - sockaddr_arrays := $(beauty_outdir)/sockaddr.c
> - sockaddr_tbl := $(srctree)/tools/perf/trace/beauty/sockaddr.sh
> -
> - $(sockaddr_arrays): $(beauty_linux_dir)/socket.h $(sockaddr_tbl)
> - $(Q)$(SHELL) '$(sockaddr_tbl)' $(beauty_linux_dir) > $@
> -
> - vhost_virtio_ioctl_array := $(beauty_ioctl_outdir)/vhost_virtio_ioctl_array.c
> - vhost_virtio_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/vhost_virtio_ioctl.sh
> -
> - $(vhost_virtio_ioctl_array): $(beauty_uapi_linux_dir)/vhost.h $(vhost_virtio_ioctl_tbl)
> - $(Q)$(SHELL) '$(vhost_virtio_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - perf_ioctl_array := $(beauty_ioctl_outdir)/perf_ioctl_array.c
> - perf_hdr_dir := $(srctree)/tools/include/uapi/linux
> - perf_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/perf_ioctl.sh
> -
> - $(perf_ioctl_array): $(perf_hdr_dir)/perf_event.h $(perf_ioctl_tbl)
> - $(Q)$(SHELL) '$(perf_ioctl_tbl)' $(perf_hdr_dir) > $@
> -
> - madvise_behavior_array := $(beauty_outdir)/madvise_behavior_array.c
> - madvise_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
> - madvise_behavior_tbl := $(srctree)/tools/perf/trace/beauty/madvise_behavior.sh
> -
> - $(madvise_behavior_array): $(madvise_hdr_dir)/mman-common.h $(madvise_behavior_tbl)
> - $(Q)$(SHELL) '$(madvise_behavior_tbl)' $(madvise_hdr_dir) > $@
> -
> - mmap_flags_array := $(beauty_outdir)/mmap_flags_array.c
> - mmap_flags_tbl := $(srctree)/tools/perf/trace/beauty/mmap_flags.sh
> -
> - $(mmap_flags_array): $(linux_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman-common.h $(mmap_flags_tbl)
> - $(Q)$(SHELL) '$(mmap_flags_tbl)' $(linux_uapi_dir) $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@
> -
> - mremap_flags_array := $(beauty_outdir)/mremap_flags_array.c
> - mremap_flags_tbl := $(srctree)/tools/perf/trace/beauty/mremap_flags.sh
> -
> - $(mremap_flags_array): $(linux_uapi_dir)/mman.h $(mremap_flags_tbl)
> - $(Q)$(SHELL) '$(mremap_flags_tbl)' $(linux_uapi_dir) > $@
> -
> - mount_flags_array := $(beauty_outdir)/mount_flags_array.c
> - mount_flags_tbl := $(srctree)/tools/perf/trace/beauty/mount_flags.sh
> -
> - $(mount_flags_array): $(beauty_uapi_linux_dir)/mount.h $(mount_flags_tbl)
> - $(Q)$(SHELL) '$(mount_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - move_mount_flags_array := $(beauty_outdir)/move_mount_flags_array.c
> - move_mount_flags_tbl := $(srctree)/tools/perf/trace/beauty/move_mount_flags.sh
> -
> - $(move_mount_flags_array): $(beauty_uapi_linux_dir)/mount.h $(move_mount_flags_tbl)
> - $(Q)$(SHELL) '$(move_mount_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - mmap_prot_array := $(beauty_outdir)/mmap_prot_array.c
> - mmap_prot_tbl := $(srctree)/tools/perf/trace/beauty/mmap_prot.sh
> -
> - $(mmap_prot_array): $(asm_generic_uapi_dir)/mman.h $(asm_generic_uapi_dir)/mman-common.h $(mmap_prot_tbl)
> - $(Q)$(SHELL) '$(mmap_prot_tbl)' $(asm_generic_uapi_dir) $(arch_asm_uapi_dir) > $@
> -
> - prctl_option_array := $(beauty_outdir)/prctl_option_array.c
> - prctl_option_tbl := $(srctree)/tools/perf/trace/beauty/prctl_option.sh
> -
> - $(prctl_option_array): $(beauty_uapi_linux_dir)/prctl.h $(prctl_option_tbl)
> - $(Q)$(SHELL) '$(prctl_option_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - usbdevfs_ioctl_array := $(beauty_ioctl_outdir)/usbdevfs_ioctl_array.c
> - usbdevfs_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/usbdevfs_ioctl.sh
> -
> - $(usbdevfs_ioctl_array): $(beauty_uapi_linux_dir)/usbdevice_fs.h $(usbdevfs_ioctl_tbl)
> - $(Q)$(SHELL) '$(usbdevfs_ioctl_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - x86_arch_prctl_code_array := $(beauty_outdir)/x86_arch_prctl_code_array.c
> - x86_arch_prctl_code_tbl := $(srctree)/tools/perf/trace/beauty/x86_arch_prctl.sh
> -
> - $(x86_arch_prctl_code_array): $(beauty_x86_arch_asm_uapi_dir)/prctl.h $(x86_arch_prctl_code_tbl)
> - $(Q)$(SHELL) '$(x86_arch_prctl_code_tbl)' $(beauty_x86_arch_asm_uapi_dir) > $@
> -
> - x86_arch_irq_vectors_array := $(beauty_outdir)/x86_arch_irq_vectors_array.c
> - x86_arch_irq_vectors_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh
> -
> - $(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) > $@
> -
> - x86_arch_MSRs_array := $(beauty_outdir)/x86_arch_MSRs_array.c
> - x86_arch_MSRs_tbl := $(srctree)/tools/perf/trace/beauty/tracepoints/x86_msr.sh
> -
> - $(x86_arch_MSRs_array): $(x86_arch_asm_dir)/msr-index.h $(x86_arch_MSRs_tbl)
> - $(Q)$(SHELL) '$(x86_arch_MSRs_tbl)' $(x86_arch_asm_dir) > $@
> -
> - rename_flags_array := $(beauty_outdir)/rename_flags_array.c
> - rename_flags_tbl := $(srctree)/tools/perf/trace/beauty/rename_flags.sh
> -
> - $(rename_flags_array): $(beauty_uapi_linux_dir)/fs.h $(rename_flags_tbl)
> - $(Q)$(SHELL) '$(rename_flags_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - arch_errno_name_array := $(beauty_outdir)/arch_errno_name_array.c
> - arch_errno_hdr_dir := $(srctree)/tools
> - arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
> -
> - $(arch_errno_name_array): $(arch_errno_tbl)
> - $(Q)$(SHELL) '$(arch_errno_tbl)' '$(patsubst -%,,$(CC))' $(arch_errno_hdr_dir) > $@
> -
> - statx_mask_array := $(beauty_outdir)/statx_mask_array.c
> - statx_mask_tbl := $(srctree)/tools/perf/trace/beauty/statx_mask.sh
> -
> - $(statx_mask_array): $(beauty_uapi_linux_dir)/stat.h $(statx_mask_tbl)
> - $(Q)$(SHELL) '$(statx_mask_tbl)' $(beauty_uapi_linux_dir) > $@
> -
> - sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
> - sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh
> -
> - $(sync_file_range_arrays): $(beauty_uapi_linux_dir)/fs.h $(sync_file_range_tbls)
> - $(Q)$(SHELL) '$(sync_file_range_tbls)' $(beauty_uapi_linux_dir) > $@
> --
> TESTS_CORESIGHT_DIR := $(srctree)/tools/perf/tests/shell/coresight
>
> tests-coresight-targets: FORCE
^ permalink raw reply [flat|nested] 16+ messages in thread
* linux-next: manual merge of the perf tree with the origin tree
@ 2026-05-21 10:18 Mark Brown
0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2026-05-21 10:18 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Namhyung Kim
Cc: Arnaldo Carvalho de Melo, Ian Rogers, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 47904 bytes --]
Hi all,
Today's linux-next merge of the perf tree got a conflict in:
tools/perf/builtin-trace.c
between commit:
552636b9317c8 ("perf trace: Add beautifier script for fsmount flags")
from the origin tree and commit:
537609924c437 ("perf trace beauty: Make beauty generated C code standalone .o files")
from the perf tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
This is obviously not the right merge but it builds.
diff --combined tools/perf/builtin-trace.c
index 48615ddccd93a,0730c1d9f0b3a..0000000000000
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@@ -60,12 -60,13 +60,13 @@@
#include "callchain.h"
#include "print_binary.h"
#include "string2.h"
- #include "syscalltbl.h"
+ #include "trace/beauty/syscalltbl.h"
#include "../perf.h"
#include "trace_augment.h"
#include "dwarf-regs.h"
#include <errno.h>
+ #include <sys/stat.h>
#include <inttypes.h>
#include <poll.h>
#include <signal.h>
@@@ -217,6 -218,7 +218,7 @@@ struct trace
bool kernel_syscallchains;
s16 args_alignment;
bool show_tstamp;
+ bool show_cpu;
bool show_duration;
bool show_zeros;
bool show_arg_names;
@@@ -234,6 -236,16 +236,16 @@@
const char *uid_str;
};
+ bool trace__show_zeros(const struct trace *trace)
+ {
+ return trace->show_zeros;
+ }
+
+ struct machine *trace__host(const struct trace *trace)
+ {
+ return trace->host;
+ }
+
static void trace__load_vmlinux_btf(struct trace *trace __maybe_unused)
{
#ifdef HAVE_LIBBPF_SUPPORT
@@@ -535,12 -547,12 +547,12 @@@ out_delete
return NULL;
}
- #define perf_evsel__sc_tp_uint(evsel, name, sample) \
- ({ struct syscall_tp *fields = __evsel__syscall_tp(evsel); \
+ #define perf_evsel__sc_tp_uint(name, sample) \
+ ({ struct syscall_tp *fields = __evsel__syscall_tp(sample->evsel); \
fields->name.integer(&fields->name, sample); })
- #define perf_evsel__sc_tp_ptr(evsel, name, sample) \
- ({ struct syscall_tp *fields = __evsel__syscall_tp(evsel); \
+ #define perf_evsel__sc_tp_ptr(name, sample) \
+ ({ struct syscall_tp *fields = __evsel__syscall_tp(sample->evsel); \
fields->name.pointer(&fields->name, sample); })
size_t strarray__scnprintf_suffix(struct strarray *sa, char *bf, size_t size, const char *intfmt, bool show_suffix, int val)
@@@ -771,9 -783,10 +783,10 @@@ static const char *bpf_cmd[] =
};
static DEFINE_STRARRAY(bpf_cmd, "BPF_");
- #include "trace/beauty/generated/fsconfig_arrays.c"
-
- static DEFINE_STRARRAY(fsconfig_cmds, "FSCONFIG_");
+ static const char *fsmount_flags[] = {
+ [1] = "CLOEXEC",
+ };
+ static DEFINE_STRARRAY(fsmount_flags, "FSMOUNT_");
static const char *epoll_ctl_ops[] = { "ADD", "DEL", "MOD", };
static DEFINE_STRARRAY_OFFSET(epoll_ctl_ops, "EPOLL_CTL_", 1);
@@@ -1123,21 -1136,6 +1136,6 @@@ static bool syscall_arg__strtoul_btf_ty
.parm = &strarray__##array, \
.show_zero = true, }
- #include "trace/beauty/eventfd.c"
- #include "trace/beauty/futex_op.c"
- #include "trace/beauty/futex_val3.c"
- #include "trace/beauty/mmap.c"
- #include "trace/beauty/mode_t.c"
- #include "trace/beauty/msg_flags.c"
- #include "trace/beauty/open_flags.c"
- #include "trace/beauty/perf_event_open.c"
- #include "trace/beauty/pid.c"
- #include "trace/beauty/sched_policy.c"
- #include "trace/beauty/seccomp.c"
- #include "trace/beauty/signum.c"
- #include "trace/beauty/socket_type.c"
- #include "trace/beauty/waitid_options.c"
-
static const struct syscall_fmt syscall_fmts[] = {
{ .name = "access",
.arg = { [1] = { .scnprintf = SCA_ACCMODE, /* mode */ }, }, },
@@@ -1197,9 -1195,7 +1195,9 @@@
{ .name = "fsconfig",
.arg = { [1] = STRARRAY(cmd, fsconfig_cmds), }, },
{ .name = "fsmount",
- .arg = { [1] = STRARRAY_FLAGS(flags, fsmount_flags),
+ .arg = { [1] = { .scnprintf = SCA_FSMOUNT_FLAGS, /* fsmount_flags */
+ .strtoul = STUL_STRARRAYS,
+ .show_zero = true, },
[2] = { .scnprintf = SCA_FSMOUNT_ATTR_FLAGS, /* attr_flags */ }, }, },
{ .name = "fspick",
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ },
@@@ -1528,6 -1524,7 +1526,7 @@@ static size_t fprintf_duration(unsigne
*/
struct thread_trace {
u64 entry_time;
+ u32 entry_cpu;
bool entry_pending;
unsigned long nr_events;
unsigned long pfmaj, pfmin;
@@@ -1890,6 -1887,27 +1889,27 @@@ static size_t trace__fprintf_tstamp(str
return fprintf(fp, " ? ");
}
+ /**
+ * trace__fprintf_cpu - Print the CPU ID to a given file stream
+ * @cpu: The CPU ID to print
+ * @fp: The file stream to write to
+ *
+ * Formats and prints the specified CPU ID enclosed in brackets
+ * (e.g., "[003] ") to the provided file pointer. It is used to
+ * align and display the CPU ID consistently within the trace output.
+ *
+ * Return: The number of characters printed.
+ */
+ static size_t trace__fprintf_cpu(u32 cpu, FILE *fp)
+ {
+ size_t printed = 0;
+
+ if (cpu != (u32)-1)
+ printed += fprintf(fp, "[%03u] ", cpu);
+
+ return printed;
+ }
+
static pid_t workload_pid = -1;
static volatile sig_atomic_t done = false;
static volatile sig_atomic_t interrupted = false;
@@@ -1920,12 -1938,15 +1940,15 @@@ static size_t trace__fprintf_comm_tid(s
}
static size_t trace__fprintf_entry_head(struct trace *trace, struct thread *thread,
- u64 duration, bool duration_calculated, u64 tstamp, FILE *fp)
+ u64 duration, bool duration_calculated,
+ u64 tstamp, u32 cpu, FILE *fp)
{
size_t printed = 0;
if (trace->show_tstamp)
printed = trace__fprintf_tstamp(trace, tstamp, fp);
+ if (trace->show_cpu && cpu != (u32)-1)
+ printed += trace__fprintf_cpu(cpu, fp);
if (trace->show_duration)
printed += fprintf_duration(duration, duration_calculated, fp);
return printed + trace__fprintf_comm_tid(trace, thread, fp);
@@@ -2579,7 -2600,7 +2602,7 @@@ static struct syscall *trace__find_sysc
return sc;
}
- typedef int (*tracepoint_handler)(struct trace *trace, struct evsel *evsel,
+ typedef int (*tracepoint_handler)(struct trace *trace,
union perf_event *event,
struct perf_sample *sample);
@@@ -2704,7 -2725,9 +2727,9 @@@ static int trace__printf_interrupted_en
if (!ttrace->entry_pending)
return 0;
- printed = trace__fprintf_entry_head(trace, trace->current, 0, false, ttrace->entry_time, trace->output);
+ printed = trace__fprintf_entry_head(trace, trace->current, 0, false,
+ ttrace->entry_time, ttrace->entry_cpu,
+ trace->output);
printed += len = fprintf(trace->output, "%s)", ttrace->entry_str);
if (len < trace->args_alignment - 4)
@@@ -2718,8 -2741,8 +2743,8 @@@
return printed;
}
- static int trace__fprintf_sample(struct trace *trace, struct evsel *evsel,
- struct perf_sample *sample, struct thread *thread)
+ static int trace__fprintf_sample(struct trace *trace, struct perf_sample *sample,
+ struct thread *thread)
{
int printed = 0;
@@@ -2727,7 -2750,7 +2752,7 @@@
double ts = (double)sample->time / NSEC_PER_MSEC;
printed += fprintf(trace->output, "%22s %10.3f %s %d/%d [%d]\n",
- evsel__name(evsel), ts,
+ evsel__name(sample->evsel), ts,
thread__comm_str(thread),
sample->pid, sample->tid, sample->cpu);
}
@@@ -2774,15 -2797,16 +2799,16 @@@ static void *syscall__augmented_args(st
return NULL;
}
- static int trace__sys_enter(struct trace *trace, struct evsel *evsel,
+ static int trace__sys_enter(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
+ struct evsel *evsel = sample->evsel;
char *msg;
void *args;
int printed = 0;
struct thread *thread;
- int id = perf_evsel__sc_tp_uint(evsel, id, sample), err = -1;
+ int id = perf_evsel__sc_tp_uint(id, sample), err = -1;
int augmented_args_size = 0, e_machine;
void *augmented_args = NULL;
struct syscall *sc;
@@@ -2797,9 -2821,9 +2823,9 @@@
if (ttrace == NULL)
goto out_put;
- trace__fprintf_sample(trace, evsel, sample, thread);
+ trace__fprintf_sample(trace, sample, thread);
- args = perf_evsel__sc_tp_ptr(evsel, args, sample);
+ args = perf_evsel__sc_tp_ptr(args, sample);
if (ttrace->entry_str == NULL) {
ttrace->entry_str = malloc(trace__entry_str_size);
@@@ -2822,6 -2846,7 +2848,7 @@@
if (evsel != trace->syscalls.events.sys_enter)
augmented_args = syscall__augmented_args(sc, sample, &augmented_args_size, trace->raw_augmented_syscalls_args_size);
ttrace->entry_time = sample->time;
+ ttrace->entry_cpu = sample->cpu;
msg = ttrace->entry_str;
printed += scnprintf(msg + printed, trace__entry_str_size - printed, "%s(", sc->name);
@@@ -2832,7 -2857,9 +2859,9 @@@
if (!(trace->duration_filter || trace->summary_only || trace->failure_only || trace->min_stack)) {
int alignment = 0;
- trace__fprintf_entry_head(trace, thread, 0, false, ttrace->entry_time, trace->output);
+ trace__fprintf_entry_head(trace, thread, 0, false,
+ ttrace->entry_time,
+ sample->cpu, trace->output);
printed = fprintf(trace->output, "%s)", ttrace->entry_str);
if (trace->args_alignment > printed)
alignment = trace->args_alignment - printed;
@@@ -2854,12 -2881,11 +2883,11 @@@ out_put
return err;
}
- static int trace__fprintf_sys_enter(struct trace *trace, struct evsel *evsel,
- struct perf_sample *sample)
+ static int trace__fprintf_sys_enter(struct trace *trace, struct perf_sample *sample)
{
struct thread_trace *ttrace;
struct thread *thread;
- int id = perf_evsel__sc_tp_uint(evsel, id, sample), err = -1;
+ int id = perf_evsel__sc_tp_uint(id, sample), err = -1;
struct syscall *sc;
char msg[1024];
void *args, *augmented_args = NULL;
@@@ -2869,7 -2895,7 +2897,7 @@@
thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
e_machine = thread__e_machine(thread, trace->host, /*e_flags=*/NULL);
- sc = trace__syscall_info(trace, evsel, e_machine, id);
+ sc = trace__syscall_info(trace, sample->evsel, e_machine, id);
if (sc == NULL)
goto out_put;
ttrace = thread__trace(thread, trace);
@@@ -2880,7 -2906,7 +2908,7 @@@
if (ttrace == NULL)
goto out_put;
- args = perf_evsel__sc_tp_ptr(evsel, args, sample);
+ args = perf_evsel__sc_tp_ptr(args, sample);
augmented_args = syscall__augmented_args(sc, sample, &augmented_args_size, trace->raw_augmented_syscalls_args_size);
printed += syscall__scnprintf_args(sc, msg, sizeof(msg), args, augmented_args, augmented_args_size, trace, thread);
fprintf(trace->output, "%.*s", (int)printed, msg);
@@@ -2890,10 -2916,11 +2918,11 @@@ out_put
return err;
}
- static int trace__resolve_callchain(struct trace *trace, struct evsel *evsel,
+ static int trace__resolve_callchain(struct trace *trace,
struct perf_sample *sample,
struct callchain_cursor *cursor)
{
+ struct evsel *evsel = sample->evsel;
struct addr_location al;
int max_stack = evsel->core.attr.sample_max_stack ?
evsel->core.attr.sample_max_stack :
@@@ -2904,7 -2931,7 +2933,7 @@@
if (machine__resolve(trace->host, &al, sample) < 0)
goto out;
- err = thread__resolve_callchain(al.thread, cursor, evsel, sample, NULL, NULL, max_stack);
+ err = thread__resolve_callchain(al.thread, cursor, sample, NULL, NULL, max_stack);
out:
addr_location__exit(&al);
return err;
@@@ -2920,15 -2947,16 +2949,16 @@@ static int trace__fprintf_callchain(str
return sample__fprintf_callchain(sample, 38, print_opts, get_tls_callchain_cursor(), symbol_conf.bt_stop_list, trace->output);
}
- static int trace__sys_exit(struct trace *trace, struct evsel *evsel,
+ static int trace__sys_exit(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
+ struct evsel *evsel = sample->evsel;
long ret;
u64 duration = 0;
bool duration_calculated = false;
struct thread *thread;
- int id = perf_evsel__sc_tp_uint(evsel, id, sample), err = -1, callchain_ret = 0, printed = 0;
+ int id = perf_evsel__sc_tp_uint(id, sample), err = -1, callchain_ret = 0, printed = 0;
int alignment = trace->args_alignment, e_machine;
struct syscall *sc;
struct thread_trace *ttrace;
@@@ -2942,9 -2970,9 +2972,9 @@@
if (ttrace == NULL)
goto out_put;
- trace__fprintf_sample(trace, evsel, sample, thread);
+ trace__fprintf_sample(trace, sample, thread);
- ret = perf_evsel__sc_tp_uint(evsel, ret, sample);
+ ret = perf_evsel__sc_tp_uint(ret, sample);
if (trace->summary)
thread__update_stats(thread, ttrace, id, sample, ret, trace);
@@@ -2966,7 -2994,7 +2996,7 @@@
if (sample->callchain) {
struct callchain_cursor *cursor = get_tls_callchain_cursor();
- callchain_ret = trace__resolve_callchain(trace, evsel, sample, cursor);
+ callchain_ret = trace__resolve_callchain(trace, sample, cursor);
if (callchain_ret == 0) {
if (cursor->nr < trace->min_stack)
goto out;
@@@ -2977,7 -3005,9 +3007,9 @@@
if (trace->summary_only || (ret >= 0 && trace->failure_only))
goto out;
- trace__fprintf_entry_head(trace, thread, duration, duration_calculated, ttrace->entry_time, trace->output);
+ trace__fprintf_entry_head(trace, thread, duration,
+ duration_calculated, ttrace->entry_time,
+ sample->cpu, trace->output);
if (ttrace->entry_pending) {
printed = fprintf(trace->output, "%s", ttrace->entry_str);
@@@ -3058,7 -3088,7 +3090,7 @@@ out_put
return err;
}
- static int trace__vfs_getname(struct trace *trace, struct evsel *evsel,
+ static int trace__vfs_getname(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
@@@ -3067,7 -3097,7 +3099,7 @@@
size_t filename_len, entry_str_len, to_move;
ssize_t remaining_space;
char *pos;
- const char *filename = evsel__rawptr(evsel, sample, "pathname");
+ const char *filename = perf_sample__strval(sample, "pathname");
if (!thread)
goto out;
@@@ -3119,11 -3149,11 +3151,11 @@@ out
return 0;
}
- static int trace__sched_stat_runtime(struct trace *trace, struct evsel *evsel,
+ static int trace__sched_stat_runtime(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
- u64 runtime = evsel__intval(evsel, sample, "runtime");
+ u64 runtime = perf_sample__intval(sample, "runtime");
double runtime_ms = (double)runtime / NSEC_PER_MSEC;
struct thread *thread = machine__findnew_thread(trace->host,
sample->pid,
@@@ -3141,11 -3171,11 +3173,11 @@@ out_put
out_dump:
fprintf(trace->output, "%s: comm=%s,pid=%u,runtime=%" PRIu64 ",vruntime=%" PRIu64 ")\n",
- evsel->name,
- evsel__strval(evsel, sample, "comm"),
- (pid_t)evsel__intval(evsel, sample, "pid"),
+ sample->evsel->name,
+ perf_sample__strval(sample, "comm"),
+ (pid_t)perf_sample__intval(sample, "pid"),
runtime,
- evsel__intval(evsel, sample, "vruntime"));
+ perf_sample__intval(sample, "vruntime"));
goto out_put;
}
@@@ -3181,9 -3211,10 +3213,10 @@@ static void bpf_output__fprintf(struct
++trace->nr_events_printed;
}
- static size_t trace__fprintf_tp_fields(struct trace *trace, struct evsel *evsel, struct perf_sample *sample,
+ static size_t trace__fprintf_tp_fields(struct trace *trace, struct perf_sample *sample,
struct thread *thread, void *augmented_args, int augmented_args_size)
{
+ struct evsel *evsel = sample->evsel;
char bf[2048];
size_t size = sizeof(bf);
const struct tep_event *tp_format = evsel__tp_format(evsel);
@@@ -3251,10 -3282,11 +3284,11 @@@
return fprintf(trace->output, "%.*s", (int)printed, bf);
}
- static int trace__event_handler(struct trace *trace, struct evsel *evsel,
+ static int trace__event_handler(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
+ struct evsel *evsel = sample->evsel;
struct thread *thread;
int callchain_ret = 0;
@@@ -3266,7 -3298,7 +3300,7 @@@
if (sample->callchain) {
struct callchain_cursor *cursor = get_tls_callchain_cursor();
- callchain_ret = trace__resolve_callchain(trace, evsel, sample, cursor);
+ callchain_ret = trace__resolve_callchain(trace, sample, cursor);
if (callchain_ret == 0) {
if (cursor->nr < trace->min_stack)
goto out;
@@@ -3277,6 -3309,9 +3311,9 @@@
trace__printf_interrupted_entry(trace);
trace__fprintf_tstamp(trace, sample->time, trace->output);
+ if (trace->show_cpu)
+ trace__fprintf_cpu(sample->cpu, trace->output);
+
if (trace->trace_syscalls && trace->show_duration)
fprintf(trace->output, "( ): ");
@@@ -3284,7 -3319,7 +3321,7 @@@
trace__fprintf_comm_tid(trace, thread, trace->output);
if (evsel == trace->syscalls.events.bpf_output) {
- int id = perf_evsel__sc_tp_uint(evsel, id, sample);
+ int id = perf_evsel__sc_tp_uint(id, sample);
int e_machine = thread
? thread__e_machine(thread, trace->host, /*e_flags=*/NULL)
: EM_HOST;
@@@ -3292,7 -3327,7 +3329,7 @@@
if (sc) {
fprintf(trace->output, "%s(", sc->name);
- trace__fprintf_sys_enter(trace, evsel, sample);
+ trace__fprintf_sys_enter(trace, sample);
fputc(')', trace->output);
goto newline;
}
@@@ -3312,13 -3347,13 +3349,13 @@@
const struct tep_event *tp_format = evsel__tp_format(evsel);
if (tp_format && (strncmp(tp_format->name, "sys_enter_", 10) ||
- trace__fprintf_sys_enter(trace, evsel, sample))) {
+ trace__fprintf_sys_enter(trace, sample))) {
if (trace->libtraceevent_print) {
event_format__fprintf(tp_format, sample->cpu,
sample->raw_data, sample->raw_size,
trace->output);
} else {
- trace__fprintf_tp_fields(trace, evsel, sample, thread, NULL, 0);
+ trace__fprintf_tp_fields(trace, sample, thread, NULL, 0);
}
}
}
@@@ -3360,7 -3395,6 +3397,6 @@@ static void print_location(FILE *f, str
}
static int trace__pgfault(struct trace *trace,
- struct evsel *evsel,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
@@@ -3377,7 -3411,7 +3413,7 @@@
if (sample->callchain) {
struct callchain_cursor *cursor = get_tls_callchain_cursor();
- callchain_ret = trace__resolve_callchain(trace, evsel, sample, cursor);
+ callchain_ret = trace__resolve_callchain(trace, sample, cursor);
if (callchain_ret == 0) {
if (cursor->nr < trace->min_stack)
goto out_put;
@@@ -3389,7 -3423,7 +3425,7 @@@
if (ttrace == NULL)
goto out_put;
- if (evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ) {
+ if (sample->evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ) {
ttrace->pfmaj++;
trace->pfmaj++;
} else {
@@@ -3402,10 -3436,11 +3438,11 @@@
thread__find_symbol(thread, sample->cpumode, sample->ip, &al);
- trace__fprintf_entry_head(trace, thread, 0, true, sample->time, trace->output);
+ trace__fprintf_entry_head(trace, thread, 0, true, sample->time,
+ sample->cpu, trace->output);
fprintf(trace->output, "%sfault [",
- evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ ?
+ sample->evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ ?
"maj" : "min");
print_location(trace->output, sample, &al, false, true);
@@@ -3430,7 -3465,8 +3467,8 @@@
if (callchain_ret > 0)
trace__fprintf_callchain(trace, sample);
else if (callchain_ret < 0)
- pr_err("Problem processing %s callchain, skipping...\n", evsel__name(evsel));
+ pr_err("Problem processing %s callchain, skipping...\n",
+ evsel__name(sample->evsel));
++trace->nr_events_printed;
out:
@@@ -3442,7 -3478,6 +3480,6 @@@ out_put
}
static void trace__set_base_time(struct trace *trace,
- struct evsel *evsel,
struct perf_sample *sample)
{
/*
@@@ -3454,17 -3489,17 +3491,17 @@@
* appears in our event stream (vfs_getname comes to mind).
*/
if (trace->base_time == 0 && !trace->full_time &&
- (evsel->core.attr.sample_type & PERF_SAMPLE_TIME))
+ (sample->evsel->core.attr.sample_type & PERF_SAMPLE_TIME))
trace->base_time = sample->time;
}
static int trace__process_sample(const struct perf_tool *tool,
union perf_event *event,
struct perf_sample *sample,
- struct evsel *evsel,
struct machine *machine __maybe_unused)
{
struct trace *trace = container_of(tool, struct trace, tool);
+ struct evsel *evsel = sample->evsel;
struct thread *thread;
int err = 0;
@@@ -3474,11 -3509,11 +3511,11 @@@
if (thread && thread__is_filtered(thread))
goto out;
- trace__set_base_time(trace, evsel, sample);
+ trace__set_base_time(trace, sample);
if (handler) {
++trace->nr_events;
- handler(trace, evsel, event, sample);
+ handler(trace, event, sample);
}
out:
thread__put(thread);
@@@ -3620,32 -3655,34 +3657,34 @@@ static void evlist__free_syscall_tp_fie
static void trace__handle_event(struct trace *trace, union perf_event *event, struct perf_sample *sample)
{
const u32 type = event->header.type;
- struct evsel *evsel;
if (type != PERF_RECORD_SAMPLE) {
trace__process_event(trace, trace->host, event, sample);
return;
}
- evsel = evlist__id2evsel(trace->evlist, sample->id);
- if (evsel == NULL) {
+ if (sample->evsel == NULL)
+ sample->evsel = evlist__id2evsel(trace->evlist, sample->id);
+
+ if (sample->evsel == NULL) {
fprintf(trace->output, "Unknown tp ID %" PRIu64 ", skipping...\n", sample->id);
return;
}
- if (evswitch__discard(&trace->evswitch, evsel))
+ if (evswitch__discard(&trace->evswitch, sample->evsel))
return;
- trace__set_base_time(trace, evsel, sample);
+ trace__set_base_time(trace, sample);
- if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT &&
+ if (sample->evsel->core.attr.type == PERF_TYPE_TRACEPOINT &&
sample->raw_data == NULL) {
fprintf(trace->output, "%s sample with no payload for tid: %d, cpu %d, raw_size=%d, skipping...\n",
- evsel__name(evsel), sample->tid,
+ evsel__name(sample->evsel), sample->tid,
sample->cpu, sample->raw_size);
} else {
- tracepoint_handler handler = evsel->handler;
- handler(trace, evsel, event, sample);
+ tracepoint_handler handler = sample->evsel->handler;
+
+ handler(trace, event, sample);
}
if (trace->nr_events_printed >= trace->max_events && trace->max_events != ULONG_MAX)
@@@ -5429,6 -5466,7 +5468,7 @@@ int cmd_trace(int argc, const char **ar
OPT_CALLBACK('m', "mmap-pages", &trace.opts.mmap_pages, "pages",
"number of mmap data pages", evlist__parse_mmap_pages),
OPT_STRING('u', "uid", &trace.uid_str, "user", "user to profile"),
+ OPT_BOOLEAN(0, "show-cpu", &trace.show_cpu, "show cpu id"),
OPT_CALLBACK(0, "duration", &trace, "float",
"show only events with duration > N.M ms",
trace__set_duration),
@@@ -5563,6 -5601,9 +5603,9 @@@
goto out;
}
+ if (trace.show_cpu)
+ trace.opts.sample_cpu = true;
+
if ((nr_cgroups || trace.cgroup) && !trace.opts.target.system_wide) {
usage_with_options_msg(trace_usage, trace_options,
"cgroup monitoring only available in system-wide mode");
@@@ -60,12 -60,13 +60,13 @@@
#include "callchain.h"
#include "print_binary.h"
#include "string2.h"
- #include "syscalltbl.h"
+ #include "trace/beauty/syscalltbl.h"
#include "../perf.h"
#include "trace_augment.h"
#include "dwarf-regs.h"
#include <errno.h>
+ #include <sys/stat.h>
#include <inttypes.h>
#include <poll.h>
#include <signal.h>
@@@ -217,6 -218,7 +218,7 @@@ struct trace
bool kernel_syscallchains;
s16 args_alignment;
bool show_tstamp;
+ bool show_cpu;
bool show_duration;
bool show_zeros;
bool show_arg_names;
@@@ -234,6 -236,16 +236,16 @@@
const char *uid_str;
};
+ bool trace__show_zeros(const struct trace *trace)
+ {
+ return trace->show_zeros;
+ }
+
+ struct machine *trace__host(const struct trace *trace)
+ {
+ return trace->host;
+ }
+
static void trace__load_vmlinux_btf(struct trace *trace __maybe_unused)
{
#ifdef HAVE_LIBBPF_SUPPORT
@@@ -535,12 -547,12 +547,12 @@@ out_delete
return NULL;
}
- #define perf_evsel__sc_tp_uint(evsel, name, sample) \
- ({ struct syscall_tp *fields = __evsel__syscall_tp(evsel); \
+ #define perf_evsel__sc_tp_uint(name, sample) \
+ ({ struct syscall_tp *fields = __evsel__syscall_tp(sample->evsel); \
fields->name.integer(&fields->name, sample); })
- #define perf_evsel__sc_tp_ptr(evsel, name, sample) \
- ({ struct syscall_tp *fields = __evsel__syscall_tp(evsel); \
+ #define perf_evsel__sc_tp_ptr(name, sample) \
+ ({ struct syscall_tp *fields = __evsel__syscall_tp(sample->evsel); \
fields->name.pointer(&fields->name, sample); })
size_t strarray__scnprintf_suffix(struct strarray *sa, char *bf, size_t size, const char *intfmt, bool show_suffix, int val)
@@@ -771,9 -783,10 +783,10 @@@ static const char *bpf_cmd[] =
};
static DEFINE_STRARRAY(bpf_cmd, "BPF_");
- #include "trace/beauty/generated/fsconfig_arrays.c"
-
- static DEFINE_STRARRAY(fsconfig_cmds, "FSCONFIG_");
+ static const char *fsmount_flags[] = {
+ [1] = "CLOEXEC",
+ };
+ static DEFINE_STRARRAY(fsmount_flags, "FSMOUNT_");
static const char *epoll_ctl_ops[] = { "ADD", "DEL", "MOD", };
static DEFINE_STRARRAY_OFFSET(epoll_ctl_ops, "EPOLL_CTL_", 1);
@@@ -1123,21 -1136,6 +1136,6 @@@ static bool syscall_arg__strtoul_btf_ty
.parm = &strarray__##array, \
.show_zero = true, }
- #include "trace/beauty/eventfd.c"
- #include "trace/beauty/futex_op.c"
- #include "trace/beauty/futex_val3.c"
- #include "trace/beauty/mmap.c"
- #include "trace/beauty/mode_t.c"
- #include "trace/beauty/msg_flags.c"
- #include "trace/beauty/open_flags.c"
- #include "trace/beauty/perf_event_open.c"
- #include "trace/beauty/pid.c"
- #include "trace/beauty/sched_policy.c"
- #include "trace/beauty/seccomp.c"
- #include "trace/beauty/signum.c"
- #include "trace/beauty/socket_type.c"
- #include "trace/beauty/waitid_options.c"
-
static const struct syscall_fmt syscall_fmts[] = {
{ .name = "access",
.arg = { [1] = { .scnprintf = SCA_ACCMODE, /* mode */ }, }, },
@@@ -1197,9 -1195,7 +1195,9 @@@
{ .name = "fsconfig",
.arg = { [1] = STRARRAY(cmd, fsconfig_cmds), }, },
{ .name = "fsmount",
- .arg = { [1] = STRARRAY_FLAGS(flags, fsmount_flags),
+ .arg = { [1] = { .scnprintf = SCA_FSMOUNT_FLAGS, /* fsmount_flags */
+ .strtoul = STUL_STRARRAYS,
+ .show_zero = true, },
[2] = { .scnprintf = SCA_FSMOUNT_ATTR_FLAGS, /* attr_flags */ }, }, },
{ .name = "fspick",
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ },
@@@ -1528,6 -1524,7 +1526,7 @@@ static size_t fprintf_duration(unsigne
*/
struct thread_trace {
u64 entry_time;
+ u32 entry_cpu;
bool entry_pending;
unsigned long nr_events;
unsigned long pfmaj, pfmin;
@@@ -1890,6 -1887,27 +1889,27 @@@ static size_t trace__fprintf_tstamp(str
return fprintf(fp, " ? ");
}
+ /**
+ * trace__fprintf_cpu - Print the CPU ID to a given file stream
+ * @cpu: The CPU ID to print
+ * @fp: The file stream to write to
+ *
+ * Formats and prints the specified CPU ID enclosed in brackets
+ * (e.g., "[003] ") to the provided file pointer. It is used to
+ * align and display the CPU ID consistently within the trace output.
+ *
+ * Return: The number of characters printed.
+ */
+ static size_t trace__fprintf_cpu(u32 cpu, FILE *fp)
+ {
+ size_t printed = 0;
+
+ if (cpu != (u32)-1)
+ printed += fprintf(fp, "[%03u] ", cpu);
+
+ return printed;
+ }
+
static pid_t workload_pid = -1;
static volatile sig_atomic_t done = false;
static volatile sig_atomic_t interrupted = false;
@@@ -1920,12 -1938,15 +1940,15 @@@ static size_t trace__fprintf_comm_tid(s
}
static size_t trace__fprintf_entry_head(struct trace *trace, struct thread *thread,
- u64 duration, bool duration_calculated, u64 tstamp, FILE *fp)
+ u64 duration, bool duration_calculated,
+ u64 tstamp, u32 cpu, FILE *fp)
{
size_t printed = 0;
if (trace->show_tstamp)
printed = trace__fprintf_tstamp(trace, tstamp, fp);
+ if (trace->show_cpu && cpu != (u32)-1)
+ printed += trace__fprintf_cpu(cpu, fp);
if (trace->show_duration)
printed += fprintf_duration(duration, duration_calculated, fp);
return printed + trace__fprintf_comm_tid(trace, thread, fp);
@@@ -2579,7 -2600,7 +2602,7 @@@ static struct syscall *trace__find_sysc
return sc;
}
- typedef int (*tracepoint_handler)(struct trace *trace, struct evsel *evsel,
+ typedef int (*tracepoint_handler)(struct trace *trace,
union perf_event *event,
struct perf_sample *sample);
@@@ -2704,7 -2725,9 +2727,9 @@@ static int trace__printf_interrupted_en
if (!ttrace->entry_pending)
return 0;
- printed = trace__fprintf_entry_head(trace, trace->current, 0, false, ttrace->entry_time, trace->output);
+ printed = trace__fprintf_entry_head(trace, trace->current, 0, false,
+ ttrace->entry_time, ttrace->entry_cpu,
+ trace->output);
printed += len = fprintf(trace->output, "%s)", ttrace->entry_str);
if (len < trace->args_alignment - 4)
@@@ -2718,8 -2741,8 +2743,8 @@@
return printed;
}
- static int trace__fprintf_sample(struct trace *trace, struct evsel *evsel,
- struct perf_sample *sample, struct thread *thread)
+ static int trace__fprintf_sample(struct trace *trace, struct perf_sample *sample,
+ struct thread *thread)
{
int printed = 0;
@@@ -2727,7 -2750,7 +2752,7 @@@
double ts = (double)sample->time / NSEC_PER_MSEC;
printed += fprintf(trace->output, "%22s %10.3f %s %d/%d [%d]\n",
- evsel__name(evsel), ts,
+ evsel__name(sample->evsel), ts,
thread__comm_str(thread),
sample->pid, sample->tid, sample->cpu);
}
@@@ -2774,15 -2797,16 +2799,16 @@@ static void *syscall__augmented_args(st
return NULL;
}
- static int trace__sys_enter(struct trace *trace, struct evsel *evsel,
+ static int trace__sys_enter(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
+ struct evsel *evsel = sample->evsel;
char *msg;
void *args;
int printed = 0;
struct thread *thread;
- int id = perf_evsel__sc_tp_uint(evsel, id, sample), err = -1;
+ int id = perf_evsel__sc_tp_uint(id, sample), err = -1;
int augmented_args_size = 0, e_machine;
void *augmented_args = NULL;
struct syscall *sc;
@@@ -2797,9 -2821,9 +2823,9 @@@
if (ttrace == NULL)
goto out_put;
- trace__fprintf_sample(trace, evsel, sample, thread);
+ trace__fprintf_sample(trace, sample, thread);
- args = perf_evsel__sc_tp_ptr(evsel, args, sample);
+ args = perf_evsel__sc_tp_ptr(args, sample);
if (ttrace->entry_str == NULL) {
ttrace->entry_str = malloc(trace__entry_str_size);
@@@ -2822,6 -2846,7 +2848,7 @@@
if (evsel != trace->syscalls.events.sys_enter)
augmented_args = syscall__augmented_args(sc, sample, &augmented_args_size, trace->raw_augmented_syscalls_args_size);
ttrace->entry_time = sample->time;
+ ttrace->entry_cpu = sample->cpu;
msg = ttrace->entry_str;
printed += scnprintf(msg + printed, trace__entry_str_size - printed, "%s(", sc->name);
@@@ -2832,7 -2857,9 +2859,9 @@@
if (!(trace->duration_filter || trace->summary_only || trace->failure_only || trace->min_stack)) {
int alignment = 0;
- trace__fprintf_entry_head(trace, thread, 0, false, ttrace->entry_time, trace->output);
+ trace__fprintf_entry_head(trace, thread, 0, false,
+ ttrace->entry_time,
+ sample->cpu, trace->output);
printed = fprintf(trace->output, "%s)", ttrace->entry_str);
if (trace->args_alignment > printed)
alignment = trace->args_alignment - printed;
@@@ -2854,12 -2881,11 +2883,11 @@@ out_put
return err;
}
- static int trace__fprintf_sys_enter(struct trace *trace, struct evsel *evsel,
- struct perf_sample *sample)
+ static int trace__fprintf_sys_enter(struct trace *trace, struct perf_sample *sample)
{
struct thread_trace *ttrace;
struct thread *thread;
- int id = perf_evsel__sc_tp_uint(evsel, id, sample), err = -1;
+ int id = perf_evsel__sc_tp_uint(id, sample), err = -1;
struct syscall *sc;
char msg[1024];
void *args, *augmented_args = NULL;
@@@ -2869,7 -2895,7 +2897,7 @@@
thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
e_machine = thread__e_machine(thread, trace->host, /*e_flags=*/NULL);
- sc = trace__syscall_info(trace, evsel, e_machine, id);
+ sc = trace__syscall_info(trace, sample->evsel, e_machine, id);
if (sc == NULL)
goto out_put;
ttrace = thread__trace(thread, trace);
@@@ -2880,7 -2906,7 +2908,7 @@@
if (ttrace == NULL)
goto out_put;
- args = perf_evsel__sc_tp_ptr(evsel, args, sample);
+ args = perf_evsel__sc_tp_ptr(args, sample);
augmented_args = syscall__augmented_args(sc, sample, &augmented_args_size, trace->raw_augmented_syscalls_args_size);
printed += syscall__scnprintf_args(sc, msg, sizeof(msg), args, augmented_args, augmented_args_size, trace, thread);
fprintf(trace->output, "%.*s", (int)printed, msg);
@@@ -2890,10 -2916,11 +2918,11 @@@ out_put
return err;
}
- static int trace__resolve_callchain(struct trace *trace, struct evsel *evsel,
+ static int trace__resolve_callchain(struct trace *trace,
struct perf_sample *sample,
struct callchain_cursor *cursor)
{
+ struct evsel *evsel = sample->evsel;
struct addr_location al;
int max_stack = evsel->core.attr.sample_max_stack ?
evsel->core.attr.sample_max_stack :
@@@ -2904,7 -2931,7 +2933,7 @@@
if (machine__resolve(trace->host, &al, sample) < 0)
goto out;
- err = thread__resolve_callchain(al.thread, cursor, evsel, sample, NULL, NULL, max_stack);
+ err = thread__resolve_callchain(al.thread, cursor, sample, NULL, NULL, max_stack);
out:
addr_location__exit(&al);
return err;
@@@ -2920,15 -2947,16 +2949,16 @@@ static int trace__fprintf_callchain(str
return sample__fprintf_callchain(sample, 38, print_opts, get_tls_callchain_cursor(), symbol_conf.bt_stop_list, trace->output);
}
- static int trace__sys_exit(struct trace *trace, struct evsel *evsel,
+ static int trace__sys_exit(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
+ struct evsel *evsel = sample->evsel;
long ret;
u64 duration = 0;
bool duration_calculated = false;
struct thread *thread;
- int id = perf_evsel__sc_tp_uint(evsel, id, sample), err = -1, callchain_ret = 0, printed = 0;
+ int id = perf_evsel__sc_tp_uint(id, sample), err = -1, callchain_ret = 0, printed = 0;
int alignment = trace->args_alignment, e_machine;
struct syscall *sc;
struct thread_trace *ttrace;
@@@ -2942,9 -2970,9 +2972,9 @@@
if (ttrace == NULL)
goto out_put;
- trace__fprintf_sample(trace, evsel, sample, thread);
+ trace__fprintf_sample(trace, sample, thread);
- ret = perf_evsel__sc_tp_uint(evsel, ret, sample);
+ ret = perf_evsel__sc_tp_uint(ret, sample);
if (trace->summary)
thread__update_stats(thread, ttrace, id, sample, ret, trace);
@@@ -2966,7 -2994,7 +2996,7 @@@
if (sample->callchain) {
struct callchain_cursor *cursor = get_tls_callchain_cursor();
- callchain_ret = trace__resolve_callchain(trace, evsel, sample, cursor);
+ callchain_ret = trace__resolve_callchain(trace, sample, cursor);
if (callchain_ret == 0) {
if (cursor->nr < trace->min_stack)
goto out;
@@@ -2977,7 -3005,9 +3007,9 @@@
if (trace->summary_only || (ret >= 0 && trace->failure_only))
goto out;
- trace__fprintf_entry_head(trace, thread, duration, duration_calculated, ttrace->entry_time, trace->output);
+ trace__fprintf_entry_head(trace, thread, duration,
+ duration_calculated, ttrace->entry_time,
+ sample->cpu, trace->output);
if (ttrace->entry_pending) {
printed = fprintf(trace->output, "%s", ttrace->entry_str);
@@@ -3058,7 -3088,7 +3090,7 @@@ out_put
return err;
}
- static int trace__vfs_getname(struct trace *trace, struct evsel *evsel,
+ static int trace__vfs_getname(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
@@@ -3067,7 -3097,7 +3099,7 @@@
size_t filename_len, entry_str_len, to_move;
ssize_t remaining_space;
char *pos;
- const char *filename = evsel__rawptr(evsel, sample, "pathname");
+ const char *filename = perf_sample__strval(sample, "pathname");
if (!thread)
goto out;
@@@ -3119,11 -3149,11 +3151,11 @@@ out
return 0;
}
- static int trace__sched_stat_runtime(struct trace *trace, struct evsel *evsel,
+ static int trace__sched_stat_runtime(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
- u64 runtime = evsel__intval(evsel, sample, "runtime");
+ u64 runtime = perf_sample__intval(sample, "runtime");
double runtime_ms = (double)runtime / NSEC_PER_MSEC;
struct thread *thread = machine__findnew_thread(trace->host,
sample->pid,
@@@ -3141,11 -3171,11 +3173,11 @@@ out_put
out_dump:
fprintf(trace->output, "%s: comm=%s,pid=%u,runtime=%" PRIu64 ",vruntime=%" PRIu64 ")\n",
- evsel->name,
- evsel__strval(evsel, sample, "comm"),
- (pid_t)evsel__intval(evsel, sample, "pid"),
+ sample->evsel->name,
+ perf_sample__strval(sample, "comm"),
+ (pid_t)perf_sample__intval(sample, "pid"),
runtime,
- evsel__intval(evsel, sample, "vruntime"));
+ perf_sample__intval(sample, "vruntime"));
goto out_put;
}
@@@ -3181,9 -3211,10 +3213,10 @@@ static void bpf_output__fprintf(struct
++trace->nr_events_printed;
}
- static size_t trace__fprintf_tp_fields(struct trace *trace, struct evsel *evsel, struct perf_sample *sample,
+ static size_t trace__fprintf_tp_fields(struct trace *trace, struct perf_sample *sample,
struct thread *thread, void *augmented_args, int augmented_args_size)
{
+ struct evsel *evsel = sample->evsel;
char bf[2048];
size_t size = sizeof(bf);
const struct tep_event *tp_format = evsel__tp_format(evsel);
@@@ -3251,10 -3282,11 +3284,11 @@@
return fprintf(trace->output, "%.*s", (int)printed, bf);
}
- static int trace__event_handler(struct trace *trace, struct evsel *evsel,
+ static int trace__event_handler(struct trace *trace,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
+ struct evsel *evsel = sample->evsel;
struct thread *thread;
int callchain_ret = 0;
@@@ -3266,7 -3298,7 +3300,7 @@@
if (sample->callchain) {
struct callchain_cursor *cursor = get_tls_callchain_cursor();
- callchain_ret = trace__resolve_callchain(trace, evsel, sample, cursor);
+ callchain_ret = trace__resolve_callchain(trace, sample, cursor);
if (callchain_ret == 0) {
if (cursor->nr < trace->min_stack)
goto out;
@@@ -3277,6 -3309,9 +3311,9 @@@
trace__printf_interrupted_entry(trace);
trace__fprintf_tstamp(trace, sample->time, trace->output);
+ if (trace->show_cpu)
+ trace__fprintf_cpu(sample->cpu, trace->output);
+
if (trace->trace_syscalls && trace->show_duration)
fprintf(trace->output, "( ): ");
@@@ -3284,7 -3319,7 +3321,7 @@@
trace__fprintf_comm_tid(trace, thread, trace->output);
if (evsel == trace->syscalls.events.bpf_output) {
- int id = perf_evsel__sc_tp_uint(evsel, id, sample);
+ int id = perf_evsel__sc_tp_uint(id, sample);
int e_machine = thread
? thread__e_machine(thread, trace->host, /*e_flags=*/NULL)
: EM_HOST;
@@@ -3292,7 -3327,7 +3329,7 @@@
if (sc) {
fprintf(trace->output, "%s(", sc->name);
- trace__fprintf_sys_enter(trace, evsel, sample);
+ trace__fprintf_sys_enter(trace, sample);
fputc(')', trace->output);
goto newline;
}
@@@ -3312,13 -3347,13 +3349,13 @@@
const struct tep_event *tp_format = evsel__tp_format(evsel);
if (tp_format && (strncmp(tp_format->name, "sys_enter_", 10) ||
- trace__fprintf_sys_enter(trace, evsel, sample))) {
+ trace__fprintf_sys_enter(trace, sample))) {
if (trace->libtraceevent_print) {
event_format__fprintf(tp_format, sample->cpu,
sample->raw_data, sample->raw_size,
trace->output);
} else {
- trace__fprintf_tp_fields(trace, evsel, sample, thread, NULL, 0);
+ trace__fprintf_tp_fields(trace, sample, thread, NULL, 0);
}
}
}
@@@ -3360,7 -3395,6 +3397,6 @@@ static void print_location(FILE *f, str
}
static int trace__pgfault(struct trace *trace,
- struct evsel *evsel,
union perf_event *event __maybe_unused,
struct perf_sample *sample)
{
@@@ -3377,7 -3411,7 +3413,7 @@@
if (sample->callchain) {
struct callchain_cursor *cursor = get_tls_callchain_cursor();
- callchain_ret = trace__resolve_callchain(trace, evsel, sample, cursor);
+ callchain_ret = trace__resolve_callchain(trace, sample, cursor);
if (callchain_ret == 0) {
if (cursor->nr < trace->min_stack)
goto out_put;
@@@ -3389,7 -3423,7 +3425,7 @@@
if (ttrace == NULL)
goto out_put;
- if (evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ) {
+ if (sample->evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ) {
ttrace->pfmaj++;
trace->pfmaj++;
} else {
@@@ -3402,10 -3436,11 +3438,11 @@@
thread__find_symbol(thread, sample->cpumode, sample->ip, &al);
- trace__fprintf_entry_head(trace, thread, 0, true, sample->time, trace->output);
+ trace__fprintf_entry_head(trace, thread, 0, true, sample->time,
+ sample->cpu, trace->output);
fprintf(trace->output, "%sfault [",
- evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ ?
+ sample->evsel->core.attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ ?
"maj" : "min");
print_location(trace->output, sample, &al, false, true);
@@@ -3430,7 -3465,8 +3467,8 @@@
if (callchain_ret > 0)
trace__fprintf_callchain(trace, sample);
else if (callchain_ret < 0)
- pr_err("Problem processing %s callchain, skipping...\n", evsel__name(evsel));
+ pr_err("Problem processing %s callchain, skipping...\n",
+ evsel__name(sample->evsel));
++trace->nr_events_printed;
out:
@@@ -3442,7 -3478,6 +3480,6 @@@ out_put
}
static void trace__set_base_time(struct trace *trace,
- struct evsel *evsel,
struct perf_sample *sample)
{
/*
@@@ -3454,17 -3489,17 +3491,17 @@@
* appears in our event stream (vfs_getname comes to mind).
*/
if (trace->base_time == 0 && !trace->full_time &&
- (evsel->core.attr.sample_type & PERF_SAMPLE_TIME))
+ (sample->evsel->core.attr.sample_type & PERF_SAMPLE_TIME))
trace->base_time = sample->time;
}
static int trace__process_sample(const struct perf_tool *tool,
union perf_event *event,
struct perf_sample *sample,
- struct evsel *evsel,
struct machine *machine __maybe_unused)
{
struct trace *trace = container_of(tool, struct trace, tool);
+ struct evsel *evsel = sample->evsel;
struct thread *thread;
int err = 0;
@@@ -3474,11 -3509,11 +3511,11 @@@
if (thread && thread__is_filtered(thread))
goto out;
- trace__set_base_time(trace, evsel, sample);
+ trace__set_base_time(trace, sample);
if (handler) {
++trace->nr_events;
- handler(trace, evsel, event, sample);
+ handler(trace, event, sample);
}
out:
thread__put(thread);
@@@ -3620,32 -3655,34 +3657,34 @@@ static void evlist__free_syscall_tp_fie
static void trace__handle_event(struct trace *trace, union perf_event *event, struct perf_sample *sample)
{
const u32 type = event->header.type;
- struct evsel *evsel;
if (type != PERF_RECORD_SAMPLE) {
trace__process_event(trace, trace->host, event, sample);
return;
}
- evsel = evlist__id2evsel(trace->evlist, sample->id);
- if (evsel == NULL) {
+ if (sample->evsel == NULL)
+ sample->evsel = evlist__id2evsel(trace->evlist, sample->id);
+
+ if (sample->evsel == NULL) {
fprintf(trace->output, "Unknown tp ID %" PRIu64 ", skipping...\n", sample->id);
return;
}
- if (evswitch__discard(&trace->evswitch, evsel))
+ if (evswitch__discard(&trace->evswitch, sample->evsel))
return;
- trace__set_base_time(trace, evsel, sample);
+ trace__set_base_time(trace, sample);
- if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT &&
+ if (sample->evsel->core.attr.type == PERF_TYPE_TRACEPOINT &&
sample->raw_data == NULL) {
fprintf(trace->output, "%s sample with no payload for tid: %d, cpu %d, raw_size=%d, skipping...\n",
- evsel__name(evsel), sample->tid,
+ evsel__name(sample->evsel), sample->tid,
sample->cpu, sample->raw_size);
} else {
- tracepoint_handler handler = evsel->handler;
- handler(trace, evsel, event, sample);
+ tracepoint_handler handler = sample->evsel->handler;
+
+ handler(trace, event, sample);
}
if (trace->nr_events_printed >= trace->max_events && trace->max_events != ULONG_MAX)
@@@ -5429,6 -5466,7 +5468,7 @@@ int cmd_trace(int argc, const char **ar
OPT_CALLBACK('m', "mmap-pages", &trace.opts.mmap_pages, "pages",
"number of mmap data pages", evlist__parse_mmap_pages),
OPT_STRING('u', "uid", &trace.uid_str, "user", "user to profile"),
+ OPT_BOOLEAN(0, "show-cpu", &trace.show_cpu, "show cpu id"),
OPT_CALLBACK(0, "duration", &trace, "float",
"show only events with duration > N.M ms",
trace__set_duration),
@@@ -5563,6 -5601,9 +5603,9 @@@
goto out;
}
+ if (trace.show_cpu)
+ trace.opts.sample_cpu = true;
+
if ((nr_cgroups || trace.cgroup) && !trace.opts.target.system_wide) {
usage_with_options_msg(trace_usage, trace_options,
"cgroup monitoring only available in system-wide mode");
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* linux-next: manual merge of the perf tree with the origin tree
@ 2024-06-17 16:23 Mark Brown
2024-06-18 3:21 ` Namhyung Kim
0 siblings, 1 reply; 16+ messages in thread
From: Mark Brown @ 2024-06-17 16:23 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Namhyung Kim
Cc: Arnaldo Carvalho de Melo, Ian Rogers, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 3148 bytes --]
Hi all,
Today's linux-next merge of the perf tree got a conflict in:
tools/perf/builtin-record.c
between commit:
5b3cde198878b ("Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event"")
from the origin tree and commit:
6c1785cd75ef5 ("perf record: Ensure space for lost samples")
from the perf tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0a8ba1323d64b..019305b94e5fc 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1926,7 +1926,7 @@ static void __record__save_lost_samples(struct record *rec, struct evsel *evsel,
static void record__read_lost_samples(struct record *rec)
{
struct perf_session *session = rec->session;
- struct perf_record_lost_samples *lost = NULL;
+ struct perf_record_lost_samples_and_ids lost;
struct evsel *evsel;
/* there was an error during record__open */
@@ -1951,19 +1951,13 @@ static void record__read_lost_samples(struct record *rec)
if (perf_evsel__read(&evsel->core, x, y, &count) < 0) {
pr_debug("read LOST count failed\n");
- goto out;
+ return;
}
if (count.lost) {
- if (!lost) {
- lost = zalloc(PERF_SAMPLE_MAX_SIZE);
- if (!lost) {
- pr_debug("Memory allocation failed\n");
- return;
- }
- lost->header.type = PERF_RECORD_LOST_SAMPLES;
- }
- __record__save_lost_samples(rec, evsel, lost,
+ memset(&lost.lost, 0, sizeof(lost));
+ lost.lost.header.type = PERF_RECORD_LOST_SAMPLES;
+ __record__save_lost_samples(rec, evsel, &lost.lost,
x, y, count.lost, 0);
}
}
@@ -1971,20 +1965,12 @@ static void record__read_lost_samples(struct record *rec)
lost_count = perf_bpf_filter__lost_count(evsel);
if (lost_count) {
- if (!lost) {
- lost = zalloc(PERF_SAMPLE_MAX_SIZE);
- if (!lost) {
- pr_debug("Memory allocation failed\n");
- return;
- }
- lost->header.type = PERF_RECORD_LOST_SAMPLES;
- }
- __record__save_lost_samples(rec, evsel, lost, 0, 0, lost_count,
+ memset(&lost.lost, 0, sizeof(lost));
+ lost.lost.header.type = PERF_RECORD_LOST_SAMPLES;
+ __record__save_lost_samples(rec, evsel, &lost.lost, 0, 0, lost_count,
PERF_RECORD_MISC_LOST_SAMPLES_BPF);
}
}
-out:
- free(lost);
}
static volatile sig_atomic_t workload_exec_errno;
@@ -3196,7 +3182,7 @@ static int switch_output_setup(struct record *rec)
unsigned long val;
/*
- * If we're using --switch-output-events, then we imply its
+ * If we're using --switch-output-events, then we imply its
* --switch-output=signal, as we'll send a SIGUSR2 from the side band
* thread to its parent.
*/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: linux-next: manual merge of the perf tree with the origin tree
2024-06-17 16:23 Mark Brown
@ 2024-06-18 3:21 ` Namhyung Kim
0 siblings, 0 replies; 16+ messages in thread
From: Namhyung Kim @ 2024-06-18 3:21 UTC (permalink / raw)
To: Mark Brown
Cc: Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo, Ian Rogers,
Linux Kernel Mailing List, Linux Next Mailing List
Hello,
On Mon, Jun 17, 2024 at 05:23:02PM +0100, Mark Brown wrote:
> Hi all,
>
> Today's linux-next merge of the perf tree got a conflict in:
>
> tools/perf/builtin-record.c
>
> between commit:
>
> 5b3cde198878b ("Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event"")
>
> from the origin tree and commit:
>
> 6c1785cd75ef5 ("perf record: Ensure space for lost samples")
>
> from the perf tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
Thanks for doing this! The resolution looks good. I plan to merge
the revert and other fixes in the v6.10 tree into perf-tools-next
before v6.11 window open.
Thanks,
Namhyung
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 0a8ba1323d64b..019305b94e5fc 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -1926,7 +1926,7 @@ static void __record__save_lost_samples(struct record *rec, struct evsel *evsel,
> static void record__read_lost_samples(struct record *rec)
> {
> struct perf_session *session = rec->session;
> - struct perf_record_lost_samples *lost = NULL;
> + struct perf_record_lost_samples_and_ids lost;
> struct evsel *evsel;
>
> /* there was an error during record__open */
> @@ -1951,19 +1951,13 @@ static void record__read_lost_samples(struct record *rec)
>
> if (perf_evsel__read(&evsel->core, x, y, &count) < 0) {
> pr_debug("read LOST count failed\n");
> - goto out;
> + return;
> }
>
> if (count.lost) {
> - if (!lost) {
> - lost = zalloc(PERF_SAMPLE_MAX_SIZE);
> - if (!lost) {
> - pr_debug("Memory allocation failed\n");
> - return;
> - }
> - lost->header.type = PERF_RECORD_LOST_SAMPLES;
> - }
> - __record__save_lost_samples(rec, evsel, lost,
> + memset(&lost.lost, 0, sizeof(lost));
> + lost.lost.header.type = PERF_RECORD_LOST_SAMPLES;
> + __record__save_lost_samples(rec, evsel, &lost.lost,
> x, y, count.lost, 0);
> }
> }
> @@ -1971,20 +1965,12 @@ static void record__read_lost_samples(struct record *rec)
>
> lost_count = perf_bpf_filter__lost_count(evsel);
> if (lost_count) {
> - if (!lost) {
> - lost = zalloc(PERF_SAMPLE_MAX_SIZE);
> - if (!lost) {
> - pr_debug("Memory allocation failed\n");
> - return;
> - }
> - lost->header.type = PERF_RECORD_LOST_SAMPLES;
> - }
> - __record__save_lost_samples(rec, evsel, lost, 0, 0, lost_count,
> + memset(&lost.lost, 0, sizeof(lost));
> + lost.lost.header.type = PERF_RECORD_LOST_SAMPLES;
> + __record__save_lost_samples(rec, evsel, &lost.lost, 0, 0, lost_count,
> PERF_RECORD_MISC_LOST_SAMPLES_BPF);
> }
> }
> -out:
> - free(lost);
> }
>
> static volatile sig_atomic_t workload_exec_errno;
> @@ -3196,7 +3182,7 @@ static int switch_output_setup(struct record *rec)
> unsigned long val;
>
> /*
> - * If we're using --switch-output-events, then we imply its
> + * If we're using --switch-output-events, then we imply its
> * --switch-output=signal, as we'll send a SIGUSR2 from the side band
> * thread to its parent.
> */
^ permalink raw reply [flat|nested] 16+ messages in thread
* linux-next: manual merge of the perf tree with the origin tree
@ 2024-06-17 16:19 broonie
0 siblings, 0 replies; 16+ messages in thread
From: broonie @ 2024-06-17 16:19 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Namhyung Kim
Cc: Arnaldo Carvalho de Melo, Ian Rogers, Linux Kernel Mailing List,
Linux Next Mailing List
Hi all,
Today's linux-next merge of the perf tree got a conflict in:
tools/perf/builtin-record.c
between commit:
5b3cde198878b ("Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event"")
from the origin tree and commit:
6c1785cd75ef5 ("perf record: Ensure space for lost samples")
from the perf tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0a8ba1323d64b..019305b94e5fc 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1926,7 +1926,7 @@ static void __record__save_lost_samples(struct record *rec, struct evsel *evsel,
static void record__read_lost_samples(struct record *rec)
{
struct perf_session *session = rec->session;
- struct perf_record_lost_samples *lost = NULL;
+ struct perf_record_lost_samples_and_ids lost;
struct evsel *evsel;
/* there was an error during record__open */
@@ -1951,19 +1951,13 @@ static void record__read_lost_samples(struct record *rec)
if (perf_evsel__read(&evsel->core, x, y, &count) < 0) {
pr_debug("read LOST count failed\n");
- goto out;
+ return;
}
if (count.lost) {
- if (!lost) {
- lost = zalloc(PERF_SAMPLE_MAX_SIZE);
- if (!lost) {
- pr_debug("Memory allocation failed\n");
- return;
- }
- lost->header.type = PERF_RECORD_LOST_SAMPLES;
- }
- __record__save_lost_samples(rec, evsel, lost,
+ memset(&lost.lost, 0, sizeof(lost));
+ lost.lost.header.type = PERF_RECORD_LOST_SAMPLES;
+ __record__save_lost_samples(rec, evsel, &lost.lost,
x, y, count.lost, 0);
}
}
@@ -1971,20 +1965,12 @@ static void record__read_lost_samples(struct record *rec)
lost_count = perf_bpf_filter__lost_count(evsel);
if (lost_count) {
- if (!lost) {
- lost = zalloc(PERF_SAMPLE_MAX_SIZE);
- if (!lost) {
- pr_debug("Memory allocation failed\n");
- return;
- }
- lost->header.type = PERF_RECORD_LOST_SAMPLES;
- }
- __record__save_lost_samples(rec, evsel, lost, 0, 0, lost_count,
+ memset(&lost.lost, 0, sizeof(lost));
+ lost.lost.header.type = PERF_RECORD_LOST_SAMPLES;
+ __record__save_lost_samples(rec, evsel, &lost.lost, 0, 0, lost_count,
PERF_RECORD_MISC_LOST_SAMPLES_BPF);
}
}
-out:
- free(lost);
}
static volatile sig_atomic_t workload_exec_errno;
@@ -3196,7 +3182,7 @@ static int switch_output_setup(struct record *rec)
unsigned long val;
/*
- * If we're using --switch-output-events, then we imply its
+ * If we're using --switch-output-events, then we imply its
* --switch-output=signal, as we'll send a SIGUSR2 from the side band
* thread to its parent.
*/
^ permalink raw reply related [flat|nested] 16+ messages in thread* linux-next: manual merge of the perf tree with the origin tree
@ 2022-08-05 11:45 broonie
0 siblings, 0 replies; 16+ messages in thread
From: broonie @ 2022-08-05 11:45 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Andres Freund, Andrii Nakryiko, Arnaldo Carvalho de Melo,
Linux Kernel Mailing List, Linux Next Mailing List,
Quentin Monnet
Hi all,
Today's linux-next merge of the perf tree got a conflict in:
tools/bpf/bpftool/Makefile
between commit:
450a8dcb8c7f8 ("bpftool: Remove zlib feature test from Makefile")
from the origin tree and commit:
1e1613f64cc8a ("tools bpftool: Don't display disassembler-four-args feature test")
from the perf tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc tools/bpf/bpftool/Makefile
index 6b5b3a99f79d4,517df016d54a2..0000000000000
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@@ -93,8 -93,9 +93,8 @@@ INSTALL ?= instal
RM ?= rm -f
FEATURE_USER = .bpftool
-FEATURE_TESTS = libbfd disassembler-four-args disassembler-init-styled zlib libcap \
- clang-bpf-co-re
-FEATURE_DISPLAY = libbfd zlib libcap clang-bpf-co-re
+FEATURE_TESTS = libbfd disassembler-four-args libcap clang-bpf-co-re
- FEATURE_DISPLAY = libbfd disassembler-four-args libcap clang-bpf-co-re
++FEATURE_DISPLAY = libbfd libcap clang-bpf-co-re
check_feat := 1
NON_CHECK_FEAT_TARGETS := clean uninstall doc doc-clean doc-install doc-uninstall
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-05-21 17:03 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21 10:19 linux-next: manual merge of the perf tree with the origin tree Mark Brown
2026-05-21 14:55 ` Thorsten Leemhuis
2026-05-21 15:04 ` Ian Rogers
2026-05-21 15:30 ` Mark Brown
2026-05-21 15:33 ` Ian Rogers
2026-05-21 15:35 ` [PATCH v1] perf build: Fix fsmount.o build Ian Rogers
2026-05-21 15:58 ` Mark Brown
2026-05-21 16:51 ` Namhyung Kim
2026-05-21 15:44 ` linux-next: manual merge of the perf tree with the origin tree Ian Rogers
2026-05-21 16:59 ` Namhyung Kim
2026-05-21 17:03 ` Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2026-05-21 10:18 Mark Brown
2024-06-17 16:23 Mark Brown
2024-06-18 3:21 ` Namhyung Kim
2024-06-17 16:19 broonie
2022-08-05 11:45 broonie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox