From patchwork Thu Jun 1 15:06:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 687709 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp406509wru; Thu, 1 Jun 2023 08:07:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59VsTh9LNQ2SMnE09H/oALyNoAWRSdlJ9Qdl7NENAIDXlsYyIapZO+DZWjKFafv7x73CQ3 X-Received: by 2002:a67:ff8a:0:b0:435:5148:b0e4 with SMTP id v10-20020a67ff8a000000b004355148b0e4mr3650029vsq.7.1685632063778; Thu, 01 Jun 2023 08:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685632063; cv=none; d=google.com; s=arc-20160816; b=FSOeQ8ChDXeZsx1a+l1au6fQA6yUF/WErUPBCam6OhgQmhd63cI/JOkAjIz76vImvf /ExUnZQDgBDXfwxRJMLVn/PBiuYsf3Rd9MUzV/gxZR/frSgvjyaK0sjcArfnnKmY2z1/ XigohwoF6ujO/Ugj4SER4c19ENZFu6I26n0Z0rAoHGqbutAwLKWXSRDtwgbTRuip+Q5c sI9C2V8iWSzDDywtoV9QXmoZBG4tOVW+MqGNpruyy4uBRZjpbSAqoncAVXY/oWB+BVd0 1PEUv8lrSykz5AZFTxjt2MDT6KAGLTkanB8I2fzq/uJU8tx2J8CbtEOCWZYvD/cZ7hEt bDiw== 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=lBQXTlVHI0XajC/IcilAyjpiqM2BywFex0dWI0WCr9c=; b=04h91Wjdjb7mW6t/owhFFltlySfSaidNqWlDUpHd00523nte76ILqmhvrmhz/gZNta dEMlcok9zraK4vc0Z8uS+kN05JTr0jOC2Xg+kdAmEV7cV+0r/ZRYq21RGejZneSKfHBT VUWFwC41wa7Eca1VMsc9UOx4w6+YUzNCMcErn1vlL6/Tl/0Y4HRZqADm2JTJh7BLm6x7 10Ch+foBW3JX2dvnyC0mwcfaiulFLS4anlD7qMzDxRHgDVOqnWqcHI2lZXOKIlugV+Jw HlH2SY1hefiT1o2JPNCaiyhpQy8XKL+YfmbZeagr97bDff7R4iPgC9rOGjrJRDIBH2a6 i5TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OWbBLuiz; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.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.129.124]) by mx.google.com with ESMTPS id e13-20020a0561020dcd00b00439684c990dsi2124222vst.603.2023.06.01.08.07.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:07:43 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OWbBLuiz; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.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=1685632063; 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=lBQXTlVHI0XajC/IcilAyjpiqM2BywFex0dWI0WCr9c=; b=OWbBLuizfe/8KQAy5rsshwnDM/cuo29uAMO72HGTosnAuY5tSBzbTptMMPxeDIbo8UQLt0 z3wHDLHlY+ZgD3VmB4x4+fZO8aOMNCUf/aqgEp8Q23/2Jg5Gl7o/4KI9mJjdk/g9yJE/qD VYGEySZxbNuKWAergDqn1g7t3fdnDFU= 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-119-sytuNQmkM2Cu0Rc_fHsQ4w-1; Thu, 01 Jun 2023 11:07:26 -0400 X-MC-Unique: sytuNQmkM2Cu0Rc_fHsQ4w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA220185A7AA; Thu, 1 Jun 2023 15:07:01 +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 84CBA9E78; Thu, 1 Jun 2023 15:07:01 +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 251B619465BC; Thu, 1 Jun 2023 15:07:00 +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-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3C3B81946595 for ; Thu, 1 Jun 2023 15:06:54 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 242CC492B0B; Thu, 1 Jun 2023 15:06:54 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from localhost (unknown [10.39.194.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 91CA8492B0A; Thu, 1 Jun 2023 15:06:53 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PULL v2 01/11] *-user: remove the guest_user_syscall tracepoints Date: Thu, 1 Jun 2023 11:06:39 -0400 Message-Id: <20230601150649.1591095-2-stefanha@redhat.com> In-Reply-To: <20230601150649.1591095-1-stefanha@redhat.com> References: <20230601150649.1591095-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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 , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , libvir-list@redhat.com, Michael Roth , Riku Voipio , Christian Schoenebeck , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Richard Henderson , 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.5 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> [Remove unused variable in do_freebsd_syscall() reported by Richard Henderson. --Stefan] Signed-off-by: Stefan Hajnoczi --- include/user/syscall-trace.h | 4 ---- bsd-user/freebsd/os-syscall.c | 3 --- trace-events | 19 ------------------- 3 files changed, 26 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..de36c4b71c 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -528,10 +528,8 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8) { - 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 +539,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