Revision 8142bd82a59e452fefea7b21113101d6a87d9fa8 authored by Arnaldo Carvalho de Melo on 25 March 2019, 14:34:04 UTC, committed by Arnaldo Carvalho de Melo on 28 March 2019, 17:41:11 UTC
To pick up the changes introduced in the following csets:

  2b188cc1bb85 ("Add io_uring IO interface")
  edafccee56ff ("io_uring: add support for pre-mapped user IO buffers")
  3eb39f47934f ("signal: add pidfd_send_signal() syscall")

This makes 'perf trace' to become aware of these new syscalls, so that
one can use them like 'perf trace -e ui_uring*,*signal' to do a system
wide strace-like session looking at those syscalls, for instance.

For example:

  # perf trace -s io_uring-cp ~acme/isos/RHEL-x86_64-dvd1.iso ~/bla

   Summary of events:

   io_uring-cp (383), 1208866 events, 100.0%

     syscall         calls   total    min     avg     max   stddev
                             (msec) (msec)  (msec)  (msec)     (%)
     -------------- ------ -------- ------ ------- -------  ------
     io_uring_enter 605780 2955.615  0.000   0.005  33.804   1.94%
     openat              4  459.446  0.004 114.861 459.435 100.00%
     munmap              4    0.073  0.009   0.018   0.042  44.03%
     mmap               10    0.054  0.002   0.005   0.026  43.24%
     brk                28    0.038  0.001   0.001   0.003   7.51%
     io_uring_setup      1    0.030  0.030   0.030   0.030   0.00%
     mprotect            4    0.014  0.002   0.004   0.005  14.32%
     close               5    0.012  0.001   0.002   0.004  28.87%
     fstat               3    0.006  0.001   0.002   0.003  35.83%
     read                4    0.004  0.001   0.001   0.002  13.58%
     access              1    0.003  0.003   0.003   0.003   0.00%
     lseek               3    0.002  0.001   0.001   0.001   9.00%
     arch_prctl          2    0.002  0.001   0.001   0.001   0.69%
     execve              1    0.000  0.000   0.000   0.000   0.00%
  #
  # perf trace -e io_uring* -s io_uring-cp ~acme/isos/RHEL-x86_64-dvd1.iso ~/bla

   Summary of events:

   io_uring-cp (390), 1191250 events, 100.0%

     syscall         calls   total    min    avg    max  stddev
                             (msec) (msec) (msec) (msec)    (%)
     -------------- ------ -------- ------ ------ ------ ------
     io_uring_enter 597093 2706.060  0.001  0.005 14.761  1.10%
     io_uring_setup      1    0.038  0.038  0.038  0.038  0.00%
  #

More work needed to make the tools/perf/examples/bpf/augmented_raw_syscalls.c
BPF program to copy the 'struct io_uring_params' arguments to perf's ring
buffer so that 'perf trace' can use the BTF info put in place by pahole's
conversion of the kernel DWARF and then auto-beautify those arguments.

This patch produces the expected change in the generated syscalls table
for x86_64:

  --- /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before	2019-03-26 13:37:46.679057774 -0300
  +++ /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c	2019-03-26 13:38:12.755990383 -0300
  @@ -334,5 +334,9 @@ static const char *syscalltbl_x86_64[] =
   	[332] = "statx",
   	[333] = "io_pgetevents",
   	[334] = "rseq",
  +	[424] = "pidfd_send_signal",
  +	[425] = "io_uring_setup",
  +	[426] = "io_uring_enter",
  +	[427] = "io_uring_register",
   };
  -#define SYSCALLTBL_x86_64_MAX_ID 334
  +#define SYSCALLTBL_x86_64_MAX_ID 427

This silences these perf build warnings:

  Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h'
  diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
  Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
  diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Christian Brauner <christian@brauner.io>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Link: https://lkml.kernel.org/n/tip-p0ars3otuc52x5iznf21shhw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 8239251
History
File Mode Size
bpf
cgroup
configs
debug
dma
events
gcov
irq
livepatch
locking
power
printk
rcu
sched
time
trace
.gitignore -rw-r--r-- 40 bytes
Kconfig.freezer -rw-r--r-- 52 bytes
Kconfig.hz -rw-r--r-- 1.6 KB
Kconfig.locks -rw-r--r-- 4.8 KB
Kconfig.preempt -rw-r--r-- 2.2 KB
Makefile -rw-r--r-- 3.8 KB
acct.c -rw-r--r-- 15.4 KB
async.c -rw-r--r-- 10.4 KB
audit.c -rw-r--r-- 61.3 KB
audit.h -rw-r--r-- 11.0 KB
audit_fsnotify.c -rw-r--r-- 6.0 KB
audit_tree.c -rw-r--r-- 25.7 KB
audit_watch.c -rw-r--r-- 14.7 KB
auditfilter.c -rw-r--r-- 34.3 KB
auditsc.c -rw-r--r-- 68.8 KB
backtracetest.c -rw-r--r-- 2.1 KB
bounds.c -rw-r--r-- 751 bytes
capability.c -rw-r--r-- 14.6 KB
compat.c -rw-r--r-- 10.1 KB
configs.c -rw-r--r-- 2.7 KB
context_tracking.c -rw-r--r-- 6.3 KB
cpu.c -rw-r--r-- 54.5 KB
cpu_pm.c -rw-r--r-- 6.0 KB
crash_core.c -rw-r--r-- 11.5 KB
crash_dump.c -rw-r--r-- 1.3 KB
cred.c -rw-r--r-- 22.4 KB
delayacct.c -rw-r--r-- 5.1 KB
dma.c -rw-r--r-- 3.3 KB
elfcore.c -rw-r--r-- 432 bytes
exec_domain.c -rw-r--r-- 1.1 KB
exit.c -rw-r--r-- 44.4 KB
extable.c -rw-r--r-- 4.8 KB
fail_function.c -rw-r--r-- 7.1 KB
fork.c -rw-r--r-- 63.4 KB
freezer.c -rw-r--r-- 4.5 KB
futex.c -rw-r--r-- 104.1 KB
groups.c -rw-r--r-- 4.9 KB
hung_task.c -rw-r--r-- 7.3 KB
iomem.c -rw-r--r-- 4.7 KB
irq_work.c -rw-r--r-- 4.4 KB
jump_label.c -rw-r--r-- 19.7 KB
kallsyms.c -rw-r--r-- 17.6 KB
kcmp.c -rw-r--r-- 5.7 KB
kcov.c -rw-r--r-- 11.0 KB
kexec.c -rw-r--r-- 7.8 KB
kexec_core.c -rw-r--r-- 31.1 KB
kexec_file.c -rw-r--r-- 31.9 KB
kexec_internal.h -rw-r--r-- 924 bytes
kmod.c -rw-r--r-- 5.0 KB
kprobes.c -rw-r--r-- 63.6 KB
ksysfs.c -rw-r--r-- 6.3 KB
kthread.c -rw-r--r-- 34.0 KB
latencytop.c -rw-r--r-- 7.9 KB
memremap.c -rw-r--r-- 9.9 KB
module-internal.h -rw-r--r-- 959 bytes
module.c -rw-r--r-- 112.9 KB
module_signing.c -rw-r--r-- 2.3 KB
notifier.c -rw-r--r-- 16.3 KB
nsproxy.c -rw-r--r-- 6.5 KB
padata.c -rw-r--r-- 27.1 KB
panic.c -rw-r--r-- 17.4 KB
params.c -rw-r--r-- 23.2 KB
pid.c -rw-r--r-- 11.2 KB
pid_namespace.c -rw-r--r-- 11.4 KB
profile.c -rw-r--r-- 14.8 KB
ptrace.c -rw-r--r-- 32.4 KB
range.c -rw-r--r-- 3.0 KB
reboot.c -rw-r--r-- 13.9 KB
relay.c -rw-r--r-- 32.1 KB
resource.c -rw-r--r-- 40.9 KB
rseq.c -rw-r--r-- 9.9 KB
seccomp.c -rw-r--r-- 45.1 KB
signal.c -rw-r--r-- 113.7 KB
smp.c -rw-r--r-- 21.6 KB
smpboot.c -rw-r--r-- 11.7 KB
smpboot.h -rw-r--r-- 640 bytes
softirq.c -rw-r--r-- 18.6 KB
stackleak.c -rw-r--r-- 3.9 KB
stacktrace.c -rw-r--r-- 1.8 KB
stop_machine.c -rw-r--r-- 17.8 KB
sys.c -rw-r--r-- 62.1 KB
sys_ni.c -rw-r--r-- 9.3 KB
sysctl.c -rw-r--r-- 78.4 KB
sysctl_binary.c -rw-r--r-- 50.2 KB
task_work.c -rw-r--r-- 3.1 KB
taskstats.c -rw-r--r-- 15.4 KB
test_kprobes.c -rw-r--r-- 6.4 KB
torture.c -rw-r--r-- 20.8 KB
tracepoint.c -rw-r--r-- 15.6 KB
tsacct.c -rw-r--r-- 5.1 KB
ucount.c -rw-r--r-- 5.7 KB
uid16.c -rw-r--r-- 5.1 KB
uid16.h -rw-r--r-- 442 bytes
umh.c -rw-r--r-- 19.0 KB
up.c -rw-r--r-- 2.3 KB
user-return-notifier.c -rw-r--r-- 1.3 KB
user.c -rw-r--r-- 5.6 KB
user_namespace.c -rw-r--r-- 33.4 KB
utsname.c -rw-r--r-- 4.0 KB
utsname_sysctl.c -rw-r--r-- 3.4 KB
watchdog.c -rw-r--r-- 21.3 KB
watchdog_hld.c -rw-r--r-- 7.7 KB
workqueue.c -rw-r--r-- 164.0 KB
workqueue_internal.h -rw-r--r-- 2.4 KB

back to top