From patchwork Wed May 3 09:17:47 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: 678831 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp948219wrs; Wed, 3 May 2023 02:18:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5qaQtdjgxp3VWPwveTsOO3CLXsg9RfpI5cW455Srim7Bf+kSlZN5Dg14MyZ58i4btmEoBC X-Received: by 2002:a05:6214:1949:b0:61b:6c88:4bd3 with SMTP id q9-20020a056214194900b0061b6c884bd3mr5842655qvk.47.1683105537484; Wed, 03 May 2023 02:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683105537; cv=none; d=google.com; s=arc-20160816; b=rG/RHOAYth14jD3Kxn8gqOh8gwwtW6TrsKLTy45u8du9kRH0z61uVOX5XJ7dn9d56O QgXvNN+ieQ/Wviz+g7pb82hbSEDTljG/iHXiWT8url6oNyKbfX8M1YelmW495xAjehHI 9kjQawCD2gRgMNQxRgrqBgBlE7xdJfMZi+NQWoNJ5mXr0z04zl26mzDF283k4T9z5L19 4i58h0IyMbF7m1aXhOVnUP1zXk+kncp3f+53OA+Ow7MojRdArvKiZlQhZ2/fcMnbzBuI s5I7FVsF+tOghcZ7NxphflBwjcf4dwEfeiwLV7c1gLKs6BA3bmB5BS/UBTV/VEdwwHI2 0KQA== 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=MoOuAposOVouEiSDB7Zw3sg5pr2E0SeQOaNY822mSO8=; b=ya6s/uPnNE2cTR4zjeisA/GbCS4VkAUgyhCA+oh1Ks+NI81y8bmEW9+Ky0S5g4ZY/X jAq8BvPxCLHmrT/NrygDUZ5QD/ArMiH7+Xewa3rL+/Fza/2rttqxHbKk40Fzxv7DfSDz vhkmDT6UI21Tx9L/nMFrNC4RgWrr0RPpKeifFxwW8hOltyldepTMXo+wVxC0R37gwe+l e0Q2n6DyvmJxssr3NWMVzQsheIpJyBci2CQO3gxemMyvTeWa5zOqVAUiGA8gfW9A0Hdv bU8DPxm+7Z0jK7oOuPg89O0qBwhw8wcX1fMRB9S+ydkDGIcO5UJMqrfi51eOfFt/8cxf mciw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J5CE6X4S; 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 5-20020a0562140cc500b00614cc52b0d5si12764198qvx.534.2023.05.03.02.18.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2023 02:18:57 -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=J5CE6X4S; 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 1pu8cf-00031P-0Y; Wed, 03 May 2023 05:18:05 -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 1pu8cd-0002r0-Co for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cZ-0000Le-Sc for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f182d745deso47653245e9.0 for ; Wed, 03 May 2023 02:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105478; x=1685697478; 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=MoOuAposOVouEiSDB7Zw3sg5pr2E0SeQOaNY822mSO8=; b=J5CE6X4Slx73fHPIGYFRwQH6sp711m9/2KuhJJMew4oMdDODu8woFjVnflBzQpDUev d0KiOktoeDTjSCUSbLnzb5iLixq4aJ0W1n9SrjVxt8QgJDTjkwvfMqFVAfQgD/t8vnAc 94aTMVmVkPStg5e96Ip7dI1urt5nPvdVeXZaivz5m8V6sGheUtlvnuydmjAKSfjlTX3e l5Jl2DEUsGKi/veRgcqEnFRwZgJaBTkuGs+wMSbCO06UAaByMmRINVLzdTotWOPhQeow ZsH4KMAG5cRZLy4zMDiQRPr2KrDSMxB41BlwGqflP3wV/lVcjQqwrObyxwjogsXvXEPj dA2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105478; x=1685697478; 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=MoOuAposOVouEiSDB7Zw3sg5pr2E0SeQOaNY822mSO8=; b=Y75qiqsD1MgltICJoD7ziR1LM/idbug8bWYykoWRBw9c5o+TZyLBXqx7axmut9s1S5 ZdUANXJyLDa4c9J16iKC3v+xX35t4p8Uko6VloxQhnuian9a+1wIMHRVu5GpWt+LYE7h U2j9tGRLsISl7Ayg5D+/T0CirWL600LSOnfzBKSkPxE3Mi/ToBtVNszUhTO6KkmRfImd gY/APCcM3xPP0aYR7R1rUrLTnlad7ntygi3k0iwf0khffhJn6zDXqqqOorQmiSKgYUJm AdRWAPt2uP81uQ0CTmUDGx/KsxLeQUlEkzkwHw/DH+xGv86WO96bf/9yBzSAllQGNHDi 74yQ== X-Gm-Message-State: AC+VfDynM4mwH0CGpxhyLp7H+CZz9hqGit3KZwfa7KyuU9nMdnYjXI6M MzCZQm8qpGIKOP20G/haOMcuWQ== X-Received: by 2002:a7b:c8c4:0:b0:3f1:78d0:fc4e with SMTP id f4-20020a7bc8c4000000b003f178d0fc4emr14792000wml.32.1683105478099; Wed, 03 May 2023 02:17:58 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y6-20020a1c4b06000000b003f17e37ce60sm1231800wma.47.2023.05.03.02.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 17EBE1FFBC; Wed, 3 May 2023 10:17:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 01/10] *-user: remove the guest_user_syscall tracepoints Date: Wed, 3 May 2023 10:17:47 +0100 Message-Id: <20230503091756.1453057-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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. Message-Id: <20230420150009.1675181-2-alex.bennee@linaro.org> Reviewed-by: Warner Losh Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- 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