From patchwork Thu Apr 20 15:00:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 675630 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp365335wrs; Thu, 20 Apr 2023 08:02:40 -0700 (PDT) X-Google-Smtp-Source: AKy350aQj1aNeeAfdaoA3P5IGHem/kTIi9OZo8j/g3GWXTmRwI1TMVBNwpUjkRRrHZvXf4BKp+Bd X-Received: by 2002:a05:6102:3a49:b0:42f:f1bf:681e with SMTP id c9-20020a0561023a4900b0042ff1bf681emr936247vsu.12.1682002960229; Thu, 20 Apr 2023 08:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002960; cv=none; d=google.com; s=arc-20160816; b=xSGJpj0LQF0Z/NXWtKWm1mBn1UOEf/wI3xDEVPMootSEFKsCNuZCOMznhnpCH2g6Io fm+unw12C+sTgzCzvB5EaHso3ArgRFE5ZAwaK7WPSgaTfdSKhwDgLluG66uA7QSmGTpy rYk8vYLeuyUr0kVyDxIVwqdPQbi2VBpLjsh6aB+pj/egJxcXmNOAvKKbpZNIwsb+ndIM 2Y3/Kqp5PWr6iB0L+hEjI7zfKCLMKV9HiGyIUEImnluD6RTnHSYMcQIXUh7zg/zFmlss JqCYm5yb4wt981UaDQHJGvgRDVR5OXUVPbCwopGunpO2N7WOHRt6H9+XwOeaMmaiJJde r2RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MTE4gF7XsZ9y5Na2NQaOlWvM5YSPdb/d1vz4kdTlojw=; b=Aq1fud861y5sqiXDUAfqvaM2tBwoOIcbizKIOb0ff35fgeYQlDR7ahHZHPEJ10amqj JEfH18dPisS7NoWaxekR22rKUEmVbrJfepOEpH7l9JRWvlaeep8TQshwwDnpC/Sem55z Rke0prEOx7oMOMh2mmQOw1GYedbeyKRwCEMfLipUqDmigC7zWJl8YTi18SwLN4bJNR4i t/OrR/vLtJmryuuTR2ZjyAPZMHxAMlggcKBPdqh2k+d22jRrN9368DUjYzZwDmBbdUZc 85edi+ZZbMcHCic2EsUF0Zl2omFaHqsq0jXr6DrG1xWw6TzXrD7hWMNpvdjPwkICIcoC N69g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b+RSzvFi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u23-20020a67f517000000b0042e53f20db6si466765vsn.571.2023.04.20.08.02.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:02:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b+RSzvFi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppVls-0003o0-33; Thu, 20 Apr 2023 11:00:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppVlg-0003ae-Rp for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:17 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVle-00045g-Ea for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:16 -0400 Received: by mail-wm1-x32a.google.com with SMTP id iw7-20020a05600c54c700b003f16fce55b5so1304518wmb.0 for ; Thu, 20 Apr 2023 08:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002811; x=1684594811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MTE4gF7XsZ9y5Na2NQaOlWvM5YSPdb/d1vz4kdTlojw=; b=b+RSzvFiKnpyiN7mEZxxrNuGLWLzhRYc86gdP33870JrqbCDAK5vTMkejSXjBVN9ym aLkpyl87rbQ9L3h2KdXj0RJulTDO5EnVPrjhbbYRtScAE2DCrQk9rXxd4aPbQbHGHIOv BHipwgFUCerLOrkvxcMd/AlJJajzZcCxwScEZZmXfGIhvBzZgZKrW6HY5zJdUGz/weBI dpViOU5T6XYFVlQc8kMyCB+l2rjzUo0pvJ9GMQyHp5pOCCHhQwoBGgm6DPKuWrBm2HHu a0OU5Rev7s7JqBlx77hJI9tT8shjV2c1zCmvm7uB6R4qjEOxNNvjXEh5sX3NL6YQQxtD SS0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002811; x=1684594811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MTE4gF7XsZ9y5Na2NQaOlWvM5YSPdb/d1vz4kdTlojw=; b=gIw06o5AK6+oEmMcIsL3N4UoYgrajgfrCgHy7Pju+0zlLIYRUIOe2UpcfcgQUyt0w/ yRpxHxGLn5Tn+y8cJdMQgfT2CiOkRXsXEb6c1bJX206Y+AWGy0IhO6yfN9tUSAZDHy+u 5NloktJGyfSr8igg+Nl6WUiPMVWgwuc4xlqaU78X6+ex5w2C9zZq4uTxgh7GfeBYdR6s 7nLKfhQhrogT+kUgYaXJhI6V4K5HtOI+b7n4WcYxAPQAfX9u5q7jAYhqNU78PJU5L5A9 5TUkEUPP8f2AiCy7RiZ18J/iPw3CUt26/c9X2dou7tVxL3AARxDveX7ZXa6/h8rIW9du q/Xg== X-Gm-Message-State: AAQBX9cbnU/8jM0go/pjbDeeJtYbRnbS5hfc7j87rpHmhVePUINiHY1D do8Je/Lt58R5HXfTUK3g7CRcmw== X-Received: by 2002:a1c:ed18:0:b0:3ed:88f5:160a with SMTP id l24-20020a1ced18000000b003ed88f5160amr1555454wmh.11.1682002811019; Thu, 20 Apr 2023 08:00:11 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p9-20020a1c7409000000b003f17ee3bdc3sm2196686wmc.42.2023.04.20.08.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0E5361FFB8; Thu, 20 Apr 2023 16:00:10 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Michael Roth , Riku Voipio , Christian Schoenebeck , Yanan Wang , Greg Kurz , Richard Henderson , Kyle Evans , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , Stefan Hajnoczi , Eric Blake , Markus Armbruster , Warner Losh , Paolo Bonzini , Marcel Apfelbaum , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH 01/10] *-user: remove the guest_user_syscall tracepoints Date: Thu, 20 Apr 2023 16:00:00 +0100 Message-Id: <20230420150009.1675181-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230420150009.1675181-1-alex.bennee@linaro.org> References: <20230420150009.1675181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Signed-off-by: Alex Bennée Reviewed-by: Warner Losh --- 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