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 From patchwork Thu Apr 20 15:00:01 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: 675620 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp363828wrs; Thu, 20 Apr 2023 08:00:49 -0700 (PDT) X-Google-Smtp-Source: AKy350YlkWbcbvYPw75g0ovFCArH6KFoYgqkf1V7auyCR7DJcug2OzCahGj7o59OjJZwFxytiiba X-Received: by 2002:a1f:4f47:0:b0:43f:ec5d:51e1 with SMTP id d68-20020a1f4f47000000b0043fec5d51e1mr865679vkb.9.1682002849037; Thu, 20 Apr 2023 08:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002849; cv=none; d=google.com; s=arc-20160816; b=KBTVlE4nqQNOv/a+AGYlVKWDPK6WHwMSgVbhZ9xusE2yY0Ld8Q6LGN3cyVW5GE/S3/ gs/P3pbUC2O41pI/SltjJtknB1MNfCP6OHWR8FR7zp+AabIIHdnL8krYDY/jNbj+V75s 13Nv9gCJQqEhHYnmEn32sP3JRpoCcLZ9QBH4CzHGwbHZQ5T9R7tmj2u7XpbwrHZv9CU8 Dop/WMqIsW/bCXRviE05rs52ve0wbw1kZ7cn6XW98FiaTtGgZCOPw5f0EXw4ZqXxIjgw BK1DhFABkGV9WjuqRgI+o2XXkI9sjzgJU3tkJ0yCN9VqLtNZnazsKbQCGo/pNGyfQZRc VXTg== 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=BaYFv/GATacnspxitZxXqy32DjO2LBrHottpHojCTUU=; b=mlegy0yzWCpya+GtW3Ra5EptutT18y14cLCbEhuemiFUsXIeSuh/izcOkDswpJPFdP XuXHD5leVtb/sJmplv3xP/yfI5vtjK9K3cVi12Pmdpkv7whOwv0bSEMcfGThTMQzXhNn GMb9eZ1KKy+hrNk8mrJJw+bnw5/SOeQBjNV1JGg3uY1ycrahlNyhOHMr0797DxZ4c8dy n19ofLCaxu81HL6XlK/UqsYHe+eWAf0636JvEOjkC/DxUFGLUwWYDqO5LVk2fiba82jp xBwyMemFVP2w3Y9/6iR0hBYZipt8qLi8g3mcSZ8EB90J0wE3d6Le4XdAsh+5Lkgb4nz8 HJjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fab1SFaK; 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 n8-20020a1f7208000000b004406663e3edsi508605vkc.94.2023.04.20.08.00.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:00:49 -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=fab1SFaK; 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 1ppVlq-0003kR-WC; Thu, 20 Apr 2023 11:00:27 -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 1ppVlk-0003dB-6r for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:21 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVle-00046H-4s for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:19 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f0a80b686eso5049405e9.1 for ; Thu, 20 Apr 2023 08:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002813; x=1684594813; 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=BaYFv/GATacnspxitZxXqy32DjO2LBrHottpHojCTUU=; b=fab1SFaKzW2HOaakn+2mXg5jcNE5tsUQ//PQY+SBl3xlP5qFyr5sYDhh5+5q/I926A ArZL0sR+CrrwKb4pT6nXc9ojPszq0sSVe7I0HtFEevTpGp+Lc9o3Kgisfsl/DtUrP05p SuKmfrcj1hyCAP5yUyyu4k3YCpaMLn2lKyRhgTSZXcUHYSnUDZPFugQF+bNOp1sbn+NG OgHrvC5KtJR0/rjJrZjAQ1AaFkZOQcWUFnzCDJurEvVV5++w2uGM5aFvbjnF/uN5Frh+ hLtqd5FZmqPJ5hikvt3L2sU2QJ8qe3yej+DWdJgvAoHHl97jXXnNcx7kBjW9v/eczDVD z6sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002813; x=1684594813; 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=BaYFv/GATacnspxitZxXqy32DjO2LBrHottpHojCTUU=; b=GuCoX2g+OiO8aVTYa7zKY4Ovcs6M6Vnkju6ToAxZcJTfB3PcMx9xxZEyhz5Za2fc87 wlRL5qhGWtOitRLM3ZnR2jjLwvl0ouvkS62Hxox2L8AlqhCzilR/hUsFd6TSOPU6WEUe 3Tntrsz/goWbvSEv3A838rjFfeOITZzAM2O2EwpFQ5sQxtsPyvzWaWr75sn4PUwNJvBI cLmrf34/lholocbtpzjksuZ2jzgPIB7TRIA6RerYsCj5kb4WgxSZswmYLTFmf8K78TUE GDtwOIkj/3WninBD/BwagU85CqLUD+HegXZrNQN+YTxVhrflLgDkoAQ+wEPOt/sFaVv+ cvbA== X-Gm-Message-State: AAQBX9dMMLXcVtFoYNiV5LCxxFx/2tKWFKY1ukV8h71SFiRV+PWInchB Yw2OI446KsFrEj8JZ4IYThS98Q== X-Received: by 2002:a5d:4488:0:b0:2ee:e47e:9014 with SMTP id j8-20020a5d4488000000b002eee47e9014mr1639487wrq.1.1682002812695; Thu, 20 Apr 2023 08:00:12 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m7-20020adfe947000000b003011baf89b3sm2176230wrn.40.2023.04.20.08.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:11 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2E8431FFBA; 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 02/10] trace-events: remove the remaining vcpu trace events Date: Thu, 20 Apr 2023 16:00:01 +0100 Message-Id: <20230420150009.1675181-3-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::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=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 While these are all in helper functions being designated vcpu events complicates the removal of the dynamic vcpu state code. TCG plugins allow you to instrument vcpu_[init|exit|idle]. Signed-off-by: Alex Bennée --- hw/core/cpu-common.c | 2 -- trace/control-target.c | 1 - trace/control.c | 2 -- trace-events | 31 ------------------------------- 4 files changed, 36 deletions(-) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 5ccc3837b6..8373a500d2 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -112,8 +112,6 @@ void cpu_dump_state(CPUState *cpu, FILE *f, int flags) void cpu_reset(CPUState *cpu) { device_cold_reset(DEVICE(cpu)); - - trace_guest_cpu_reset(cpu); } static void cpu_common_reset_hold(Object *obj) diff --git a/trace/control-target.c b/trace/control-target.c index 232c97a4a1..c6132f243f 100644 --- a/trace/control-target.c +++ b/trace/control-target.c @@ -145,5 +145,4 @@ void trace_init_vcpu(CPUState *vcpu) } } } - trace_guest_cpu_enter(vcpu); } diff --git a/trace/control.c b/trace/control.c index 6c77cc6318..d24af91004 100644 --- a/trace/control.c +++ b/trace/control.c @@ -277,8 +277,6 @@ void trace_fini_vcpu(CPUState *vcpu) TraceEventIter iter; TraceEvent *ev; - trace_guest_cpu_exit(vcpu); - trace_event_iter_init_all(&iter); while ((ev = trace_event_iter_next(&iter)) != NULL) { if (trace_event_is_vcpu(ev) && diff --git a/trace-events b/trace-events index 691c3533e4..dd318ed1af 100644 --- a/trace-events +++ b/trace-events @@ -54,34 +54,3 @@ qmp_job_resume(void *job) "job %p" qmp_job_complete(void *job) "job %p" qmp_job_finalize(void *job) "job %p" qmp_job_dismiss(void *job) "job %p" - - -### Guest events, keep at bottom - - -## vCPU - -# trace/control-target.c - -# Hot-plug a new virtual (guest) CPU -# -# Mode: user, softmmu -# Targets: all -vcpu guest_cpu_enter(void) - -# trace/control.c - -# Hot-unplug a virtual (guest) CPU -# -# Mode: user, softmmu -# Targets: all -vcpu guest_cpu_exit(void) - -# hw/core/cpu.c - -# Reset the state of a virtual (guest) CPU -# -# Mode: user, softmmu -# Targets: all -vcpu guest_cpu_reset(void) - From patchwork Thu Apr 20 15:00:02 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: 675621 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp364078wrs; Thu, 20 Apr 2023 08:01:08 -0700 (PDT) X-Google-Smtp-Source: AKy350YbwD0857b+oaATilvF/F24baC38/mY4hDQWHcmfxpUdqI5lO6n6al7Xv+o7A4SXtRVqEtr X-Received: by 2002:a67:fe8a:0:b0:42e:2b9f:f8f0 with SMTP id b10-20020a67fe8a000000b0042e2b9ff8f0mr997784vsr.30.1682002867272; Thu, 20 Apr 2023 08:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002867; cv=none; d=google.com; s=arc-20160816; b=HFMb1dcnTQB9oqbJ52ZGJH75wv+Y2BgAmH/mlR8JjI+Wz2+dklgK63lHJUsiC6ov6f KkJqMklSkQjUf3dbMxAeNlcidkVGOVVuk8KVKD16RlYQUlyiJY0VN7afgCRgJbmDmefm 8THMEu0TikvTPJBGTjKaWpxSU5JVSFrQVRv7KPg9wrWgayqDfGUExFK2RU1h59U6eUhE Wc6ebsSQr3gA5os2fuPJtDNCbF26SuhV1esMeAsxWbqbUyKSOSMOkLLBb4RLCn9Dc/Wl csWveh4XG1Gu0gc8Rq49oMhmvhaesnBfrPJtOO+3+P3m6AwkhnUye3cSMf0oREo+hdWm OqMw== 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=BfqPP/aIIIJD+g7lcqooxH2SGvq/IoBd6dFlJw1/MhY=; b=In36X0viI/wwJY7Aqh9002e1KEH03Z0O8h/9prMbHQ1qJK0sCz6RNRRQ3nFuE7DVm8 6Cls9llCgOhZYT/nvYui1m2DAiKKP8INUwBg6LPxICX60GbCWWEl9yBIr3zOfJyrx9Sx KxZ5UBtAeAi6AEXIlPINJTCwQeFj+f/PJ9HrYDXTrIyyeLb23o/fCxKSGomU2iWU34xs 0+nfAPI/zh1P3yau74yWhnLfIi1u6fXOT6AXpQNNUKV3RAbFLpRLIMGKwUF2Mz+QSdoT AYpYM1M6FWp+JRhi8CY/RP0oXV0ZogcIDF5StJaM1rylk4Hax0tFC+FAUXAVwNcV6gbB ONMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M5agqMM9; 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 dc40-20020a05610255a800b0042678565f0dsi502143vsb.811.2023.04.20.08.01.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:01:07 -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=M5agqMM9; 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 1ppVlj-0003an-Rl; Thu, 20 Apr 2023 11:00:21 -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 1ppVlf-0003aK-2V for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:15 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVld-00045m-1K for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:14 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f17edbc15eso7191255e9.3 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=BfqPP/aIIIJD+g7lcqooxH2SGvq/IoBd6dFlJw1/MhY=; b=M5agqMM9+FEqotz3oloW5qYAjjEGS9SWvBTkrY3sHeiEOXU4cbiEXPO6mRHjOREpT4 jMSxeKw2Z1HU0pcSGrdbsJ+6glOJz17kDVxCL27BNxtQS/TsMfbE3CDQpjKq5NvHvJin t4+AuiAR7nim+wgNOcve0omTifomQ9j8C4yZ21NPvd0S4tv114QVeswAA+Q3EmyT2Ccs /f53PzQ8gNOYuwHKFxx6RLjQlz8U7UhKopFx+m2+T5wo3ZGOsVPPPk3RMZH+nBiiUbaH Ab514jrjM3MyCjxS9UyFX1CPo9TKunkEiTlXaKd4mKx82orWv6RZbLnZvTc33z+0LaLO c6YA== 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=BfqPP/aIIIJD+g7lcqooxH2SGvq/IoBd6dFlJw1/MhY=; b=N7/9EaStXoGn88LXr+gB64I3SrTxdtxDJzpwxt8Z8pOu36+fqis4ELfG6kQJmcaH9r iVm6TTSFb3ODA7X9oo0LcNfJkIwaIirNCg4UFBsAUWRS4SF81ukHJAIo9uiujBEhGeRN fn6aIGEpw5CEvMK7y5yLkO29YsJjOyyMEVjnUBoH1EilFYZKlSnuJKF+RzCfKfinKidB dsW1/8Yum5mGBXb2zb9sJwHZsb6T/ADqXJU/iakTMo/dSk+t+cQAAJi6I2M1soEpMAOY dTv9Bcw0AXieYJXbPCfbNeXuQCpNw1mcvpLbvmhUxSerYi5ijEh9zqoqgTB/8FQu4ECR zkPQ== X-Gm-Message-State: AAQBX9fflTqaIybHLG3fEX5p2soJGew8dl8aEiuJtmsugiWEBhQ5VwwP hDFnJEnuI4O+QiJYuzBmbrQr5Q== X-Received: by 2002:a5d:4c49:0:b0:2fb:f93f:b96 with SMTP id n9-20020a5d4c49000000b002fbf93f0b96mr1616098wrt.31.1682002811369; Thu, 20 Apr 2023 08:00:11 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 21-20020a05600c22d500b003f17131952fsm2271778wmg.29.2023.04.20.08.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:11 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 51B5D1FFBB; 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 03/10] trace: remove vcpu_id from the TraceEvent structure Date: Thu, 20 Apr 2023 16:00:02 +0100 Message-Id: <20230420150009.1675181-4-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::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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 does involve temporarily stubbing out some helper functions before we excise the rest of the code. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- trace/control-internal.h | 4 ++-- trace/event-internal.h | 2 -- trace/control.c | 10 ---------- scripts/tracetool/format/c.py | 6 ------ scripts/tracetool/format/h.py | 11 +---------- 5 files changed, 3 insertions(+), 30 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index 8b2b50a7cf..0178121720 100644 --- a/trace/control-internal.h +++ b/trace/control-internal.h @@ -27,12 +27,12 @@ static inline uint32_t trace_event_get_id(TraceEvent *ev) static inline uint32_t trace_event_get_vcpu_id(TraceEvent *ev) { - return ev->vcpu_id; + return 0; } static inline bool trace_event_is_vcpu(TraceEvent *ev) { - return ev->vcpu_id != TRACE_VCPU_EVENT_NONE; + return false; } static inline const char * trace_event_get_name(TraceEvent *ev) diff --git a/trace/event-internal.h b/trace/event-internal.h index f63500b37e..0c24e01b52 100644 --- a/trace/event-internal.h +++ b/trace/event-internal.h @@ -19,7 +19,6 @@ /** * TraceEvent: * @id: Unique event identifier. - * @vcpu_id: Unique per-vCPU event identifier. * @name: Event name. * @sstate: Static tracing state. * @dstate: Dynamic tracing state @@ -33,7 +32,6 @@ */ typedef struct TraceEvent { uint32_t id; - uint32_t vcpu_id; const char * name; const bool sstate; uint16_t *dstate; diff --git a/trace/control.c b/trace/control.c index d24af91004..5dfb609954 100644 --- a/trace/control.c +++ b/trace/control.c @@ -68,16 +68,6 @@ void trace_event_register_group(TraceEvent **events) size_t i; for (i = 0; events[i] != NULL; i++) { events[i]->id = next_id++; - if (events[i]->vcpu_id == TRACE_VCPU_EVENT_NONE) { - continue; - } - - if (likely(next_vcpu_id < CPU_TRACE_DSTATE_MAX_EVENTS)) { - events[i]->vcpu_id = next_vcpu_id++; - } else { - warn_report("too many vcpu trace events; dropping '%s'", - events[i]->name); - } } event_groups = g_renew(TraceEventGroup, event_groups, nevent_groups + 1); event_groups[nevent_groups].events = events; diff --git a/scripts/tracetool/format/c.py b/scripts/tracetool/format/c.py index c390c1844a..69edf0d588 100644 --- a/scripts/tracetool/format/c.py +++ b/scripts/tracetool/format/c.py @@ -32,19 +32,13 @@ def generate(events, backend, group): out('uint16_t %s;' % e.api(e.QEMU_DSTATE)) for e in events: - if "vcpu" in e.properties: - vcpu_id = 0 - else: - vcpu_id = "TRACE_VCPU_EVENT_NONE" out('TraceEvent %(event)s = {', ' .id = 0,', - ' .vcpu_id = %(vcpu_id)s,', ' .name = \"%(name)s\",', ' .sstate = %(sstate)s,', ' .dstate = &%(dstate)s ', '};', event = e.api(e.QEMU_EVENT), - vcpu_id = vcpu_id, name = e.name, sstate = "TRACE_%s_ENABLED" % e.name.upper(), dstate = e.api(e.QEMU_DSTATE)) diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py index e94f0be7da..285d7b03a9 100644 --- a/scripts/tracetool/format/h.py +++ b/scripts/tracetool/format/h.py @@ -74,16 +74,7 @@ def generate(events, backend, group): out('}') - # tracer wrapper with checks (per-vCPU tracing) - if "vcpu" in e.properties: - trace_cpu = next(iter(e.args))[1] - cond = "trace_event_get_vcpu_state(%(cpu)s,"\ - " TRACE_%(id)s)"\ - % dict( - cpu=trace_cpu, - id=e.name.upper()) - else: - cond = "true" + cond = "true" out('', 'static inline void %(api)s(%(args)s)', From patchwork Thu Apr 20 15:00:03 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: 675625 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp364641wrs; Thu, 20 Apr 2023 08:01:48 -0700 (PDT) X-Google-Smtp-Source: AKy350Y6sTLA7FMTIH+X7iQwM617mr2pqkEysooz/AwyNgof0Kczk1gNpHgQG6buN9xVkpF1eA3y X-Received: by 2002:a67:f849:0:b0:426:b36f:b8c9 with SMTP id b9-20020a67f849000000b00426b36fb8c9mr1092562vsp.8.1682002908180; Thu, 20 Apr 2023 08:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002908; cv=none; d=google.com; s=arc-20160816; b=MbMXzCQALza6DOHz2Wfsd4geCdQProJdk6Ga0S7MJSv/vPqnTIc5UT9nryKnnEMYIt LpnIQR6bDfP1upNcDIbEAS9Heki2Mw1mDy2iKcdBc+G3JLQNh7TpsmjDG8hXDzlovoZk jIVjKi+epxigdAcLhMgKdVeDVksp7/7DYP7sftvuCyFxcM2VGHb9mVAXaheolmEWPGy8 LoClz84xl6ZVI1aViBXdL+i+KAOoetx8L6Z7njq/rDwas8vJGcx5Ulon4hv99dULmRVY RhLMDi8xNg6E1P/GonjRirZTnfiqlIjrKILaytfEiFztVZh+haq6hTc6KyQFD7zVgjKa tLCQ== 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=XyFxajlvcBm0zO8ecOyTw+g/FGP63C2N4hQK874T7uE=; b=NjVnLvnB4I823oF7ZYM0NHR3LhHSB63yY/1F3RHdXNzkoazqYdekP4KuaTqCXVVCVZ Zh8bIGvFuGyXtddScnsmnNDAL5dxBUf2J9BcrVG0TxyW29TUNvYg9qjiqbro0NHbb0+N wgJuH9DJQsL7jbmJDONV24eExuJO2HKoc7brDXXnYc80572jfVeCgHtPrthiWLqBm4BZ hvZcvZJ+vUjPza3bgKuos4VLxPkiiwckxmNyKkBKqQNVXnJCe3zP9T2kYrRM7MNuZfz5 1PhBG7oFXguPqavpbIr4Y+MKtErWQaVzFOrENhxZRxu7R7H/2028MXVSLxjyVNYIPTKz UoGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HTYs4vJS; 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 d18-20020a0561020d9200b0042c3a8ff16dsi487154vst.642.2023.04.20.08.01.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:01:48 -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=HTYs4vJS; 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 1ppVlq-0003iy-61; Thu, 20 Apr 2023 11:00:26 -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 1ppVli-0003am-O7 for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:19 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVlg-00046d-DF for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:18 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f09b9ac51dso21898195e9.0 for ; Thu, 20 Apr 2023 08:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002812; x=1684594812; 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=XyFxajlvcBm0zO8ecOyTw+g/FGP63C2N4hQK874T7uE=; b=HTYs4vJSqiZf24P3dYs9GLUX7rPDvrW5WPOqmxuqdPvG1fWKOrtAaxW5iPa7udORhs b9i5AjwGRydqtXyPWl9l1WyifmFPrE1TjXWuUekXG/SN8k/lsLQ5Uj5GcEUNUtVa9FW+ 0b80Zk0fBA+xDaqshTQPl1qF4IiqLtUXsrO4V53O6119qoWh1HLapzhtkRgyt2LuH3tE DdadlKzxFf6zVwSaYnm4y2xuq1F3vSsNQ/jO/RscfUNPcQiOe8Y/ge/BadjmQ/80jgi6 2OphhvqWEvbM6/ygjcgKCfq2zVJiae0zpWjXYEg8QDUd1MjW3nPN8caRKzFc2nbHovN9 cCrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002812; x=1684594812; 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=XyFxajlvcBm0zO8ecOyTw+g/FGP63C2N4hQK874T7uE=; b=V/3DRkYzwz5miUNH1tFq0B0/srA9NYJA5uEfTXqcGGCVBYeAz1msR4rDqCzyZ+A9o4 oMf0pY2unJYFVi7RNaRF4a+YkS1Z4QgFZJ9QmXYtabLyntKKTfOtdRYIt09sMI7QIfy3 2y1/LkhuzNWs6NPF/zJssURcVmvgIN/6ZcncpEx87eJPWzFEq9U5UdICPZJJWvxLi9rZ F3y0eg+U1UTK8HjneLgIOHi95m5R0K8+RZR9xEwUJ/iTl2CDDZiFyVu7FuvTQwl1QHYz eO9fsELiCpBrOaUibGwDU9k7CTcYxnKQnFm6utOYdYv7nH/jU/dTxuQeDMjIT3yxIKLe vPsw== X-Gm-Message-State: AAQBX9fSU651u0N8E/FcZUfzJBArfLuxxsqpy4wNEysispk6h3fJkikV YuTjthtay/ep7jk9Ciy9ha7hhQ== X-Received: by 2002:adf:ce86:0:b0:2f0:2c3c:b858 with SMTP id r6-20020adfce86000000b002f02c3cb858mr4582129wrn.31.1682002812460; Thu, 20 Apr 2023 08:00:12 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h18-20020a5d6892000000b002f9bfac5baesm2167452wru.47.2023.04.20.08.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:11 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6AAAB1FFBC; 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 04/10] scripts/qapi: document the tool that generated the file Date: Thu, 20 Apr 2023 16:00:03 +0100 Message-Id: <20230420150009.1675181-5-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::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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 makes it a little easier for developers to find where things where being generated. Signed-off-by: Alex Bennée --- scripts/qapi/gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index b5a8d03e8e..282f5091e3 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@ -161,7 +161,7 @@ def __init__(self, fname: str, blurb: str, pydoc: str): def _top(self) -> str: return mcgen(''' -/* AUTOMATICALLY GENERATED, DO NOT MODIFY */ +/* AUTOMATICALLY GENERATED by QAPIGenC, DO NOT MODIFY */ /* %(blurb)s @@ -194,7 +194,7 @@ def _bottom(self) -> str: class QAPIGenTrace(QAPIGen): def _top(self) -> str: - return super()._top() + '# AUTOMATICALLY GENERATED, DO NOT MODIFY\n\n' + return super()._top() + '# AUTOMATICALLY GENERATED by QAPIGenTrace, DO NOT MODIFY\n\n' @contextmanager From patchwork Thu Apr 20 15:00:04 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: 675624 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp364555wrs; Thu, 20 Apr 2023 08:01:42 -0700 (PDT) X-Google-Smtp-Source: AKy350aosGjjRXISvxnEfQ3e1dBaE78eiPdY5XwLT7Xjna0oegBvbkAzij9Q17GYYl5oFzyT5My7 X-Received: by 2002:a67:b448:0:b0:42e:6ad6:cf90 with SMTP id c8-20020a67b448000000b0042e6ad6cf90mr1207131vsm.27.1682002901864; Thu, 20 Apr 2023 08:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002901; cv=none; d=google.com; s=arc-20160816; b=iq0yjM9skGzK99EGT+cyMg17S21+STx3+vMaO15C0LuBm3n63nKwGILCIi6ZV6fvAy meGuJlIUejp3RS/NUKucIEv8HZFvUZ8jRveMSSS88DLWe6G5hbu3dUPeY3XUtSXf+VP+ 30Of2xubxLrXK2jFMU4WDNQPEbs/4au3U1e9XLn0cEu64w808Msg+V6f6tqHm9p5OLVx I2ffOpqqUdVVbj+T2snrJl+Yx23ApG1TIU64Ocpdnw4I/ZJjAsLxZmWlVuxs2SJz1wPU UApT/08GXKuNG7SnViHF7SiKhWFrAN5XtN72Tob5ooMhhPxyjVgix2+9ZW53OzKVTu8q kFiQ== 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=7c0u+6tu/GA25VLPoFXf3gYwuh1yw4lMCNZi+OT6T50=; b=zmfK+GgOSRzgDIZaQwVKqH0n5zP01pV82M8tlOn4A0qnNK+pXWjIl3/jhzk98XO1IX OCfDNk0EvOKnifapruQd1arTXK81NtEWVg+6rtFHin9k1gIKyIXyMsSQrEYk9oSLaum3 NcJjP8Tq4mp00uWxDjpFn2V8wuvOEMo+IjAfd+oaeGiLlQkeq3DLfQY/W3a0IX8iCed6 j0v3+VbPLasBJdM0lBz9G/mD8qF9yQwMlroIzld7el8woEP8qy+xpW5xG81/Ys0KLlvA WIgA382Y7AfUgduekiQ/C85kq5tH0u2H75COtsc8sY91VPoFa55jDR87HknUJckojRsS 0xLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jlfv/8yK"; 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 i19-20020a0561020a5300b004300aa3e069si467736vss.825.2023.04.20.08.01.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:01:41 -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="Jlfv/8yK"; 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 1ppVlv-0003t4-1h; Thu, 20 Apr 2023 11:00:31 -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 1ppVlt-0003rY-MW for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:29 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVle-00046f-SL for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:29 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-2f7a7f9667bso432212f8f.1 for ; Thu, 20 Apr 2023 08:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002813; x=1684594813; 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=7c0u+6tu/GA25VLPoFXf3gYwuh1yw4lMCNZi+OT6T50=; b=Jlfv/8yKBbDTOyaR/7kh9FT64Lzji0y07XTUMtLuH5raeSVVEi/Uf1lE5Sy1YkSIoR OHrtkxuOi/qtlpN5q8vv2vyjWAMbWAL59GmdmAskqTtjbz8mrvaGtdbmfrskUiGSj7hD iREMFoWA8gr/Cga8ipE7xKLQK3TY1nx5f3Uwn9IW5v1xHhj1CLoZABHS+M0e50fojOAb Py8yPYgo7LlQm9vXxfP9Pl7PvaDvTASQxeS5CY0tTq+4NpliZnTvEhfc/0+cklg+AjTk M8+tntnj3P3If/crMUvSiIsW5VwRhJjuY7BR6eXAzY0ZJv0unbEVMG4CPxpB4aWCKgjl U0nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002813; x=1684594813; 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=7c0u+6tu/GA25VLPoFXf3gYwuh1yw4lMCNZi+OT6T50=; b=YHlIt5LLilSnfq26NpyoogW5sDLMGd3VGV1JQ3LmSpmiXC2RjKSB25f0qtovoLgk88 EVR8NOcJmcTQRKfuG3k2xrVokTIQbpx1uaf4rwCoFy8/2LJzD8xavR1Uk+qOkCYh06JG 0mGFDiDWNVK5BYnxUamYm8f/97+7tCXidFDdlJPq0gqiSmFBr56NcDGrKmF6oBwdc1xO iLrtgg56fcGno/1CV76VwcCOmkpC+ZjHkykK/xVvXHUp46cHbkQUS52Mc4CxUyvSciJA Q2ODH5LNWZGGGkopPa0eQzf7aC96Sspkv3d4/z20H2GW6i44gNvgePzS3bNc6XH+MtNi EEvQ== X-Gm-Message-State: AAQBX9fDar8eXJqkvA7f1+jfwluSVus7jFo9K88Fk6WHmEbwIij2F2Ye axlTPZvvsbq2E+bUqjg1hTHMLw== X-Received: by 2002:a5d:5442:0:b0:2f5:930:39b1 with SMTP id w2-20020a5d5442000000b002f5093039b1mr1546684wrv.38.1682002813492; Thu, 20 Apr 2023 08:00:13 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id q13-20020adfcd8d000000b002d7a75a2c20sm2110041wrj.80.2023.04.20.08.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 82D7B1FFBD; 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 05/10] qapi: make the vcpu parameters deprecated for 8.1 Date: Thu, 20 Apr 2023 16:00:04 +0100 Message-Id: <20230420150009.1675181-6-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::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.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, 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 I don't think I can remove the parameters directly but certainly mark them as deprecated. Signed-off-by: Alex Bennée --- qapi/trace.json | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/qapi/trace.json b/qapi/trace.json index 6c6982a587..74dd66ef4a 100644 --- a/qapi/trace.json +++ b/qapi/trace.json @@ -33,9 +33,9 @@ # # @name: Event name. # @state: Tracing state. -# @vcpu: Whether this is a per-vCPU event (since 2.7). +# @vcpu: Whether this is a per-vCPU event (deprecated since 8.1). # -# An event is per-vCPU if it has the "vcpu" property in the "trace-events" +# There are no longer any events with the "vcpu" property in the "trace-events" # files. # # Since: 2.2 @@ -49,19 +49,15 @@ # Query the state of events. # # @name: Event name pattern (case-sensitive glob). -# @vcpu: The vCPU to query (any by default; since 2.7). +# @vcpu: The vCPU to query (deprecated since 8.1). # # Returns: a list of @TraceEventInfo for the matching events # # An event is returned if: # # - its name matches the @name pattern, and -# - if @vcpu is given, the event has the "vcpu" property. # -# Therefore, if @vcpu is given, the operation will only match per-vCPU events, -# returning their state on the specified vCPU. Special case: if @name is an -# exact match, @vcpu is given and the event does not have the "vcpu" property, -# an error is returned. +# There are no longer any per-vCPU events # # Since: 2.2 # @@ -84,16 +80,12 @@ # @name: Event name pattern (case-sensitive glob). # @enable: Whether to enable tracing. # @ignore-unavailable: Do not match unavailable events with @name. -# @vcpu: The vCPU to act upon (all by default; since 2.7). +# @vcpu: The vCPU to act upon (deprecated since 8.1). # # An event's state is modified if: -# - its name matches the @name pattern, and -# - if @vcpu is given, the event has the "vcpu" property. +# - its name matches the @name pattern # -# Therefore, if @vcpu is given, the operation will only match per-vCPU events, -# setting their state on the specified vCPU. Special case: if @name is an exact -# match, @vcpu is given and the event does not have the "vcpu" property, an -# error is returned. +# There are no longer and per-vCPU events so specifying it will never match. # # Since: 2.2 # From patchwork Thu Apr 20 15:00:05 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: 675626 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp364688wrs; Thu, 20 Apr 2023 08:01:51 -0700 (PDT) X-Google-Smtp-Source: AKy350b1iEAg4wZrDVIN63+hHE7nAzRZwjI6GQmmshf5RkdtuunkHCpyJC8ygRC1GjBkYvYVWVMD X-Received: by 2002:a05:622a:101:b0:3e4:e8be:c3a4 with SMTP id u1-20020a05622a010100b003e4e8bec3a4mr2687635qtw.56.1682002911269; Thu, 20 Apr 2023 08:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002911; cv=none; d=google.com; s=arc-20160816; b=fSe7lVT/IRU8fvSmMEnhVRi3B9KD7hdr5SQDHLfJU0ZUTMzJTozUffGL1uSSKKCphF Fs7fum+LZwJj/j+zh5CyHjVNWOk669jYQct3hQQIVZdIeGICKke3Qk/J+N4215VnV1KO DfN4sowVswObmCwvuPQMkgkowJUXZSQ7SzQnqri8oduSMuCCrnbQ/1IOCCkq53tCKkBT LAKNKQHBbUZpE8YGgbdE8QHp0j13vetpp8NKHK1zx4gvjDmTVA01Hx1flY9DUh8AvH02 hznHsc3G8yjYcK3ovn8tKH4cM/mWUrY6JWTIEjEAn7zbFSSjVPh9QqCdlLWyeM0YXsKj 5etQ== 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=nPbZSn5MhbbvzUtk/hZvGFSfCbaky9sMlqfgM1W+OWw=; b=rEVJvacj5pn9pEDDeoSXdo3hYJOYF04XvFRCxFsI1TdFVmZv6Bj4AY12wuzeIRztZk TrbhZEoKgzqbABAhN45jSQKRWdGrTWvcF1pOJ8xpcdhVFBc9lBJyuFCe2/VVCjfMxaeR kr/wYXT+DCGoj5a8iqk6pqmjWPHdsqF3B+YU8qFnmxpdrxg8vh6Vh1GBwz1Y3uWegY5w 4J08DsCPdpTouuL7hTTN+8dUbuZquNqjWrF5Ebo+C2NF54e7gVS6pNK2N7x5wbKDnJX3 WnwpGj4M6iUPdOvu0CfBYR5V0sGSJlFtaUL1AhPqib+XGaQYjQL7nU2qiTDbid1K1Xjw 42lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RtxPv6Ts; 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 o5-20020ac85a45000000b003ef57c10af2si583073qta.133.2023.04.20.08.01.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:01:51 -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=RtxPv6Ts; 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 1ppVlw-0003tC-6D; Thu, 20 Apr 2023 11:00:32 -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 1ppVll-0003iY-W9 for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:23 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVlh-00047k-N8 for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:21 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-2fa47de5b04so661570f8f.1 for ; Thu, 20 Apr 2023 08:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002815; x=1684594815; 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=nPbZSn5MhbbvzUtk/hZvGFSfCbaky9sMlqfgM1W+OWw=; b=RtxPv6TsKuplhJN+z4xdmvasjsprv1RfJ44lvRIQE7ogOokAXfm5T14bW3Q1EYbZ8G huqEd69aUFF+T81o6OtCasCeE7emrCyg1CQI4y1VulZon3nOEo01tPFiyILDRCjQPIgS qpY9UP2lB67kJ5QHA2o0XUCl4DzSAKEFZ/AVkN7+/3Z9FHUwUc+bu0MpURO/01Wpbuu6 OuzJ/4b10sp7n/t1Tq7I7A2jWgBs856415+77+QfLpWszuxSx9Swx5ci3w9V68QlISBB c4VP0g+Uo8bd3attwSP3vtN72M9IIYoY1U5nB2qecLLhiPGZuYg+2xUgtwkTIl5pYchZ nLNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002815; x=1684594815; 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=nPbZSn5MhbbvzUtk/hZvGFSfCbaky9sMlqfgM1W+OWw=; b=FiGDhHDmOxrlTVVO5Mx8YFnXSFI85XjHDIaKH5BbjrEXJ70RSCWahMwITPNGxFBnUT 5skCx9G+as6/4DxdcsxkYFx5O5utBgY6/COwzsYVPULI/zbFbywu4SiTV4Rf0mGQn1c/ Mzor5+86TT/mnQbiL3eDEAaR+QMWupkd2PznTmL3a/QiajGAu3N+3EFxwP83AlNel7Ys gjzfazUjYhBvWyvYjfuFsr+zm9rqu1l7pCQms7IuPMajhnn58SQpDXokdkgyo0xztEtJ NPqBcdfpRYXHeWinzvBpj/je+iVNx7h/XFjg5JqWb1Fjwvea1PYEtGoZuaAqwU3RRFer /gTw== X-Gm-Message-State: AAQBX9dE5Stsaccce1qfvzY/OFu5wSZbw+hQUi73+D48gWns9N95e5d0 5yrnSFZ7buA9EDeGb0GjkXAG7g== X-Received: by 2002:adf:f1d2:0:b0:2e8:b9bb:f969 with SMTP id z18-20020adff1d2000000b002e8b9bbf969mr1514604wro.0.1682002815198; Thu, 20 Apr 2023 08:00:15 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i1-20020a05600011c100b002cff06039d7sm2155643wrx.39.2023.04.20.08.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:13 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B7BA51FFBE; 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 06/10] trace: remove code that depends on setting vcpu Date: Thu, 20 Apr 2023 16:00:05 +0100 Message-Id: <20230420150009.1675181-7-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::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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 Now we no longer have any events that are for vcpus we can start excising the code from the trace control. As the vcpu parameter is encoded as part of QMP we just stub out the has_vcpu/vcpu parameters rather than alter the API. Signed-off-by: Alex Bennée --- trace/control-internal.h | 10 ---- trace/control-vcpu.h | 16 ------ trace/control.h | 48 ----------------- hw/core/cpu-common.c | 2 - stubs/trace-control.c | 13 ----- trace/control-target.c | 110 ++++----------------------------------- trace/control.c | 16 ------ trace/qmp.c | 74 +++----------------------- trace/trace-hmp-cmds.c | 17 +----- 9 files changed, 19 insertions(+), 287 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index 0178121720..8d818d359b 100644 --- a/trace/control-internal.h +++ b/trace/control-internal.h @@ -25,16 +25,6 @@ static inline uint32_t trace_event_get_id(TraceEvent *ev) return ev->id; } -static inline uint32_t trace_event_get_vcpu_id(TraceEvent *ev) -{ - return 0; -} - -static inline bool trace_event_is_vcpu(TraceEvent *ev) -{ - return false; -} - static inline const char * trace_event_get_name(TraceEvent *ev) { assert(ev != NULL); diff --git a/trace/control-vcpu.h b/trace/control-vcpu.h index 0f98ebe7b5..800fc5a219 100644 --- a/trace/control-vcpu.h +++ b/trace/control-vcpu.h @@ -30,13 +30,6 @@ trace_event_get_vcpu_state_dynamic_by_vcpu_id( \ vcpu, _ ## id ## _EVENT.vcpu_id)) -/** - * trace_event_get_vcpu_state_dynamic: - * - * Get the dynamic tracing state of an event for the given vCPU. - */ -static bool trace_event_get_vcpu_state_dynamic(CPUState *vcpu, TraceEvent *ev); - #include "control-internal.h" static inline bool @@ -51,13 +44,4 @@ trace_event_get_vcpu_state_dynamic_by_vcpu_id(CPUState *vcpu, } } -static inline bool trace_event_get_vcpu_state_dynamic(CPUState *vcpu, - TraceEvent *ev) -{ - uint32_t vcpu_id; - assert(trace_event_is_vcpu(ev)); - vcpu_id = trace_event_get_vcpu_id(ev); - return trace_event_get_vcpu_state_dynamic_by_vcpu_id(vcpu, vcpu_id); -} - #endif diff --git a/trace/control.h b/trace/control.h index 23b8393b29..dfd209edd8 100644 --- a/trace/control.h +++ b/trace/control.h @@ -89,23 +89,6 @@ static bool trace_event_is_pattern(const char *str); */ static uint32_t trace_event_get_id(TraceEvent *ev); -/** - * trace_event_get_vcpu_id: - * - * Get the per-vCPU identifier of an event. - * - * Special value #TRACE_VCPU_EVENT_NONE means the event is not vCPU-specific - * (does not have the "vcpu" property). - */ -static uint32_t trace_event_get_vcpu_id(TraceEvent *ev); - -/** - * trace_event_is_vcpu: - * - * Whether this is a per-vCPU event. - */ -static bool trace_event_is_vcpu(TraceEvent *ev); - /** * trace_event_get_name: * @@ -172,21 +155,6 @@ static bool trace_event_get_state_dynamic(TraceEvent *ev); */ void trace_event_set_state_dynamic(TraceEvent *ev, bool state); -/** - * trace_event_set_vcpu_state_dynamic: - * - * Set the dynamic tracing state of an event for the given vCPU. - * - * Pre-condition: trace_event_get_vcpu_state_static(ev) == true - * - * Note: Changes for execution-time events with the 'tcg' property will not be - * propagated until the next TB is executed (iff executing in TCG mode). - */ -void trace_event_set_vcpu_state_dynamic(CPUState *vcpu, - TraceEvent *ev, bool state); - - - /** * trace_init_backends: * @@ -205,22 +173,6 @@ bool trace_init_backends(void); */ void trace_init_file(void); -/** - * trace_init_vcpu: - * @vcpu: Added vCPU. - * - * Set initial dynamic event state for a hot-plugged vCPU. - */ -void trace_init_vcpu(CPUState *vcpu); - -/** - * trace_fini_vcpu: - * @vcpu: Removed vCPU. - * - * Disable dynamic event state for a hot-unplugged vCPU. - */ -void trace_fini_vcpu(CPUState *vcpu); - /** * trace_list_events: * @f: Where to send output. diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 8373a500d2..1ca48a15f6 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -209,7 +209,6 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp) } /* NOTE: latest generic point where the cpu is fully realized */ - trace_init_vcpu(cpu); } static void cpu_common_unrealizefn(DeviceState *dev) @@ -217,7 +216,6 @@ static void cpu_common_unrealizefn(DeviceState *dev) CPUState *cpu = CPU(dev); /* NOTE: latest generic point before the cpu is fully unrealized */ - trace_fini_vcpu(cpu); cpu_exec_unrealizefn(cpu); } diff --git a/stubs/trace-control.c b/stubs/trace-control.c index 7f856e5c24..b428f34c87 100644 --- a/stubs/trace-control.c +++ b/stubs/trace-control.c @@ -36,16 +36,3 @@ void trace_event_set_state_dynamic(TraceEvent *ev, bool state) } } } - -void trace_event_set_vcpu_state_dynamic(CPUState *vcpu, - TraceEvent *ev, bool state) -{ - /* should never be called on non-target binaries */ - abort(); -} - -void trace_init_vcpu(CPUState *vcpu) -{ - /* should never be called on non-target binaries */ - abort(); -} diff --git a/trace/control-target.c b/trace/control-target.c index c6132f243f..1ae582af17 100644 --- a/trace/control-target.c +++ b/trace/control-target.c @@ -35,114 +35,22 @@ void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state) void trace_event_set_state_dynamic(TraceEvent *ev, bool state) { - CPUState *vcpu; assert(trace_event_get_state_static(ev)); - if (trace_event_is_vcpu(ev) && likely(first_cpu != NULL)) { - CPU_FOREACH(vcpu) { - trace_event_set_vcpu_state_dynamic(vcpu, ev, state); - } - } else { - /* - * Without the "vcpu" property, dstate can only be 1 or 0. With it, we - * haven't instantiated any vCPU yet, so we will set a global state - * instead, and trace_init_vcpu will reconcile it afterwards. - */ - bool state_pre = *ev->dstate; - if (state_pre != state) { - if (state) { - trace_events_enabled_count++; - *ev->dstate = 1; - } else { - trace_events_enabled_count--; - *ev->dstate = 0; - } - } - } -} -static void trace_event_synchronize_vcpu_state_dynamic( - CPUState *vcpu, run_on_cpu_data ignored) -{ - bitmap_copy(vcpu->trace_dstate, vcpu->trace_dstate_delayed, - CPU_TRACE_DSTATE_MAX_EVENTS); - tcg_flush_jmp_cache(vcpu); -} - -void trace_event_set_vcpu_state_dynamic(CPUState *vcpu, - TraceEvent *ev, bool state) -{ - uint32_t vcpu_id; - bool state_pre; - assert(trace_event_get_state_static(ev)); - assert(trace_event_is_vcpu(ev)); - vcpu_id = trace_event_get_vcpu_id(ev); - state_pre = test_bit(vcpu_id, vcpu->trace_dstate); + /* + * There is no longer a "vcpu" property, dstate can only be 1 or + * 0. With it, we haven't instantiated any vCPU yet, so we will + * set a global state instead, and trace_init_vcpu will reconcile + * it afterwards. + */ + bool state_pre = *ev->dstate; if (state_pre != state) { if (state) { trace_events_enabled_count++; - set_bit(vcpu_id, vcpu->trace_dstate_delayed); - (*ev->dstate)++; + *ev->dstate = 1; } else { trace_events_enabled_count--; - clear_bit(vcpu_id, vcpu->trace_dstate_delayed); - (*ev->dstate)--; - } - if (vcpu->created) { - /* - * Delay changes until next TB; we want all TBs to be built from a - * single set of dstate values to ensure consistency of generated - * tracing code. - */ - async_run_on_cpu(vcpu, trace_event_synchronize_vcpu_state_dynamic, - RUN_ON_CPU_NULL); - } else { - trace_event_synchronize_vcpu_state_dynamic(vcpu, RUN_ON_CPU_NULL); - } - } -} - -static bool adding_first_cpu1(void) -{ - CPUState *cpu; - size_t count = 0; - CPU_FOREACH(cpu) { - count++; - if (count > 1) { - return false; - } - } - return true; -} - -static bool adding_first_cpu(void) -{ - bool res; - cpu_list_lock(); - res = adding_first_cpu1(); - cpu_list_unlock(); - return res; -} - -void trace_init_vcpu(CPUState *vcpu) -{ - TraceEventIter iter; - TraceEvent *ev; - trace_event_iter_init_all(&iter); - while ((ev = trace_event_iter_next(&iter)) != NULL) { - if (trace_event_is_vcpu(ev) && - trace_event_get_state_static(ev) && - trace_event_get_state_dynamic(ev)) { - if (adding_first_cpu()) { - /* check preconditions */ - assert(*ev->dstate == 1); - /* disable early-init state ... */ - *ev->dstate = 0; - trace_events_enabled_count--; - /* ... and properly re-enable */ - trace_event_set_vcpu_state_dynamic(vcpu, ev, true); - } else { - trace_event_set_vcpu_state_dynamic(vcpu, ev, true); - } + *ev->dstate = 0; } } } diff --git a/trace/control.c b/trace/control.c index 5dfb609954..1a48a7e266 100644 --- a/trace/control.c +++ b/trace/control.c @@ -262,22 +262,6 @@ void trace_init_file(void) #endif } -void trace_fini_vcpu(CPUState *vcpu) -{ - TraceEventIter iter; - TraceEvent *ev; - - trace_event_iter_init_all(&iter); - while ((ev = trace_event_iter_next(&iter)) != NULL) { - if (trace_event_is_vcpu(ev) && - trace_event_get_state_static(ev) && - trace_event_get_vcpu_state_dynamic(vcpu, ev)) { - /* must disable to affect the global counter */ - trace_event_set_vcpu_state_dynamic(vcpu, ev, false); - } - } -} - bool trace_init_backends(void) { #ifdef CONFIG_TRACE_SIMPLE diff --git a/trace/qmp.c b/trace/qmp.c index 3b4f4702b4..aa760f1fc4 100644 --- a/trace/qmp.c +++ b/trace/qmp.c @@ -13,20 +13,7 @@ #include "control-vcpu.h" -static CPUState *get_cpu(bool has_vcpu, int vcpu, Error **errp) -{ - if (has_vcpu) { - CPUState *cpu = qemu_get_cpu(vcpu); - if (cpu == NULL) { - error_setg(errp, "invalid vCPU index %u", vcpu); - } - return cpu; - } else { - return NULL; - } -} - -static bool check_events(bool has_vcpu, bool ignore_unavailable, bool is_pattern, +static bool check_events(bool ignore_unavailable, bool is_pattern, const char *name, Error **errp) { if (!is_pattern) { @@ -38,12 +25,6 @@ static bool check_events(bool has_vcpu, bool ignore_unavailable, bool is_pattern return false; } - /* error for non-vcpu event */ - if (has_vcpu && !trace_event_is_vcpu(ev)) { - error_setg(errp, "event \"%s\" is not vCPU-specific", name); - return false; - } - /* error for unavailable event */ if (!ignore_unavailable && !trace_event_get_state_static(ev)) { error_setg(errp, "event \"%s\" is disabled", name); @@ -70,22 +51,13 @@ TraceEventInfoList *qmp_trace_event_get_state(const char *name, bool has_vcpu, int64_t vcpu, Error **errp) { - Error *err = NULL; TraceEventInfoList *events = NULL; TraceEventIter iter; TraceEvent *ev; bool is_pattern = trace_event_is_pattern(name); - CPUState *cpu; - - /* Check provided vcpu */ - cpu = get_cpu(has_vcpu, vcpu, &err); - if (err) { - error_propagate(errp, err); - return NULL; - } /* Check events */ - if (!check_events(has_vcpu, true, is_pattern, name, errp)) { + if (!check_events(true, is_pattern, name, errp)) { return NULL; } @@ -93,33 +65,17 @@ TraceEventInfoList *qmp_trace_event_get_state(const char *name, trace_event_iter_init_pattern(&iter, name); while ((ev = trace_event_iter_next(&iter)) != NULL) { TraceEventInfo *value; - bool is_vcpu = trace_event_is_vcpu(ev); - if (has_vcpu && !is_vcpu) { - continue; - } value = g_new(TraceEventInfo, 1); - value->vcpu = is_vcpu; value->name = g_strdup(trace_event_get_name(ev)); if (!trace_event_get_state_static(ev)) { value->state = TRACE_EVENT_STATE_UNAVAILABLE; } else { - if (has_vcpu) { - if (is_vcpu) { - if (trace_event_get_vcpu_state_dynamic(cpu, ev)) { - value->state = TRACE_EVENT_STATE_ENABLED; - } else { - value->state = TRACE_EVENT_STATE_DISABLED; - } - } - /* else: already skipped above */ + if (trace_event_get_state_dynamic(ev)) { + value->state = TRACE_EVENT_STATE_ENABLED; } else { - if (trace_event_get_state_dynamic(ev)) { - value->state = TRACE_EVENT_STATE_ENABLED; - } else { - value->state = TRACE_EVENT_STATE_DISABLED; - } + value->state = TRACE_EVENT_STATE_DISABLED; } } QAPI_LIST_PREPEND(events, value); @@ -133,21 +89,12 @@ void qmp_trace_event_set_state(const char *name, bool enable, bool has_vcpu, int64_t vcpu, Error **errp) { - Error *err = NULL; TraceEventIter iter; TraceEvent *ev; bool is_pattern = trace_event_is_pattern(name); - CPUState *cpu; - - /* Check provided vcpu */ - cpu = get_cpu(has_vcpu, vcpu, &err); - if (err) { - error_propagate(errp, err); - return; - } /* Check events */ - if (!check_events(has_vcpu, has_ignore_unavailable && ignore_unavailable, + if (!check_events(has_ignore_unavailable && ignore_unavailable, is_pattern, name, errp)) { return; } @@ -155,14 +102,9 @@ void qmp_trace_event_set_state(const char *name, bool enable, /* Apply changes (all errors checked above) */ trace_event_iter_init_pattern(&iter, name); while ((ev = trace_event_iter_next(&iter)) != NULL) { - if (!trace_event_get_state_static(ev) || - (has_vcpu && !trace_event_is_vcpu(ev))) { + if (!trace_event_get_state_static(ev)) { continue; } - if (has_vcpu) { - trace_event_set_vcpu_state_dynamic(cpu, ev, enable); - } else { - trace_event_set_state_dynamic(ev, enable); - } + trace_event_set_state_dynamic(ev, enable); } } diff --git a/trace/trace-hmp-cmds.c b/trace/trace-hmp-cmds.c index 792876c34a..1d07672cb2 100644 --- a/trace/trace-hmp-cmds.c +++ b/trace/trace-hmp-cmds.c @@ -37,16 +37,9 @@ void hmp_trace_event(Monitor *mon, const QDict *qdict) { const char *tp_name = qdict_get_str(qdict, "name"); bool new_state = qdict_get_bool(qdict, "option"); - bool has_vcpu = qdict_haskey(qdict, "vcpu"); - int vcpu = qdict_get_try_int(qdict, "vcpu", 0); Error *local_err = NULL; - if (vcpu < 0) { - monitor_printf(mon, "argument vcpu must be positive"); - return; - } - - qmp_trace_event_set_state(tp_name, new_state, true, true, has_vcpu, vcpu, &local_err); + qmp_trace_event_set_state(tp_name, new_state, true, true, false, 0, &local_err); if (local_err) { error_report_err(local_err); } @@ -80,8 +73,6 @@ void hmp_trace_file(Monitor *mon, const QDict *qdict) void hmp_info_trace_events(Monitor *mon, const QDict *qdict) { const char *name = qdict_get_try_str(qdict, "name"); - bool has_vcpu = qdict_haskey(qdict, "vcpu"); - int vcpu = qdict_get_try_int(qdict, "vcpu", 0); TraceEventInfoList *events; TraceEventInfoList *elem; Error *local_err = NULL; @@ -89,12 +80,8 @@ void hmp_info_trace_events(Monitor *mon, const QDict *qdict) if (name == NULL) { name = "*"; } - if (vcpu < 0) { - monitor_printf(mon, "argument vcpu must be positive"); - return; - } - events = qmp_trace_event_get_state(name, has_vcpu, vcpu, &local_err); + events = qmp_trace_event_get_state(name, false, 0, &local_err); if (local_err) { error_report_err(local_err); return; From patchwork Thu Apr 20 15:00:06 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: 675622 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp364133wrs; Thu, 20 Apr 2023 08:01:12 -0700 (PDT) X-Google-Smtp-Source: AKy350b0hRWZBaUdFTAk8+g3qE4m/AIq91cV7sAJ8i5F5g5qeOO6VaraidJGEC5HiL9zag6nuhv6 X-Received: by 2002:a05:6102:e5a:b0:411:ac63:39d1 with SMTP id p26-20020a0561020e5a00b00411ac6339d1mr1057850vst.11.1682002872004; Thu, 20 Apr 2023 08:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002871; cv=none; d=google.com; s=arc-20160816; b=IbRvqhknNxFFgRWR1T96IUaSVExdstnQHSH3J44gia9w2voT9imQP6ruTfiDPt37v0 JR0nEDO6mZWDWjjT0+7d9P4OkUZV01fdyKA4k0wQmGdP3bRYFNR7Z38rI4Qa7J+xmysz zKkKUMejW5NZ9EtVjTgITgV5vqBmPCQZK1beSAeoAm8Caf7kYHlidI7LOwQZGyq69Z1+ lcv+8jOf0+rfbNxPwSJq9OPeET/7KRGYawXzqppcdCgv9zTPyh/pquCvmDwiVzAE+faO pDHnKqWBelmD7fzQr+MK34EBvD1Gsjz2X/5dYtvEh3hU9on7X2y/HJS0IFZ3qPdPgHoV /2/A== 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=qaSuTiuAyCSuCXfY55ffoyW7xvTS9JDADhViNRePirU=; b=bbsblUgyrPm9LY1XllaA2Px+x8ZmBSoFDXbySCh1cz1Qc/3RyDh6Yrxn8hUy5nH7uu /pjTfun/ev/zBRv3qAB1KbsHy6b1P/yygOw+bhwruOatICbpF5Ydsc687rPopaqWqQQT 4NKSG6fueMBXTZQXSBCrChyUw3F+VR4HSoY36aomAkfhxpt8bgKOJl4nZ3QDr6b8gskP TrGk7X/reAJdTGqpqGBq2YLQpx6Gs3N9X62BZxNWSIfCCiWrmr6E4Zm9G+i0lakPYOkA PFEhNdowNOVdMLFK5tLNeN4iSAMnWeOQv4Uq2fcodgKG9FEdrjb/EEwEDoqgD/fjdHtx VKYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QOquyBWd; 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 d1-20020ab07241000000b00771cd98a321si417513uap.211.2023.04.20.08.01.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:01:11 -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=QOquyBWd; 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 1ppVln-0003iZ-RJ; Thu, 20 Apr 2023 11:00:24 -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 1ppVli-0003ah-HQ for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:19 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVlg-00047M-4m for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:18 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f1728c2a57so7758145e9.0 for ; Thu, 20 Apr 2023 08:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002815; x=1684594815; 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=qaSuTiuAyCSuCXfY55ffoyW7xvTS9JDADhViNRePirU=; b=QOquyBWdcgQam8dmHyjRGI2/Viwa5nGkClTRnjuc/sotcSeXj9u2Sy5+onN+zFjXvu WyrGoS/dnhpJEvmq+022SvqviStkuzpgw912yJdvOcPHvPTbe52jEp3kbF+VXDAdI7VB bz4zwQg66v0ogSdITzZncQRzSFW+s21iRmgxicBUDWL/6H6OnFvRNmvHCloSRPhN34Q8 1lSk1O76ZP8p/0TTnWKp4udHj8yuPelnSUXJPOdHVAXpYSUs0DNsAlkMk1RIIPYckZC6 r4Ngg60ggJszxt2/izS+bWxeCTX2ig1WqjnE+FlIc9utmirAxzXRzvTcpBlziyMJkQYT 9wog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002815; x=1684594815; 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=qaSuTiuAyCSuCXfY55ffoyW7xvTS9JDADhViNRePirU=; b=TZG7Yu1+5KrT0Pug+h3AW9cvs4jpIPPE6A1DtEeSg/nIUrxzzjxj6QmNvt9fgj0sRO cbOVms86HjF98j5Qw6RmOVpqVvrLTjBTOhugdvwNqGRnFTxdm0K+TFiFvio3J33VK3Iy TykMwrWg1SJEOSNHVJaWg+ZnyoJKGpq2WjOKQSBttFoXLC1wT+yEtPVuF35KdHx9Y/67 BJAgFC5/aX2FndMAYDDujiJZPsDkzpoRYxiGH66eeAC7vEh0hRLP3FydMTUGvhWgC82I 8X5QZbWLJy+oAq7LB+NuCoI5vAjDsMvKnK9J3cehUucugkjxo5U81nqLlQ0zHECJ9NXl 9Blw== X-Gm-Message-State: AAQBX9fKoip1WKZits4Ynk+JMqbHGJnN5NZnBlFIZzbUW+MEJoiWICOa PFCv6Hv+FWT8G9znlnmoARtPEg== X-Received: by 2002:adf:ed07:0:b0:2f5:7079:599e with SMTP id a7-20020adfed07000000b002f57079599emr1456255wro.12.1682002814773; Thu, 20 Apr 2023 08:00:14 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id b4-20020a05600010c400b002e45f6ffe63sm2185756wrx.26.2023.04.20.08.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D5CFE1FFBF; 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 07/10] trace: remove control-vcpu.h Date: Thu, 20 Apr 2023 16:00:06 +0100 Message-Id: <20230420150009.1675181-8-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::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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 Now we no longer have vcpu controlled trace events we can excise the code that allows us to query its status. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- trace/control-vcpu.h | 47 ----------------------------------- trace/qmp.c | 2 +- scripts/tracetool/format/h.py | 5 +--- 3 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 trace/control-vcpu.h diff --git a/trace/control-vcpu.h b/trace/control-vcpu.h deleted file mode 100644 index 800fc5a219..0000000000 --- a/trace/control-vcpu.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Interface for configuring and controlling the state of tracing events. - * - * Copyright (C) 2011-2016 Lluís Vilanova - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - */ - -#ifndef TRACE__CONTROL_VCPU_H -#define TRACE__CONTROL_VCPU_H - -#include "control.h" -#include "event-internal.h" -#include "hw/core/cpu.h" - -/** - * trace_event_get_vcpu_state: - * @vcpu: Target vCPU. - * @id: Event identifier name. - * - * Get the tracing state of an event (both static and dynamic) for the given - * vCPU. - * - * If the event has the disabled property, the check will have no performance - * impact. - */ -#define trace_event_get_vcpu_state(vcpu, id) \ - ((id ##_ENABLED) && \ - trace_event_get_vcpu_state_dynamic_by_vcpu_id( \ - vcpu, _ ## id ## _EVENT.vcpu_id)) - -#include "control-internal.h" - -static inline bool -trace_event_get_vcpu_state_dynamic_by_vcpu_id(CPUState *vcpu, - uint32_t vcpu_id) -{ - /* it's on fast path, avoid consistency checks (asserts) */ - if (unlikely(trace_events_enabled_count)) { - return test_bit(vcpu_id, vcpu->trace_dstate); - } else { - return false; - } -} - -#endif diff --git a/trace/qmp.c b/trace/qmp.c index aa760f1fc4..3e3971c6a8 100644 --- a/trace/qmp.c +++ b/trace/qmp.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qapi/qapi-commands-trace.h" -#include "control-vcpu.h" +#include "control.h" static bool check_events(bool ignore_unavailable, bool is_pattern, diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py index 285d7b03a9..ea126b07ea 100644 --- a/scripts/tracetool/format/h.py +++ b/scripts/tracetool/format/h.py @@ -16,10 +16,7 @@ def generate(events, backend, group): - if group == "root": - header = "trace/control-vcpu.h" - else: - header = "trace/control.h" + header = "trace/control.h" out('/* This file is autogenerated by tracetool, do not edit. */', '', From patchwork Thu Apr 20 15:00:07 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: 675627 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp365134wrs; Thu, 20 Apr 2023 08:02:25 -0700 (PDT) X-Google-Smtp-Source: AKy350ab9XLaX6FhrT4q3mFT8KT3mbjgf+IyJQ8XYtJ4w1QGcqMGdzuAjkM8TySOf49+6i717pCK X-Received: by 2002:adf:e50e:0:b0:2fa:36db:8060 with SMTP id j14-20020adfe50e000000b002fa36db8060mr1635852wrm.60.1682002945458; Thu, 20 Apr 2023 08:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002945; cv=none; d=google.com; s=arc-20160816; b=TEop0IQ+Zy2IMVtUoO+ZIoj6OScqaTnhVZrUzvIm5SLQtgQJjxJhTGjxcZc1vKMij9 A0V0vsWCIRA+UChDuk12FlH/w9SnmX5NuA+A2FAiSLnpvZn+fa8cMcHJIVakbg9V9Hm2 1QPbXogLmIpZGirdlS1Y/e0a+hOO20nhdLUPhmnuVpY3ZlrESd8qZdeCSPvoHIYmxXr6 TOQacmyFGMkCxIvjzfUx/YcK91uZWRlS7o31r3g5JstoSkuFjvWBUG3e9zDzzXb/Y3zB +qF8QMi7jMgSEnQXdz3o96Zlbs7ghYoK1woIkDLrKAeavWkUXjFzql9oFWLPkLCqWiaw LrEQ== 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=o+S8P5nD9r5wISIuehnoH3JBCN6mmMvJpl0Y6icjAN4=; b=C2v4SR6o9saQ0stzgZypxks4xKXeRMc0M/9u0zWWO8aH+GTvBMBkeBg/jWBIy5n7Lq 9XFDPGOLUsMsSxF6SB0W8O5HZa1xDPO6mDIlknK9Gzl51gu9Bj0JDllzj53FQPzgq6ZT BXFp5Ztd14JMwA20eMiwc9ymYBdbuClcH66JLKjNkWKoMRyTr3yuQaD5CumXm1tqhM+b P15zDe8vbN8D6pwdiheTS8qPmwlDRt0p9AnlonbimcslxVbigViQcyggQTwAT29XtTFd qJXo/15anbAElO7Xx70hxNwZ+cnS6fkBFbjLz/tx6HL2q8k5ila1pfXmvw58qe/GRnEt kGig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CuHCW82G; 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 u18-20020a5d6ad2000000b002fe923739f0si1345663wrw.563.2023.04.20.08.02.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:02:25 -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=CuHCW82G; 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 1ppVlt-0003rH-Nc; Thu, 20 Apr 2023 11:00:29 -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 1ppVlj-0003bU-QG for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:21 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVlg-00046v-D5 for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:19 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f18ece69dbso1883285e9.3 for ; Thu, 20 Apr 2023 08:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002814; x=1684594814; 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=o+S8P5nD9r5wISIuehnoH3JBCN6mmMvJpl0Y6icjAN4=; b=CuHCW82G8825rbArpL15jxHwCmCL2QdTUdRUDiwLr9wPqxc1vBmgjPFmUoI19xOLZy d4No7Fcn/YvahvB0mQ3/0IZQqluNzQHbhTFjRHLsWvCABBCS4G1Z7jTwDaKkf934kdPA g7Auu5l1tsMrTZgMayzDquygIBgKO/9Nv0J8m1QiMO0iIPrScEoAzSk2X6n50NbyEQNv RUZvNVVFR17LSygd2IR/jEPCXg5AwgmXB50F8A3qcfiU5Bhg3J5ixvtbSzfIKfNt1yUX YC4fymGynTwqWCGNgGrgqfNF2bILADc9NaMK5efJ0KuSE079WI776f6wsSbWasRWugK2 12Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002814; x=1684594814; 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=o+S8P5nD9r5wISIuehnoH3JBCN6mmMvJpl0Y6icjAN4=; b=UTzN949CHsp6XV/f80+Vs1AIq3FvOHNZc0N6SDLQG+tW4qeYW564WETIJJtxMTrBCU 0KITnytOeO5d2wlv7imJQHsS62WGvKqJyJhMU0M5PIiAG4uK2ciVWUThWHeuLOwWeUL+ xsOKKp7Yi1diTFbANHMGCprdkJtKff/6UwChnerh8sKmrEAiwLixu4p937AXK6N5q9D0 gp1BjIxv21qjO6ksuj7w2iAcbNirZ2JCWtVyRYwgDJfuwXv4W+mY05UY17uuhNLHOSG/ DK3bFrZ5dxOBCR+G+n3XFajr7j195AyyXTXjd4cqT5FPX84n4T8PavsekmufXI3IE9w2 GXww== X-Gm-Message-State: AAQBX9cGX+l3SlrO6TARf4IowX/v11qeq9ogbiRYCMqj7K4WiFPzaHJ/ EC0OS27dqeUbBG5Yg0siUkdvBA== X-Received: by 2002:a5d:5102:0:b0:2d8:4e4:8ce3 with SMTP id s2-20020a5d5102000000b002d804e48ce3mr1550982wrt.4.1682002813907; Thu, 20 Apr 2023 08:00:13 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d18-20020a5d4f92000000b002c7163660a9sm2127563wru.105.2023.04.20.08.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0E78D1FFB7; Thu, 20 Apr 2023 16:00:11 +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 08/10] tcg: remove the final vestiges of dstate Date: Thu, 20 Apr 2023 16:00:07 +0100 Message-Id: <20230420150009.1675181-9-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::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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 Now we no longer have dynamic state affecting things we can remove the additional fields in cpu.h and simplify the TB hash calculation. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1358 Signed-off-by: Alex Bennée --- accel/tcg/tb-hash.h | 6 +++--- include/exec/exec-all.h | 3 --- include/hw/core/cpu.h | 5 ----- accel/tcg/cpu-exec.c | 7 +------ accel/tcg/tb-maint.c | 5 ++--- accel/tcg/translate-all.c | 6 ------ 6 files changed, 6 insertions(+), 26 deletions(-) diff --git a/accel/tcg/tb-hash.h b/accel/tcg/tb-hash.h index 83dc610e4c..1d19c69caa 100644 --- a/accel/tcg/tb-hash.h +++ b/accel/tcg/tb-hash.h @@ -61,10 +61,10 @@ static inline unsigned int tb_jmp_cache_hash_func(target_ulong pc) #endif /* CONFIG_SOFTMMU */ static inline -uint32_t tb_hash_func(tb_page_addr_t phys_pc, target_ulong pc, uint32_t flags, - uint32_t cf_mask, uint32_t trace_vcpu_dstate) +uint32_t tb_hash_func(tb_page_addr_t phys_pc, target_ulong pc, + uint32_t flags, uint32_t cf_mask) { - return qemu_xxhash7(phys_pc, pc, flags, cf_mask, trace_vcpu_dstate); + return qemu_xxhash6(phys_pc, pc, flags, cf_mask); } #endif diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index ecded1f112..3ee76af28b 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -548,9 +548,6 @@ struct TranslationBlock { #define CF_CLUSTER_MASK 0xff000000 /* Top 8 bits are cluster ID */ #define CF_CLUSTER_SHIFT 24 - /* Per-vCPU dynamic tracing state used to generate this TB */ - uint32_t trace_vcpu_dstate; - /* * Above fields used for comparing */ diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 397fd3ac68..4b399643d0 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -262,7 +262,6 @@ typedef void (*run_on_cpu_func)(CPUState *cpu, run_on_cpu_data data); struct qemu_work_item; #define CPU_UNSET_NUMA_NODE_ID -1 -#define CPU_TRACE_DSTATE_MAX_EVENTS 32 /** * CPUState: @@ -403,10 +402,6 @@ struct CPUState { /* Use by accel-block: CPU is executing an ioctl() */ QemuLockCnt in_ioctl_lock; - /* Used for events with 'vcpu' and *without* the 'disabled' properties */ - DECLARE_BITMAP(trace_dstate_delayed, CPU_TRACE_DSTATE_MAX_EVENTS); - DECLARE_BITMAP(trace_dstate, CPU_TRACE_DSTATE_MAX_EVENTS); - DECLARE_BITMAP(plugin_mask, QEMU_PLUGIN_EV_MAX); #ifdef CONFIG_PLUGIN diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 8370c92c05..cd058619f5 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -175,7 +175,6 @@ struct tb_desc { tb_page_addr_t page_addr0; uint32_t flags; uint32_t cflags; - uint32_t trace_vcpu_dstate; }; static bool tb_lookup_cmp(const void *p, const void *d) @@ -187,7 +186,6 @@ static bool tb_lookup_cmp(const void *p, const void *d) tb_page_addr0(tb) == desc->page_addr0 && tb->cs_base == desc->cs_base && tb->flags == desc->flags && - tb->trace_vcpu_dstate == desc->trace_vcpu_dstate && tb_cflags(tb) == desc->cflags) { /* check next page if needed */ tb_page_addr_t tb_phys_page1 = tb_page_addr1(tb); @@ -228,7 +226,6 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc, desc.cs_base = cs_base; desc.flags = flags; desc.cflags = cflags; - desc.trace_vcpu_dstate = *cpu->trace_dstate; desc.pc = pc; phys_pc = get_page_addr_code(desc.env, pc); if (phys_pc == -1) { @@ -236,7 +233,7 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc, } desc.page_addr0 = phys_pc; h = tb_hash_func(phys_pc, (cflags & CF_PCREL ? 0 : pc), - flags, cflags, *cpu->trace_dstate); + flags, cflags); return qht_lookup_custom(&tb_ctx.htable, &desc, h, tb_lookup_cmp); } @@ -263,7 +260,6 @@ static inline TranslationBlock *tb_lookup(CPUState *cpu, target_ulong pc, jc->array[hash].pc == pc && tb->cs_base == cs_base && tb->flags == flags && - tb->trace_vcpu_dstate == *cpu->trace_dstate && tb_cflags(tb) == cflags)) { return tb; } @@ -282,7 +278,6 @@ static inline TranslationBlock *tb_lookup(CPUState *cpu, target_ulong pc, tb->pc == pc && tb->cs_base == cs_base && tb->flags == flags && - tb->trace_vcpu_dstate == *cpu->trace_dstate && tb_cflags(tb) == cflags)) { return tb; } diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index cb1f806f00..432a0cffdb 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -50,7 +50,6 @@ static bool tb_cmp(const void *ap, const void *bp) a->cs_base == b->cs_base && a->flags == b->flags && (tb_cflags(a) & ~CF_INVALID) == (tb_cflags(b) & ~CF_INVALID) && - a->trace_vcpu_dstate == b->trace_vcpu_dstate && tb_page_addr0(a) == tb_page_addr0(b) && tb_page_addr1(a) == tb_page_addr1(b)); } @@ -888,7 +887,7 @@ static void do_tb_phys_invalidate(TranslationBlock *tb, bool rm_from_page_list) /* remove the TB from the hash list */ phys_pc = tb_page_addr0(tb); h = tb_hash_func(phys_pc, (orig_cflags & CF_PCREL ? 0 : tb->pc), - tb->flags, orig_cflags, tb->trace_vcpu_dstate); + tb->flags, orig_cflags); if (!qht_remove(&tb_ctx.htable, tb, h)) { return; } @@ -969,7 +968,7 @@ TranslationBlock *tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc, /* add in the hash table */ h = tb_hash_func(phys_pc, (tb->cflags & CF_PCREL ? 0 : tb->pc), - tb->flags, tb->cflags, tb->trace_vcpu_dstate); + tb->flags, tb->cflags); qht_insert(&tb_ctx.htable, tb, h, &existing_tb); /* remove TB from the page(s) if we couldn't insert it */ diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 5b13281119..2ea42970e1 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -65,11 +65,6 @@ #include "internal.h" #include "perf.h" -/* Make sure all possible CPU event bits fit in tb->trace_vcpu_dstate */ -QEMU_BUILD_BUG_ON(CPU_TRACE_DSTATE_MAX_EVENTS > - sizeof_field(TranslationBlock, trace_vcpu_dstate) - * BITS_PER_BYTE); - TBContext tb_ctx; /* Encode VAL as a signed leb128 sequence at P. @@ -348,7 +343,6 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tb->cs_base = cs_base; tb->flags = flags; tb->cflags = cflags; - tb->trace_vcpu_dstate = *cpu->trace_dstate; tb_set_page_addr0(tb, phys_pc); tb_set_page_addr1(tb, -1); tcg_ctx->gen_tb = tb; From patchwork Thu Apr 20 15:00:08 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: 675623 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp364465wrs; Thu, 20 Apr 2023 08:01:35 -0700 (PDT) X-Google-Smtp-Source: AKy350ZNzTKy9vV9uQUVqbXeRmcWuayacx2p7/T7AK0fx8zdhjpVTc5WCK9eOD+GvYDaoffyT891 X-Received: by 2002:a05:7500:1b93:b0:101:9951:97d with SMTP id dq19-20020a0575001b9300b001019951097dmr93071gab.72.1682002895079; Thu, 20 Apr 2023 08:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002895; cv=none; d=google.com; s=arc-20160816; b=lTt3cc/nxBj2ic2dhGfaH4zld4AIc+J9F+CfIG+qwG/MFoNBftuRyoe5FDCNncxOJC xWiSrM621bLpe1xOBpwrGzOy6sQhNSGVJ+pumo/F1LSHQkSGKeosdifa0e+Nonkntk4W 1eLHmx8utKgv2sSBJGJLNiWvh9NnJuadkjGdhEkJ0gehdMoMHFPpkiMZu0itr/91QGm6 wI5pz731fmtP7FNM+m1qCDg2JJkZINXIqpHXejltBe14FPow95EHVsKKWyFaar+bhhxe hX28oHXc4C6uriPNXYSP83l4ZtYEimC/DobOWKns+jMJY+1psQg+JXtfTh5g9Wl1WCrX YQ7A== 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=0vImXH3xRyVec7BYB1TMv5cbFwkjyryrhb38Ec21rN4=; b=W49YX7Iow8Hh/zEzGtliTpEzl6PcYYKFtWZKFik1XhXEuNsWem69Ae4WqFPP6vsTS2 EQWICHu+ABq30djXjZAgvaQwDZYzVc6B5bUMdMLquzlVN6Z+Q9s89HvHPBHVtjVIyA0D ArfADZukqSUIUo5xZtFoO/uo3hmZ+2ZI5S2CDeg0MdII4HdjpNLjBW3Ycx1N//VmqYXS ivtwnQU0v/Uf8+SZH9ZH+1Xxgaj7mwtdgs3zb4hhZOKJdnf28Cu0LyUG/8tMTYn4zOI1 WO+gcgL/OFRSkBb11jFxYpJ+L/dxG2WP/mMBT5uqk4vUbiEAxav1V1Gz6W4UcS9Y7fCn /AYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XRVFqBGN; 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 p2-20020ab06242000000b00772f2268a86si445036uao.45.2023.04.20.08.01.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:01:35 -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=XRVFqBGN; 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-0003oe-AE; 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 1ppVli-0003ag-27 for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:19 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVlg-00046i-3D for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:17 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-2f95231618aso456256f8f.1 for ; Thu, 20 Apr 2023 08:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002813; x=1684594813; 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=0vImXH3xRyVec7BYB1TMv5cbFwkjyryrhb38Ec21rN4=; b=XRVFqBGN3LI8XVMOOsFnIJsBvm1j90DdXIA+uyWYufuY4e5oZubQRRJcn6OBYezico VByO1cMPbDQUuOpu2FOHyB7s2nF4CVv5zXTE9hjEs7gal1VrmQ8HzhK0DM3gj4J1ncUv Zh3CfwHm0617JHhb8L9vS18wAAIVO5lq1V0Quh5Csfno7QJZjLr0+CZpmPOOIuPg8HIk PBJVoVxVDSNjfIGz/1Zf6lLaH3d9YcHcd34+aK7f3ZRxh+ak0ok2Yz7sLYBIBbhAGKfB 4x1WNyOZCz0DtQfsDpQTyDScDe+eALFWb+DdOq2cemWyVVExjFTN8Tk3ueQQmD6H4MA1 6P4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002813; x=1684594813; 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=0vImXH3xRyVec7BYB1TMv5cbFwkjyryrhb38Ec21rN4=; b=bDqnWvgybETDaWf/bQcR9JzFLHmE5dxFDmeQ7CkBiBgG6LJTsbf7NzWsdYZbixufxz 31vPQeV9eFpfBlIv1bDpDWyS2wN7XliBs6E5hWURrnavsuuaFD2TTgDYJ8qXolMS55Yr R1LyxS2RnOYIYlCpRcUsEyPFRKHQTCXBWlDUBbpscY18voekKyDLPD2DsFyTWGOdYd5U w2pRiQtZzDYkmRe0/WNuelne9voF6uqhoE/CGK+caS9MWnGWw2wrGBM5Zo/dQ2kdV504 izjEr7AsDoSjkiVHItgMppJscvpT5aWvx4EnxaHNDlt8RTtGgbJ5gN5r7NQqa2gbZcyd 6lHQ== X-Gm-Message-State: AAQBX9db4fgf0aMHLVWG1iECMmkSfwxprYavYNXmJBJm0ksL1r6n7bLF UipOgPq9rjfEleg/vDNuIr3f+w== X-Received: by 2002:a5d:6808:0:b0:2f5:d0f:744a with SMTP id w8-20020a5d6808000000b002f50d0f744amr1539559wru.12.1682002813697; Thu, 20 Apr 2023 08:00:13 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w13-20020adff9cd000000b002cea9d931e6sm2146827wrr.78.2023.04.20.08.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 280F71FFB8; Thu, 20 Apr 2023 16:00:11 +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 09/10] hw/9pfs: use qemu_xxhash4 Date: Thu, 20 Apr 2023 16:00:08 +0100 Message-Id: <20230420150009.1675181-10-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::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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 No need to pass zeros as we have helpers that do that for us. Signed-off-by: Alex Bennée Reviewed-by: Christian Schoenebeck Reviewed-by: Philippe Mathieu-Daudé --- hw/9pfs/9p.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 9621ec1341..9bf502c45f 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -741,12 +741,12 @@ static VariLenAffix affixForIndex(uint64_t index) /* creative abuse of tb_hash_func7, which is based on xxhash */ static uint32_t qpp_hash(QppEntry e) { - return qemu_xxhash7(e.ino_prefix, e.dev, 0, 0, 0); + return qemu_xxhash4(e.ino_prefix, e.dev); } static uint32_t qpf_hash(QpfEntry e) { - return qemu_xxhash7(e.ino, e.dev, 0, 0, 0); + return qemu_xxhash4(e.ino, e.dev); } static bool qpd_cmp_func(const void *obj, const void *userp) From patchwork Thu Apr 20 15:00:09 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: 675629 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp365258wrs; Thu, 20 Apr 2023 08:02:34 -0700 (PDT) X-Google-Smtp-Source: AKy350aySshSpQekKVuqFivm+wldjzow5qB7FeLd/NgekjgEk5/yisyXOju8X2vrwzbrkfPr2ESG X-Received: by 2002:a7b:c388:0:b0:3f1:6fea:790a with SMTP id s8-20020a7bc388000000b003f16fea790amr1501158wmj.30.1682002954492; Thu, 20 Apr 2023 08:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682002954; cv=none; d=google.com; s=arc-20160816; b=UaVC5aQdjqgLgUFs4JKqCFx5DCKNtoB85i0lSPVQcr/LCsrZ3KdXDteOjPnNEPlg1X ftjbmEC/+anBBS+Twk8C3dDq7x1MUXOunT8sob9RTxgx9l0XhX1pSLfn20NN/NpqwB4o 5xTbxLVhjIRlqFNtlPp58p5RBfQYD0tXhKtotzgPwNO3pnazd/WAk+CszIiVurH5vgRn sotQy4UU2fSce9PMHgwxCj/jc0rjV9LA3B24k3fRtwHQq8hZDL4jfRgRXjifSZSu/Sps QTiioWC9rqYOw0m6fAOChMZO6iuN2ZnjotdfEpH4TVr0Bt4vg+BlPlrv88lLOgxQ/2EQ X43Q== 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=2mUGdFeLesXixgZdR4dkifVgmw89yr/nJqMOkP0ydlI=; b=sXTt1/iIQnhGA+FZ1Lei+Q5M+M1e6HDo+Brs8hUvAGN+BonB8zdV+7MK7bI4pk9jeB Fi9Eh18s2FpojoAQkxzf7shUeeLM4zPAKWy7Yl+Cp9fNj+nkiw5uos6Zp1OJN91Yk4Bk DcmC7eHvFWyLJQUFxV/afGYG/TIVV2wRpCBRY3Q/IujyvBpaajA4GdcUxApL9fvRyHjR B0Phr5po+KlSjSEVDzxn1M2i/ZTdZ4FSK7p1iYFAaVS+UrI7T2vLqkL99etrdH7PEOtU 6wcZqC6htWYkhPqHZFashD3huzrx4TrEACCuK2d+C1Mp/zMLwdS/sXkM69AaO0b77apX JLGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q9YAuYXc; 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 s15-20020adfea8f000000b002efb527f487si1569843wrm.591.2023.04.20.08.02.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Apr 2023 08:02:34 -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=Q9YAuYXc; 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-0003qM-Vk; Thu, 20 Apr 2023 11:00:29 -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 1ppVlk-0003dA-71 for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:21 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppVlg-00047W-I6 for qemu-devel@nongnu.org; Thu, 20 Apr 2023 11:00:19 -0400 Received: by mail-wm1-x32f.google.com with SMTP id he11-20020a05600c540b00b003ef6d684102so3204490wmb.3 for ; Thu, 20 Apr 2023 08:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682002815; x=1684594815; 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=2mUGdFeLesXixgZdR4dkifVgmw89yr/nJqMOkP0ydlI=; b=Q9YAuYXcSydEZ7VVlWXZMKct4mjUM6fD40au3zTtI88VlqrXmktxXyF5zg3P0Sko0v SNapRdEd4veuK0oeO42R0L2zc+qLnqvIiPU3tv5L68CRJLQBMSyHD7iYP1sJLpPPIgF7 W0ce3WLYbAdNQX15apEycgNs3ACmGZZkz8mquxW+Eec4kMRZRtxnhX/uYpdGEu4Oqzqv dWLupWIAIPHWIQd/Ug2EzV+uxkMzK0iG5FmdMg3StR1BQU+XTf34jt6kiDATxjDshs+k bTZJVyUqhe6Om+VmPErVOVBToY5RPm6EyzCBgQtVDsdij8f+zeQ25s0H7SqWGj4PK5W7 ohIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682002815; x=1684594815; 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=2mUGdFeLesXixgZdR4dkifVgmw89yr/nJqMOkP0ydlI=; b=RpCQgy4/NXx0jZzYHXBmbHiJpXWcvdL+ikBJlGHrSZ/sZMgSVo7RbysyCa1OSHAOb/ yl+UGLcd3notU7VBJUGWmrZK0vSSbXcqvDuOlThXXGkbebcd7VZ2T1knl2hswjT/dIOv EsxAjpboiNxekh4ED8YgmuW+LKjEOLlApIf7TwUGoX+kxT2owvKWX++59OIjKyUgXQRs ULKOeVH0zcJxzyf/yaRBBeIJq2j+basJoGg1czZiVJWDGh7P6LIxakZca70kC+SlLTzY 80XG11H/MBU1jeBMAQaZBSWrJvGqiv0ezTrXd85UbcqVjo0ubgMe0JRdWityBf8OTvLz obWw== X-Gm-Message-State: AAQBX9elbEpfzPWYSqZ2yfeggxPG8PG25UBPvQM8+XWw23UmpBfUOdGV BvgMPPNoY5+GKBOdxD8/510FOA== X-Received: by 2002:a1c:7916:0:b0:3f1:72dc:8bae with SMTP id l22-20020a1c7916000000b003f172dc8baemr1625459wme.21.1682002815004; Thu, 20 Apr 2023 08:00:15 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r3-20020a05600c35c300b003f1836c98b7sm3334870wmq.48.2023.04.20.08.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 08:00:13 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 428B31FFC0; Thu, 20 Apr 2023 16:00:11 +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 10/10] xxhash: remove qemu_xxhash7 Date: Thu, 20 Apr 2023 16:00:09 +0100 Message-Id: <20230420150009.1675181-11-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::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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 Now we no longer have users for qemu_xxhash7 we can drop an additional multiply and rol and make qemu_xxhash6 the implementation. Adjust the smaller hash functions accordingly. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- include/qemu/xxhash.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/include/qemu/xxhash.h b/include/qemu/xxhash.h index c2dcccadbf..bab7d4ca09 100644 --- a/include/qemu/xxhash.h +++ b/include/qemu/xxhash.h @@ -49,7 +49,7 @@ * contiguous in memory. */ static inline uint32_t -qemu_xxhash7(uint64_t ab, uint64_t cd, uint32_t e, uint32_t f, uint32_t g) +qemu_xxhash6(uint64_t ab, uint64_t cd, uint32_t e, uint32_t f) { uint32_t v1 = QEMU_XXHASH_SEED + PRIME32_1 + PRIME32_2; uint32_t v2 = QEMU_XXHASH_SEED + PRIME32_2; @@ -86,9 +86,6 @@ qemu_xxhash7(uint64_t ab, uint64_t cd, uint32_t e, uint32_t f, uint32_t g) h32 += f * PRIME32_3; h32 = rol32(h32, 17) * PRIME32_4; - h32 += g * PRIME32_3; - h32 = rol32(h32, 17) * PRIME32_4; - h32 ^= h32 >> 15; h32 *= PRIME32_2; h32 ^= h32 >> 13; @@ -100,23 +97,17 @@ qemu_xxhash7(uint64_t ab, uint64_t cd, uint32_t e, uint32_t f, uint32_t g) static inline uint32_t qemu_xxhash2(uint64_t ab) { - return qemu_xxhash7(ab, 0, 0, 0, 0); + return qemu_xxhash6(ab, 0, 0, 0); } static inline uint32_t qemu_xxhash4(uint64_t ab, uint64_t cd) { - return qemu_xxhash7(ab, cd, 0, 0, 0); + return qemu_xxhash6(ab, cd, 0, 0); } static inline uint32_t qemu_xxhash5(uint64_t ab, uint64_t cd, uint32_t e) { - return qemu_xxhash7(ab, cd, e, 0, 0); -} - -static inline uint32_t qemu_xxhash6(uint64_t ab, uint64_t cd, uint32_t e, - uint32_t f) -{ - return qemu_xxhash7(ab, cd, e, f, 0); + return qemu_xxhash6(ab, cd, e, 0); } /*