This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/4] syscall_any tapset to improve performance


When running on Fedora with a 4.17 kernel a number of the systemtap
example scripts using the syscall.* and syscall.*.return fail because
the syscall tapset update is not yet complete.  These scripts were
just noting the syscall name and the return values.  The new
syscall_any and syscall_any.return makes the instrumentation more
resiliant to the details and mechanics of how the kernel handles
syscalls.

While investigating the failures of scripts using syscall.* and
syscall.*.return found that a significant amount of time is spent to
create the instrumentation because of the number of probes.  The use
of the syscall_any probes greatly reduces that overhead producing a
smaller kernel module and also yields a faster starup and shutdown
because there are fewer instrumentation probes to install and remove.
Below are pass times and sizes of syscalls_by_proc.stp running on a
RHEL7.5 x86_64 system.  Also compared the tracepoint variant of the
syscalls tapset, tp_syscall.*.

           syscall.*   syscall_any	tp_syscall.*
pass2        10.8s          1.1s              8.9s
pass4         9.9s          1.4s              7.5s
*src.c     1070154 bytes  32582 bytes     41501 bytes
*src.o      491400 bytes  90016 bytes     96768 bytes
*src.ko     505480 bytes  97584 bytes    102976 bytes


William Cohen (4):
  Use sys_enter and sys_exit tracepoints in place of syscall.*{.return}
  Adjust comment in tapset/errno.stp so the documentation can be built.
  Add the syscall_any and syscall_any.return probe points
  Convert the various systemtap examples to use the syscall any tapset

 doc/SystemTap_Tapset_Reference/tapsets.tmpl   | 12 +++++
 tapset/errno.stp                              |  4 +-
 tapset/linux/sysc_any.stp                     | 50 +++++++++++++++++++
 .../general/eventcount.meta                   |  2 +-
 .../general/stopwatches.stp                   |  4 +-
 .../lwtools/syscallbypid-nd.stp               |  2 +-
 .../process/syscalls_by_pid.stp               |  2 +-
 .../process/syscalls_by_proc.stp              |  3 +-
 .../systemtap.examples/process/syscalltimes   |  6 +--
 .../process/thread-business.stp               |  4 +-
 .../profiling/container_check.stp             |  2 +-
 .../systemtap.examples/profiling/errno.stp    |  4 +-
 .../profiling/syscallerrorsbypid.stp          | 10 ++--
 .../profiling/syscalllatency.stp              |  6 +--
 .../profiling/syscallsbypid.stp               |  4 +-
 .../systemtap.examples/profiling/topsys.stp   |  2 +-
 16 files changed, 90 insertions(+), 27 deletions(-)
 create mode 100644 tapset/linux/sysc_any.stp

-- 
2.17.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]