linux/tools/perf/trace/beauty
Arnaldo Carvalho de Melo 29719e3198 tools headers UAPI: Sync arch prctl headers with the kernel sources
To pick the changes in this cset:

  a03c376eba ("x86/arch_prctl: Add AMX feature numbers as ABI constants")
  23e5d9ec2b ("x86/mm/iommu/sva: Make LAM and SVA mutually exclusive")
  2f8794bd08 ("x86/mm: Provide arch_prctl() interface for LAM")

This picks these new prctls in a third range, that was also added to the
tools/perf/trace/beauty/arch_prctl.c beautifier.

  $ tools/perf/trace/beauty/x86_arch_prctl.sh > /tmp/before
  $ cp arch/x86/include/uapi/asm/prctl.h tools/arch/x86/include/uapi/asm/prctl.h
  $ tools/perf/trace/beauty/x86_arch_prctl.sh > /tmp/after
  $ diff -u /tmp/before /tmp/after
  @@ -20,3 +20,11 @@
   	[0x2003 - 0x2001]= "MAP_VDSO_64",
   };

  +#define x86_arch_prctl_codes_3_offset 0x4001
  +static const char *x86_arch_prctl_codes_3[] = {
  +	[0x4001 - 0x4001]= "GET_UNTAG_MASK",
  +	[0x4002 - 0x4001]= "ENABLE_TAGGED_ADDR",
  +	[0x4003 - 0x4001]= "GET_MAX_TAG_BITS",
  +	[0x4004 - 0x4001]= "FORCE_TAGGED_SVA",
  +};
  +
  $

With this 'perf trace' can translate those numbers into strings and use
the strings in filter expressions:

  # perf trace -e prctl
       0.000 ( 0.011 ms): DOM Worker/3722622 prctl(option: SET_NAME, arg2: 0x7f9c014b7df5)     = 0
       0.032 ( 0.002 ms): DOM Worker/3722622 prctl(option: SET_NAME, arg2: 0x7f9bb6b51580)     = 0
       5.452 ( 0.003 ms): StreamT~ns #30/3722623 prctl(option: SET_NAME, arg2: 0x7f9bdbdfeb70) = 0
       5.468 ( 0.002 ms): StreamT~ns #30/3722623 prctl(option: SET_NAME, arg2: 0x7f9bdbdfea70) = 0
      24.494 ( 0.009 ms): IndexedDB #556/3722624 prctl(option: SET_NAME, arg2: 0x7f562a32ae28) = 0
      24.540 ( 0.002 ms): IndexedDB #556/3722624 prctl(option: SET_NAME, arg2: 0x7f563c6d4b30) = 0
     670.281 ( 0.008 ms): systemd-userwo/3722339 prctl(option: SET_NAME, arg2: 0x564be30805c8) = 0
     670.293 ( 0.002 ms): systemd-userwo/3722339 prctl(option: SET_NAME, arg2: 0x564be30800f0) = 0
  ^C#

This addresses this perf build warning:

  Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/prctl.h' differs from latest version at 'arch/x86/include/uapi/asm/prctl.h'
  diff -u tools/arch/x86/include/uapi/asm/prctl.h arch/x86/include/uapi/asm/prctl.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chang S. Bae <chang.seok.bae@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/ZGTjNPpD3FOWfetM@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-05-17 11:23:43 -03:00
..
include/linux perf beauty: Update copy of linux/socket.h with the kernel sources 2023-01-18 10:12:23 -03:00
tracepoints perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
arch_errno_names.c
arch_errno_names.sh perf trace beauty: Fix generation of errno id->str table on ALT Linux 2022-06-26 12:32:55 -03:00
arch_prctl.c tools headers UAPI: Sync arch prctl headers with the kernel sources 2023-05-17 11:23:43 -03:00
beauty.h perf trace: Add augmenter for clock_gettime's rqtp timespec arg 2022-11-10 15:30:10 -03:00
Build perf trace: Add augmenter for clock_gettime's rqtp timespec arg 2022-11-10 15:30:10 -03:00
clone.c tools headers UAPI: Sync sched.h with the kernel 2020-04-14 09:01:08 -03:00
drm_ioctl.sh
eventfd.c
fadvise.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
fcntl.c
flock.c
fsconfig.sh perf beauty: Fix fsconfig generator 2021-04-15 16:34:11 -03:00
fsmount.c
fsmount.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
fspick.c
fspick.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
futex_op.c
futex_val3.c
ioctl.c
kcmp.c
kcmp_type.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
kvm_ioctl.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
madvise_behavior.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
mmap.c perf trace: Use the autogenerated mmap 'prot' string/id table 2020-10-01 11:35:01 -03:00
mmap_flags.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
mmap_prot.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
mode_t.c
mount_flags.c
mount_flags.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
move_mount.c
move_mount_flags.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
mremap_flags.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
msg_flags.c
open_flags.c
perf_event_open.c perf trace: Add BPF augmenter to perf_event_open()'s 'struct perf_event_attr' arg 2022-11-07 10:56:40 -03:00
perf_ioctl.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
pid.c
pkey_alloc.c
pkey_alloc_access_rights.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
prctl.c
prctl_option.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
rename_flags.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
renameat.c
sched_policy.c
seccomp.c
signum.c
sndrv_ctl_ioctl.sh
sndrv_pcm_ioctl.sh
sockaddr.c perf beauty: Make all sockaddr files use a common naming scheme 2021-11-12 10:40:34 -03:00
sockaddr.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
socket.c perf beauty: Add socket level scnprintf that handles ARCH specific SOL_SOCKET 2021-11-12 10:40:34 -03:00
socket.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
socket_type.c
statx.c tools headers uapi: Sync linux/stat.h with the kernel sources 2022-10-25 17:40:48 -03:00
sync_file_range.c
sync_file_range.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
timespec.c perf trace: Add augmenter for clock_gettime's rqtp timespec arg 2022-11-10 15:30:10 -03:00
usbdevfs_ioctl.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
vhost_virtio_ioctl.sh perf tools: Use "grep -E" instead of "egrep" 2022-12-14 15:28:19 -03:00
waitid_options.c
x86_arch_prctl.sh tools headers UAPI: Sync arch prctl headers with the kernel sources 2023-05-17 11:23:43 -03:00