alistair23-linux/tools/perf/trace/beauty
Arnaldo Carvalho de Melo f3cf7fa963 perf trace beauty: Use the autogenerated protocol family table
That helps us not to lose new protocol families when they are
introduced, replacing that hardcoded, dated family->string table.

To recap what this allows us to do:

  # perf trace -e syscalls:sys_enter_socket/max-stack=10/ --filter=family==INET --max-events=1
     0.000 fetchmail/41097 syscalls:sys_enter_socket(family: INET, type: DGRAM|CLOEXEC|NONBLOCK, protocol: IP)
                                       __GI___socket (inlined)
                                       reopen (/usr/lib64/libresolv-2.31.so)
                                       send_dg (/usr/lib64/libresolv-2.31.so)
                                       __res_context_send (/usr/lib64/libresolv-2.31.so)
                                       __GI___res_context_query (inlined)
                                       __GI___res_context_search (inlined)
                                       _nss_dns_gethostbyname4_r (/usr/lib64/libnss_dns-2.31.so)
                                       gaih_inet.constprop.0 (/usr/lib64/libc-2.31.so)
                                       __GI_getaddrinfo (inlined)
                                       [0x15cb2] (/usr/bin/fetchmail)
  #

More work is still needed to allow for the more natura strace-like
syscall name usage instead of the trace event name:

  # perf trace -e socket/max-stack=10,family==INET/ --max-events=1

I.e. to allow for modifiers to follow the syscall name and for logical
expressions to be accepted as filters to use with that syscall, be it as
trace event filters or BPF based ones.

Using -v we can see how the trace event filter is built:

  # perf trace -v -e syscalls:sys_enter_socket/call-graph=dwarf/ --filter=family==INET --max-events=2
  <SNIP>
  New filter for syscalls:sys_enter_socket: (family==0x2) && (common_pid != 41384 && common_pid != 2836)
  <SNIP>

  $ tools/perf/trace/beauty/socket.sh | grep -w 2
	[2] = "INET",
  $

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-08-12 08:43:51 -03:00
..
include/linux perf trace beauty: Add script to autogenerate socket families table 2020-08-12 08:38:36 -03:00
tracepoints perf trace beauty: Add the glue for the autogenerated x86 IRQ vector array 2019-10-15 16:13:27 -03:00
arch_errno_names.c
arch_errno_names.sh perf beauty: Allow the CC used in the arch errno names script to acccept CFLAGS 2020-05-28 10:03:26 -03:00
arch_prctl.c perf trace beauty: Beautify arch_prctl()'s arguments 2018-12-18 16:15:19 -03:00
beauty.h perf beauty prctl: Export the 'options' strarray 2020-02-11 16:41:50 -03:00
Build perf trace beauty: Add the glue for the autogenerated MSR arrays 2019-10-09 11:23:52 -03:00
clone.c tools headers UAPI: Sync sched.h with the kernel 2020-04-14 09:01:08 -03:00
drm_ioctl.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
eventfd.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
fadvise.sh perf beauty: Add generator for fadvise64's 'advice' arg constants 2018-12-18 16:17:41 -03:00
fcntl.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
flock.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
fsconfig.sh perf beauty: Add generator for fsconfig's 'cmd' arg values 2019-05-28 18:37:43 -03:00
fsmount.c perf trace: Beautify 'fsmount' arguments 2019-05-28 18:37:43 -03:00
fsmount.sh perf beauty: Add generator for fsmount's 'attr_flags' arg values 2019-05-28 18:37:43 -03:00
fspick.c perf trace: Beautify 'fspick' arguments 2019-05-28 18:37:42 -03:00
fspick.sh perf beauty: Add generator for fspick's 'flags' arg values 2019-05-28 18:37:42 -03:00
futex_op.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
futex_val3.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
ioctl.c perf trace beauty ioctl: Fix off-by-one error in cmd->string table 2019-08-26 11:58:29 -03:00
kcmp.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
kcmp_type.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
kvm_ioctl.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
madvise_behavior.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
mmap.c tools headers UAPI: Sync linux/mman.h with the kernel 2020-04-14 09:04:53 -03:00
mmap_flags.sh tools headers uapi: Sync asm-generic/mman-common.h and linux/mman.h 2019-03-28 14:31:56 -03:00
mode_t.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
mount_flags.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
mount_flags.sh perf beauty: Switch from using uapi/linux/fs.h to uapi/linux/mount.h 2019-01-08 14:09:33 -03:00
move_mount.c perf trace: Beautify 'move_mount' arguments 2019-05-28 18:37:42 -03:00
move_mount_flags.sh perf beauty: Add generator for 'move_mount' flags argument 2019-05-28 18:37:42 -03:00
msg_flags.c perf beauty msg_flags: Add missing %s lost when adding prefix suppression logic 2019-03-01 15:45:35 -03:00
open_flags.c perf trace beauty: Print O_RDONLY when (flags & O_ACCMODE) == 0 2018-12-18 16:07:42 -03:00
perf_event_open.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
perf_ioctl.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
pid.c perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
pkey_alloc.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
pkey_alloc_access_rights.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
prctl.c perf beauty prctl: Export the 'options' strarray 2020-02-11 16:41:50 -03:00
prctl_option.sh tools beauty: Make the prctl option table generator catch all PR_ options 2019-01-03 15:16:04 -03:00
rename_flags.sh perf beauty: Add a string table generator for renameat2's flags constants 2018-12-18 12:23:55 -03:00
renameat.c perf trace beauty renameat: No need to include linux/fs.h 2019-04-01 14:49:24 -03:00
sched_policy.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
seccomp.c perf trace: Use correct SECCOMP prefix spelling, "SECOMP_*" -> "SECCOMP_*" 2018-12-28 16:32:54 -03:00
signum.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
sndrv_ctl_ioctl.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
sndrv_pcm_ioctl.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
sockaddr.c perf trace beauty: Use the autogenerated protocol family table 2020-08-12 08:43:51 -03:00
socket.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
socket.sh perf trace beauty: Add script to autogenerate socket families table 2020-08-12 08:38:36 -03:00
socket_ipproto.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
socket_type.c perf trace: Allow asking for not suppressing common string prefixes 2018-12-18 16:07:42 -03:00
statx.c perf beauty: Add support to STATX_MNT_ID in the 'statx' syscall 'mask' argument 2020-06-09 12:40:03 -03:00
sync_file_range.c perf trace: Beautify 'sync_file_range' arguments 2019-05-28 18:37:43 -03:00
sync_file_range.sh perf beauty: Add generator for sync_file_range's 'flags' arg values 2019-05-28 18:37:43 -03:00
usbdevfs_ioctl.sh tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC() 2019-07-29 09:03:42 -03:00
vhost_virtio_ioctl.sh perf beauty: Switch from GPL v2.0 to LGPL v2.1 2018-10-30 11:46:23 -03:00
waitid_options.c perf beauty waitid options: Fix up prefix showing logic 2019-02-14 13:31:12 -03:00
x86_arch_prctl.sh perf beauty: Add a string table generator for x86's 'arch_prctl' codes 2018-12-18 16:15:18 -03:00