From patchwork Wed May 31 19:48:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 687290 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp1441581wru; Wed, 31 May 2023 12:48:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7SEaMGu5Ejlo9J3dPbtSqx7TKEoF9/OoQ0RxCh+gzi9U91y74pKKCMvkjuVtIdREX36HAO X-Received: by 2002:a05:620a:27d1:b0:75b:23a1:3653 with SMTP id i17-20020a05620a27d100b0075b23a13653mr7010308qkp.20.1685562529587; Wed, 31 May 2023 12:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685562529; cv=none; d=google.com; s=arc-20160816; b=POJZlDx9kTLaOJXf7L4TBh3W0gdQUYsQuf8mhTmJFDoxtj1vHM+52L+hcL7DGM+HJr SeNqFIeddCTU3g/ncCkN/v7boFOXvIPKGnKgseK/ahtYKvPPISwVwXftFWqy1Menlu6k ZNnhKquiTw1S9JG9+W+hb8YOUP7L+KEVfDz7pvl9IXTV5MhGtWlRg54AIvCYRFqFFuD+ Zy+D+daDAcQqpI7BN5qKRasj2zq9F6XHiGUuo5K2D0SNuzm4WGDD4itEUSJGGAIBZ5+2 Zw3PczojveCGeVJZUviAAIQycPneri9gRmSRzggNFmZjrVPUdciv9iydwSitXjPsWKvD ZyyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:sender:errors-to:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to:delivered-to:dkim-signature; bh=fOQ3qUI6u0ZiSdZl/ogv+WP+K/JrIOYVS2c+U3Wz4Bc=; b=ssneGgcRA8pWGtzSph06pz/RiIPa8Uq0oX5Gkn3/b2fF2ojre6i/6fdH3fj+6pgmxw Rlfw1xc9Xa6ozncOMqXhClEpOORTo7qgfACGF0a4DStFJcRSbDQdMR7bRIESVV4disL5 Jli0fD4h74cf+yvCzuD3UlDl35zZ4SdxS0n4dFfNbxbM3Zz3mgkbvHT9ztidMlqqvg7k VyBCvmvmXuLiuD5FFmPi4fKaImrPKVSVOewNyS0rAZXg7uIhB48bPp8fTx8FWmNSxrur b/arBaTwDuYyx60hkiLcKmivvUqd8rCQKM3EWv5OMYGP3mz3NlWgOznKzQsdJSJNr+6T 9KZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UqWbwaMd; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.133.124]) by mx.google.com with ESMTPS id m23-20020ae9e717000000b007591805caf5si8428534qka.83.2023.05.31.12.48.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 12:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UqWbwaMd; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685562529; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fOQ3qUI6u0ZiSdZl/ogv+WP+K/JrIOYVS2c+U3Wz4Bc=; b=UqWbwaMds7K2wPtANxeO72Kii5nVzkqcZUwNMsZ5zwxEFHWFfjInbdkl0Gc7SWCN34W/Ry O3fmZsaoajej7+QULbAlZfQpNIoBs3c2Kp4QhoncU+sUjZoRnaXPFdDASLZ1TVSw7GXABk WJ3E4rUSVfcMwAGCwH7EFiE6+aXCWXg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-650--OE6eDlgPiuY9lzM7JqsDw-1; Wed, 31 May 2023 15:48:47 -0400 X-MC-Unique: -OE6eDlgPiuY9lzM7JqsDw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A6D17185A78B; Wed, 31 May 2023 19:48:44 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 938A2202696C; Wed, 31 May 2023 19:48:44 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 728D419465B6; Wed, 31 May 2023 19:48:44 +0000 (UTC) X-Original-To: libvir-list@listman.corp.redhat.com Delivered-To: libvir-list@listman.corp.redhat.com Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0811319465B1 for ; Wed, 31 May 2023 19:48:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EB2CB40CFD49; Wed, 31 May 2023 19:48:20 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from localhost (unknown [10.39.192.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A81A40CFD45; Wed, 31 May 2023 19:48:20 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PULL 01/11] *-user: remove the guest_user_syscall tracepoints Date: Wed, 31 May 2023 15:48:05 -0400 Message-Id: <20230531194815.1508961-2-stefanha@redhat.com> In-Reply-To: <20230531194815.1508961-1-stefanha@redhat.com> References: <20230531194815.1508961-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , libvir-list@redhat.com, Kyle Evans , Riku Voipio , Richard Henderson , Greg Kurz , Markus Armbruster , Yanan Wang , Stefan Hajnoczi , Michael Roth , Paolo Bonzini , Christian Schoenebeck , Eric Blake , Warner Losh , Richard Henderson Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Alex Bennée This is pure duplication now. Both bsd-user and linux-user have builtin strace support and we can also track syscalls via the plugins system. Reviewed-by: Warner Losh Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-2-alex.bennee@linaro.org Message-Id: <20230524133952.3971948-2-alex.bennee@linaro.org> Signed-off-by: Stefan Hajnoczi --- include/user/syscall-trace.h | 4 ---- bsd-user/freebsd/os-syscall.c | 2 -- trace-events | 19 ------------------- 3 files changed, 25 deletions(-) diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index 90bda7631c..557f881a79 100644 --- a/include/user/syscall-trace.h +++ b/include/user/syscall-trace.h @@ -26,9 +26,6 @@ static inline void record_syscall_start(void *cpu, int num, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8) { - trace_guest_user_syscall(cpu, num, - arg1, arg2, arg3, arg4, - arg5, arg6, arg7, arg8); qemu_plugin_vcpu_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); @@ -36,7 +33,6 @@ static inline void record_syscall_start(void *cpu, int num, static inline void record_syscall_return(void *cpu, int num, abi_long ret) { - trace_guest_user_syscall_ret(cpu, num, ret); qemu_plugin_vcpu_syscall_ret(cpu, num, ret); } diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index c8f998ecec..b0ae43766f 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -531,7 +531,6 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, CPUState *cpu = env_cpu(cpu_env); abi_long ret; - trace_guest_user_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (do_strace) { print_freebsd_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6); } @@ -541,7 +540,6 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, if (do_strace) { print_freebsd_syscall_ret(num, ret); } - trace_guest_user_syscall_ret(cpu, num, ret); return ret; } diff --git a/trace-events b/trace-events index b6b84b175e..691c3533e4 100644 --- a/trace-events +++ b/trace-events @@ -85,22 +85,3 @@ vcpu guest_cpu_exit(void) # Targets: all vcpu guest_cpu_reset(void) -# include/user/syscall-trace.h - -# @num: System call number. -# @arg*: System call argument value. -# -# Start executing a guest system call in syscall emulation mode. -# -# Mode: user -# Targets: TCG(all) -vcpu guest_user_syscall(uint64_t num, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5, uint64_t arg6, uint64_t arg7, uint64_t arg8) "num=0x%016"PRIx64" arg1=0x%016"PRIx64" arg2=0x%016"PRIx64" arg3=0x%016"PRIx64" arg4=0x%016"PRIx64" arg5=0x%016"PRIx64" arg6=0x%016"PRIx64" arg7=0x%016"PRIx64" arg8=0x%016"PRIx64 - -# @num: System call number. -# @ret: System call result value. -# -# Finish executing a guest system call in syscall emulation mode. -# -# Mode: user -# Targets: TCG(all) -vcpu guest_user_syscall_ret(uint64_t num, uint64_t ret) "num=0x%016"PRIx64" ret=0x%016"PRIx64