From patchwork Fri May 5 15:53:27 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: 679304 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp437597wrs; Fri, 5 May 2023 08:53:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6SOXujkgf65CZeiJ4VmNwhypWspKWgAqwtXJ0U/xwUxt4MDDvcVMnxcrj1VjseA7VjiAXK X-Received: by 2002:ac8:5d94:0:b0:3e9:aa91:3627 with SMTP id d20-20020ac85d94000000b003e9aa913627mr3282963qtx.65.1683302036072; Fri, 05 May 2023 08:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683302036; cv=none; d=google.com; s=arc-20160816; b=wrG2tV/0mI1gnzZVVQfjtp4Dv4RFeZhiUHIWY/HE1NxVIKoJ5plJ92v+evAvEldVhE 6Xn8FfFJh8x0+/kSdwHyicarQVKmgHlh6u9sUe9m0/Doe77G/x0Yj57zVZH4tx+mCh9n Oq1LweRpcDXZkXHFYQzQT+Tx4p6KN1GXo8MwLYJ1iUG6YXl3oNRJpn/79742xuen25hI 5Zsu7FwTTs6zestNdygEEf2tz24Zj1GuiSGqlcdNf0f5EDG1nvFiFT4oUcvfQlSx5Rlg MPlCwAcWS3p2XXUUjltVqBJYf5Snr057mP3iA6i0lDeN0D1l1w6zMRzJF2ikXl1e8BJa bpxg== 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=PwmylO98fPza1KeBnyuNGb07zbktOjohayPxUd8NRjw=; b=i8aiDVMHukG6vBZxZKk/oT9j1p1uzNvWB8s0BTeoWl3sTs75lHbyd/ozraXqWKW+H9 +xmBJY5UStHY5eptr8E3UiGlNKl0Jh0CWDfkS2mHmGcF6VT9WL0pl/Kfn+hkJAxDxR6W XBw+I1sGqT5HlYXZ9OmBO/clSwJvrZ66wuNM79lO+2QxrQnNwzkeECScMm7Gz7j+QQFg Bl6nIZIx+XRZiwvc5xbJUBqLP9X7Y31sH8UWyis4e3f9mUIyqHS/gx6+ncVfMOHzhswX K56ykxvOfhoIvX8tAfZ9qYLGggyMHIWVeigVYfw+QKDkNR4S/WOlf6tzp4+25o5h+D0j esPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kMqBJ3aS; 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 i9-20020a05620a150900b0074e23c44ad8si768687qkk.520.2023.05.05.08.53.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 May 2023 08:53:56 -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=kMqBJ3aS; 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 1puxkd-0003Kh-QN; Fri, 05 May 2023 11:53:43 -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 1puxkc-0003Ip-Pn for qemu-devel@nongnu.org; Fri, 05 May 2023 11:53:42 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1puxka-0008D0-Cg for qemu-devel@nongnu.org; Fri, 05 May 2023 11:53:41 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-2fc3f1d6f8cso1328984f8f.3 for ; Fri, 05 May 2023 08:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683302018; x=1685894018; 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=PwmylO98fPza1KeBnyuNGb07zbktOjohayPxUd8NRjw=; b=kMqBJ3aSoK2JxBpKeOyv8zl5TZ/s89D8yIWkyV/7Gj8Joy8/7udTywJ/6BuoOtplBE fBh6sFwLEHIASImZpRW/WGILjtDdAJIsN4+Htv8UMDAcubxZavlDAQ4EK9gOr9mbUu4+ OsihSwDk1TiOaTEJhK6uy9yH5nGqmTGPlC7i+ugvDSCJ5ePhZQ3HtupqsAph2/CB2Fsg bx4XakNzfv3I8kt7lXWPHNctkW6IR5kaFnc+FLmjxJyKvHzF6W0tMT8IJdCGIYWtPtEz +sXmV2fAoDpMZI52lA8KEHSlTR7mqIkytAgEJ73NEBosuZyF99mNfpF+HqvYn+KTBDKo Jb/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683302018; x=1685894018; 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=PwmylO98fPza1KeBnyuNGb07zbktOjohayPxUd8NRjw=; b=RkpTY7Rs7oT8iDsxX+Si/6eZJ7+4emM06QXyZoAPNxLrMrX5Bv47IXGNeiJZfzwZBd xj7RAy2+jKh2RnDlZY4kt/LBP1CiBOsnOTNoTHg5NZrdvlHBceaoLydubABe1SXxbVA4 9kx04NuxZ27X9n9t5FV2KEeBxqi1wvaO04AJ+zeVfvjfuMAr7zlzSJ0WzFRbu7RgyjKX sXnMgd7nS+DI6faOY0iYpeD/k19C+3O0WoIUYdJESUaYujC9dy6K2ovR+eGIbcNXbSl5 IzLmrYW4dswHtzsWUWEPHK/GN33kOViZHuPAasqhVCuxdeoe3MUkEpttGLNtDRgX2vVC p5Fg== X-Gm-Message-State: AC+VfDz9Cfkdz5WkG5k5w0Kj15d1vOjCf+dQzicx6CIFTZgbD/TAw7Ki VGd3Ujv9a26WwsAhgrDXbLg+Eg== X-Received: by 2002:adf:df0c:0:b0:307:5912:789 with SMTP id y12-20020adfdf0c000000b0030759120789mr1662967wrl.66.1683302018030; Fri, 05 May 2023 08:53:38 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id x7-20020adfffc7000000b002c7066a6f77sm2785851wrs.31.2023.05.05.08.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 08:53:37 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A5A211FFBC; Fri, 5 May 2023 16:53:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Christian Schoenebeck , Michael Roth , Eric Blake , Paolo Bonzini , Greg Kurz , Eduardo Habkost , Yanan Wang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Kyle Evans , Warner Losh , Richard Henderson , Markus Armbruster , Riku Voipio , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 01/10] *-user: remove the guest_user_syscall tracepoints Date: Fri, 5 May 2023 16:53:27 +0100 Message-Id: <20230505155336.137393-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230505155336.137393-1-alex.bennee@linaro.org> References: <20230505155336.137393-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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 Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230503091756.1453057-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