From patchwork Wed May 24 13:39:43 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: 685353 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp257733wrt; Wed, 24 May 2023 06:41:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60V20sp+qQ0criMFyShX0eQieeJWbcoKVfXhM1weAuPVlRq2uJ7i5SmANNt3WzHzEisIJG X-Received: by 2002:ae9:e895:0:b0:75b:23a0:d9e5 with SMTP id a143-20020ae9e895000000b0075b23a0d9e5mr7087179qkg.59.1684935706357; Wed, 24 May 2023 06:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684935706; cv=none; d=google.com; s=arc-20160816; b=datEZAsoFMfjp9KWMl9Xmn/uObxKXx3nZ+T5FemQJG1gJ74sJglciBRuVKWUMOZTYd 2i4odZIv6HVxld/MGs2ic64La/IlGPnoI+aZ8bhqgkI9iaK0hjAcCg+IDGWDgfqOjrYN otx9qeuzt8srMSRD78nLQ8KdJ8RujNKSF/kMVeicu03mrx2LT8jsgKym1S1h9ImiaOY5 hXaXnDot8zdMxgv71miTrGZrRifSsY5/wbGEPmsGWAqJiNwTGUmZWoa403El62cFXtht Vb3MnVwN4WwrCLmElXc8TlokNmxHB9zKYSDtNNKW/XLCzOY3dLG+RfxaYBdvTM99AaRd tpFQ== 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=VrRa3Xy6DTZtfJYVIdsX3CmIb/NP6vmSmbITjRkKdS4=; b=H4xyG5c3ccFwwZYNX/1rmwv0ezu7sv6/g7BGjkZwRpstXideMC95EvXTVzjyPTcB43 BWo0RZ90EqcwfTxbbFx2IzjZgHiWvjsSK7WO9fXcVd4/yKXdpMhCgN7HW+JRm5+MRrQ5 kTSIvZq7SQ+P0WuCmcv7wvU9rO8smCPBabiCdYUZKVISzlpJKqH6IIgtmx6qvx1XJEye yxwRjuHtGHLftzIF2Z40NERYZnygnSRuS8/rrZ70FV4vX7t4JJBMK3WLK6cthUB1KGLm sc3yrBezoBYd1HRo0JpX2/UZbQzwYG2qvIf1ZVU4fwqTlIlDIcCi9eA3NVcVr3PpeVxW cSEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ypc3l46t; 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 g13-20020a0562140acd00b005ef470bb7c8si6594832qvi.366.2023.05.24.06.41.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 06:41:46 -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=Ypc3l46t; 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 1q1oil-0008S2-K9; Wed, 24 May 2023 09:40:07 -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 1q1oid-0008Ck-96 for qemu-devel@nongnu.org; Wed, 24 May 2023 09:40:01 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1oia-0003la-Jm for qemu-devel@nongnu.org; Wed, 24 May 2023 09:39:58 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3078cc99232so838672f8f.3 for ; Wed, 24 May 2023 06:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684935594; x=1687527594; 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=VrRa3Xy6DTZtfJYVIdsX3CmIb/NP6vmSmbITjRkKdS4=; b=Ypc3l46t2R84xQ8C/QGyYmD7k3C78NAyl6rI/RHp8QlQTDtQDvOcBQHZSN7jthuSWO qNZffMqnP+OX0BF7AB0ALSh96Zmi7YKc7kgZFtiRGmqDe+TUsPNF6w4a590r/3xBsVlf Ulk8mLzRV8pVAm5Iw1u5e3bplZWQMML7lmSNr3Bc/cmA1v4SGM5dVwF78kYXT5X/5jmb kZkzam2HSzIGq/SKgXe/Sb4lCzTfCA7WkpSmDR4fD1TlpAlymt/00HpvMZ/ZIGLJmx/j Wt5k21qDUyKtgmB8NGXyj0wKq6b/opaDdaz9za16llw1ATIqs9Pir/iL04slCJVKLOV1 39ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684935594; x=1687527594; 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=VrRa3Xy6DTZtfJYVIdsX3CmIb/NP6vmSmbITjRkKdS4=; b=jalPal/V8oDoW/ckhuBGT4/WdFxfn86Ct4UKcoL95OQhKzvD7lbwr0bu9cOS+zr6V7 NmEDUWuo4oNqgmgK+Lvj+44Tl6VUbv/INEKTwOkZ/WO6sO1j9WBVpl9NrbKwl0IfDxJc XFAJQpeqrNtN9LV4co7Pukn6nIZBdZvOePgwR3+RZeD8YhOOIeneADSiYhzt+btLkvoX YIHXgOeJUSMZRmFEJ3lWig+yt5X2Xjj4x3DXvaPV4Tz42/0ZkcdqeeNuXSjogl5MTS2O EguYVNCJtA5uvVjEnW5g3lV3xsp2GFcQ7MGhSgBP5WCr8MS4HBPOszyNpa4xQZ/Yodvn h5sA== X-Gm-Message-State: AC+VfDyVTVjcKcjUK2QC0tJRfyy5jl3F41hw1l8Yt+uImQhHs+YxAlJK nPZrhjqS8mpusnbQyT828QO5Lg== X-Received: by 2002:adf:ef42:0:b0:307:c0c4:108f with SMTP id c2-20020adfef42000000b00307c0c4108fmr13648871wrp.33.1684935593873; Wed, 24 May 2023 06:39:53 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p15-20020a5d458f000000b003090cb7a9e6sm14550611wrq.31.2023.05.24.06.39.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 06:39:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0ABB91FFBC; Wed, 24 May 2023 14:39:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kyle Evans , libvir-list@redhat.com, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Greg Kurz , Eric Blake , Markus Armbruster , Warner Losh , Marcel Apfelbaum , Eduardo Habkost , Michael Roth , Richard Henderson , Christian Schoenebeck , Riku Voipio , Paolo Bonzini , Yanan Wang , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v5 01/10] *-user: remove the guest_user_syscall tracepoints Date: Wed, 24 May 2023 14:39:43 +0100 Message-Id: <20230524133952.3971948-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524133952.3971948-1-alex.bennee@linaro.org> References: <20230524133952.3971948-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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. 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: <20230523125000.3674739-2-alex.bennee@linaro.org> --- 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