From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22331 invoked by alias); 21 Sep 2018 14:56:14 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 22322 invoked by uid 89); 21 Sep 2018 14:56:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=BAYES_00,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=4.17, tracepoint X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Sep 2018 14:56:12 +0000 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33BDE88E65 for ; Fri, 21 Sep 2018 14:56:11 +0000 (UTC) Received: from cervelo.rdu.redhat.com (dhcp129-44.rdu.redhat.com [10.13.129.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF10E308BDA4; Fri, 21 Sep 2018 14:56:10 +0000 (UTC) From: William Cohen To: systemtap@sourceware.org Cc: William Cohen Subject: [PATCH 0/4] syscall_any tapset to improve performance Date: Fri, 21 Sep 2018 14:56:00 -0000 Message-Id: <20180921145607.5484-1-wcohen@redhat.com> X-IsSubscribed: yes X-SW-Source: 2018-q3/txt/msg00192.txt.bz2 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