From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105537; cv=none; d=zohomail.com; s=zohoarc; b=XXQ0QWco76Wymp+UkYWEK+sOyAaciECov+7gwIJRYKg0ARqcFcZVUDgs+yBsnMeY4xcTEo6OgFjFp+xJihhS1sPFLm+gsnTzb7z8NkWUrzNU+8x4xPRrJKv3CLm7t+EwUg9SVNRRJAqDdBeZhb6NEB9jjtEhaY9ECCct26cf1Ig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105537; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MoOuAposOVouEiSDB7Zw3sg5pr2E0SeQOaNY822mSO8=; b=mzrkXopU73MlvHINaSPpTCUfhcAD9LMlwzKt0RO7LnW53Mu68hhpZtpHZpclsr94+l2jTUvlvXzllfuRPUe4X6iPmaMgd97s/WkViJ3b+Lrrp06g3c8eaRosHUsZuTDuWqFOb0TXIqkxS7TvbN7K1MZfnwOfmSWx1470uEdCCFE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683105537576297.202974525889; Wed, 3 May 2023 02:18:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8cf-00031P-0Y; Wed, 03 May 2023 05:18:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pu8cd-0002r0-Co for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cZ-0000Le-Sc for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f182d745deso47653245e9.0 for ; Wed, 03 May 2023 02:17:59 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y6-20020a1c4b06000000b003f17e37ce60sm1231800wma.47.2023.05.03.02.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 17EBE1FFBC; Wed, 3 May 2023 10:17:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105478; x=1685697478; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MoOuAposOVouEiSDB7Zw3sg5pr2E0SeQOaNY822mSO8=; b=J5CE6X4Slx73fHPIGYFRwQH6sp711m9/2KuhJJMew4oMdDODu8woFjVnflBzQpDUev d0KiOktoeDTjSCUSbLnzb5iLixq4aJ0W1n9SrjVxt8QgJDTjkwvfMqFVAfQgD/t8vnAc 94aTMVmVkPStg5e96Ip7dI1urt5nPvdVeXZaivz5m8V6sGheUtlvnuydmjAKSfjlTX3e l5Jl2DEUsGKi/veRgcqEnFRwZgJaBTkuGs+wMSbCO06UAaByMmRINVLzdTotWOPhQeow ZsH4KMAG5cRZLy4zMDiQRPr2KrDSMxB41BlwGqflP3wV/lVcjQqwrObyxwjogsXvXEPj dA2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105478; x=1685697478; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MoOuAposOVouEiSDB7Zw3sg5pr2E0SeQOaNY822mSO8=; b=Y75qiqsD1MgltICJoD7ziR1LM/idbug8bWYykoWRBw9c5o+TZyLBXqx7axmut9s1S5 ZdUANXJyLDa4c9J16iKC3v+xX35t4p8Uko6VloxQhnuian9a+1wIMHRVu5GpWt+LYE7h U2j9tGRLsISl7Ayg5D+/T0CirWL600LSOnfzBKSkPxE3Mi/ToBtVNszUhTO6KkmRfImd gY/APCcM3xPP0aYR7R1rUrLTnlad7ntygi3k0iwf0khffhJn6zDXqqqOorQmiSKgYUJm AdRWAPt2uP81uQ0CTmUDGx/KsxLeQUlEkzkwHw/DH+xGv86WO96bf/9yBzSAllQGNHDi 74yQ== X-Gm-Message-State: AC+VfDynM4mwH0CGpxhyLp7H+CZz9hqGit3KZwfa7KyuU9nMdnYjXI6M MzCZQm8qpGIKOP20G/haOMcuWQ== X-Google-Smtp-Source: ACHHUZ4OFKsGRCzI28sovkeh8Uf1QLGXTNPJPhgAT4MHMF1PM36r7iGHLg/WmxeYCGLNE2quHZTLvg== X-Received: by 2002:a7b:c8c4:0:b0:3f1:78d0:fc4e with SMTP id f4-20020a7bc8c4000000b003f178d0fc4emr14792000wml.32.1683105478099; Wed, 03 May 2023 02:17:58 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 01/10] *-user: remove the guest_user_syscall tracepoints Date: Wed, 3 May 2023 10:17:47 +0100 Message-Id: <20230503091756.1453057-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105539662100004 This is pure duplication now. Both bsd-user and linux-user have builtin strace support and we can also track syscalls via the plugins system. Message-Id: <20230420150009.1675181-2-alex.bennee@linaro.org> Reviewed-by: Warner Losh Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- include/user/syscall-trace.h | 4 ---- bsd-user/freebsd/os-syscall.c | 2 -- trace-events | 19 ------------------- 3 files changed, 25 deletions(-) diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index 90bda7631c..557f881a79 100644 --- a/include/user/syscall-trace.h +++ b/include/user/syscall-trace.h @@ -26,9 +26,6 @@ static inline void record_syscall_start(void *cpu, int nu= m, 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 nu= m, =20 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); } =20 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 =3D env_cpu(cpu_env); abi_long ret; =20 - 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); =20 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) =20 -# 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=3D0x%016"PRIx64" arg1=3D0x%016"PRIx64" arg2=3D0x%016"PRIx64" = arg3=3D0x%016"PRIx64" arg4=3D0x%016"PRIx64" arg5=3D0x%016"PRIx64" arg6=3D0x= %016"PRIx64" arg7=3D0x%016"PRIx64" arg8=3D0x%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=3D0x%016"PRIx= 64" ret=3D0x%016"PRIx64 --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105537; cv=none; d=zohomail.com; s=zohoarc; b=B84ly/hmf5gyW26WYYvpR7MO4bR1aZ3BPGztW37dWT6P60rua0B+yydvIOorZ3LHdxr6jleWxfjRzcyAvzx7VknTVR5irJVWb6Gg8zvYnw/pNQP3HTAPIXvs1V3+lByeOKLfs/CORGrSo0UyrVj/zui7vYgkmSIN0D18HF/Ucb0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105537; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nnbuAda1HDg+mB6KFTRsN6PGn/CEDFiT2f/X2hh0Sns=; b=I8kBdumflUTi/ctibvcHNLOlrCFWZs/roKY2WbrxCVeNJmc/IRGMPdOYj9CVJ4fh7pYeXrVsvdqldn6qORrZVlGFVs2tQF57OSQESwNd96BwG1+StTTueQ79FDRh9V3XsatQFbt4I47v9//+J1XvZc5Cb8mhOPyvRblZ6RtIMTc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683105537802975.930070271289; Wed, 3 May 2023 02:18:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8cg-00039w-Dq; Wed, 03 May 2023 05:18:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pu8cd-0002pM-7N for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cZ-0000Lg-Nr for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:02 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f4000ec74aso1128305e9.3 for ; Wed, 03 May 2023 02:17:59 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id u4-20020a5d5144000000b00304ae802f02sm16415808wrt.66.2023.05.03.02.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 38EC11FFBF; Wed, 3 May 2023 10:17:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105478; x=1685697478; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nnbuAda1HDg+mB6KFTRsN6PGn/CEDFiT2f/X2hh0Sns=; b=VUC5w4cjKeJc1B27J+YmpdCgXgyEtAMYEQmCbJEk/v8PQn/oBBQc1tDTPFEIq+IySa caKAkBwES3iACXhuEmeDq3jI+bc9JLHtvY/LsyvrhbIw5tnFirv+FTvFR1wXPJTj3n28 CC8uQKzEL7C52GAd4oz7F48kiPKmg5UZKatMBnDRJuoehAe17wI2eFxrFF8dtRADY/ka Isa49DiWESgfSpk3KJZ1AQ29AaMRFfHQmoGnMt1C9gFLYdiGyYNRumorhq9mbK5eKWrl GqOlwhJSv0FwxmjmRzN5kIDlx92yMjfgxeON1pHeGEzTSzlTFxp8Ls8ChmiopV6Camp5 ev7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105478; x=1685697478; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nnbuAda1HDg+mB6KFTRsN6PGn/CEDFiT2f/X2hh0Sns=; b=JqOVAgDFR383Y8tx/DOrlOJt3C7NnCwG1isPaoAiDik8QagrkWOt0xwHWtxDOlO52d zHN0zvff1pn99bcbElMesvxJh9QnbpAawOLhELHV8DhkMlJkzhgWJS4BktYRA5vkxPdw zWXEJpVELGi+t5KmgS0gwM6r2+q6vwzo5miXauiTWBr3bPwt+HnusSg0DyTYFXE+nWMA kszog3NlbW/UaSFWs1E8RK59l8yHeEbdsYTB+wr0nsQXpVSKQN8ZAGhx6jZpSmwcDvC9 Ip/sETq28ginAvwvPcryQWfbYQLNm1A3ZWefftkzra5//i3nbJEAhv5Ifl6ID3/8AQhs /Sdg== X-Gm-Message-State: AC+VfDxHyisID2lM9a1YjflHAwK++TX5tV4w+mwEG3YbzUktTYWYiCjE sCanrJ2Y6/AhmTmGtpaeFP9rqw== X-Google-Smtp-Source: ACHHUZ6NJhHkHAP/QwRB+vKffoBw+LZhUkfRvoY7QJ45hxILf4Rkqs68U4gTYscGumEV644wCLVqYw== X-Received: by 2002:a5d:44c4:0:b0:304:4460:11e7 with SMTP id z4-20020a5d44c4000000b00304446011e7mr13920851wrr.51.1683105478286; Wed, 03 May 2023 02:17:58 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 02/10] trace-events: remove the remaining vcpu trace events Date: Wed, 3 May 2023 10:17:48 +0100 Message-Id: <20230503091756.1453057-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105539318100001 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]. We rename cpu_reset and make it a normal watch point. Message-Id: <20230420150009.1675181-3-alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- v2 - keep cpu_reset tracepoint --- hw/core/cpu-common.c | 4 ++-- trace/control-target.c | 1 - trace/control.c | 2 -- hw/core/trace-events | 3 +++ trace-events | 31 ------------------------------- 5 files changed, 5 insertions(+), 36 deletions(-) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 5ccc3837b6..951477a7fd 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -32,7 +32,7 @@ #include "sysemu/tcg.h" #include "hw/boards.h" #include "hw/qdev-properties.h" -#include "trace/trace-root.h" +#include "trace.h" #include "qemu/plugin.h" =20 CPUState *cpu_by_arch_id(int64_t id) @@ -113,7 +113,7 @@ void cpu_reset(CPUState *cpu) { device_cold_reset(DEVICE(cpu)); =20 - trace_guest_cpu_reset(cpu); + trace_cpu_reset(cpu->cpu_index); } =20 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; =20 - trace_guest_cpu_exit(vcpu); - trace_event_iter_init_all(&iter); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { if (trace_event_is_vcpu(ev) && diff --git a/hw/core/trace-events b/hw/core/trace-events index 56da55bd71..2cf085ac66 100644 --- a/hw/core/trace-events +++ b/hw/core/trace-events @@ -29,3 +29,6 @@ clock_set(const char *clk, uint64_t old, uint64_t new) "'= %s', %"PRIu64"Hz->%"PRI clock_propagate(const char *clk) "'%s'" clock_update(const char *clk, const char *src, uint64_t hz, int cb) "'%s',= src=3D'%s', val=3D%"PRIu64"Hz cb=3D%d" clock_set_mul_div(const char *clk, uint32_t oldmul, uint32_t mul, uint32_t= olddiv, uint32_t div) "'%s', mul: %u -> %u, div: %u -> %u" + +# cpu-common.c +cpu_reset(int cpu_index) "%d" 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) - --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105496; cv=none; d=zohomail.com; s=zohoarc; b=Gr3hd/ocqgA50vV8fZJ77dmP4EA0ucGBe7R4cudvR1YhfRi7id48NT/zKejKcjieiyxfNXDlN+Ktxy+Ju3dz+Cqd5P7QsIbnQ4G4eCsrWH31CNfe5Z4XdN2WwhHgRiwTNHHeattmqxfF0ieFLecCkHPJebpPGat2om40/K6XmC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105496; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=v/HuE8TvNTmsubCnSEhnzE79hC0IxWns0KAnAFa0T8o=; b=mHtNEMiP29SvG6N3NYSH55SOwTy9qxt0pnBl29YftZPtNL+cImn8aSVtrpou7IQIPnyTkHpGJL8BjUIpvgsm4bQELrGbPXgeEr6a8dkTj5C5ed92aRzo40xhnxVIyvE1tuGzYvmSaG5EbAeUF+Mmbt16mBgr+39+qDQNH+sKVHs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683105496140374.8182174589084; Wed, 3 May 2023 02:18:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8cg-0003De-Vw; Wed, 03 May 2023 05:18:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pu8cd-0002qm-C8 for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8ca-0000Lm-S5 for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f19a80a330so30534255e9.2 for ; Wed, 03 May 2023 02:18:00 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d19-20020a1c7313000000b003f17b91c3adsm1279404wmb.28.2023.05.03.02.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5A0991FFC0; Wed, 3 May 2023 10:17:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105479; x=1685697479; 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=v/HuE8TvNTmsubCnSEhnzE79hC0IxWns0KAnAFa0T8o=; b=TbgIynk5A0rOnqyPo/BBrxvj4nyhLW774LA7Y7Z1NO8e5hOetfa2y2zuAoq46oKznO jBdBfEA4c3ut5QoDw6o7vJZ/vnUxe49z0OoGZHUtbqkya3yz7bPslzP3JktyQ9mc9QQf VyyiKUljDfTslzWvl0xG+VWB4sTmN4qxz+1InAqQy5xah55/LJI8H2fV643n4zKrJpCO 1s6QK+5AhX9c0LmlsQaNUZYMedipjBIfPYsCVLa6WU8M0Bco8VEPlcFXRaU574cl/lKQ wdor8ha6Hkm2mghMK7jDtpsHPvfdVxP10JsTvCI8Gvac9mOjyj/oH7gE7vWvI68i11lJ kUHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105479; x=1685697479; 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=v/HuE8TvNTmsubCnSEhnzE79hC0IxWns0KAnAFa0T8o=; b=QKTnZIPVbsk24J9V1gkSau8qXutqrMX1Bl4zL25UHvTlRPW6sPSCuaRLzcNXJUSjys l3rspa4IOndk6D3rP72NnbwV+N2I3SziaEzWFil4PbXPOGROjZJIIkyKwodkswsukXNZ rQHmDaS/c0mmnzaqvBrPMipXI0l11Pz2nx/E4wC+NK2LUBlgHGL482f39RvjvqZtew9c FjDT6wtAT+q3kaK9Y8nr681DCCxB7hyxrXggrxVRUH1FvbCCJgrnRJ7OsZbqJ3lFvSDo p3OOE1pi4sHLdEnneOceHbKfde2gnAAy371G+qwktQZQhk5fPIywIb3dULtj9OL+BUJ8 STQw== X-Gm-Message-State: AC+VfDzYGSxkHMe3xIHEHV5vlvtdIgu2bfyfJ+wd8kAJXyJMLRjnXTvm oFoQKRMDe8GNCET5O09FWVzsBw== X-Google-Smtp-Source: ACHHUZ7vynt1pT5gyorCPgXZmQeBtAs7q3o9zJxojCwS5+/rEWwNcB9hu+buDvsr07Xy5QXIjExPrg== X-Received: by 2002:a05:600c:2318:b0:3f1:72ec:400d with SMTP id 24-20020a05600c231800b003f172ec400dmr13534176wmo.33.1683105479081; Wed, 03 May 2023 02:17:59 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 03/10] trace: remove vcpu_id from the TraceEvent structure Date: Wed, 3 May 2023 10:17:49 +0100 Message-Id: <20230503091756.1453057-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105497662100001 This does involve temporarily stubbing out some helper functions before we excise the rest of the code. Message-Id: <20230420150009.1675181-4-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- 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 *e= v) =20 static inline uint32_t trace_event_get_vcpu_id(TraceEvent *ev) { - return ev->vcpu_id; + return 0; } =20 static inline bool trace_event_is_vcpu(TraceEvent *ev) { - return ev->vcpu_id !=3D TRACE_VCPU_EVENT_NONE; + return false; } =20 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 =3D 0; events[i] !=3D NULL; i++) { events[i]->id =3D next_id++; - if (events[i]->vcpu_id =3D=3D TRACE_VCPU_EVENT_NONE) { - continue; - } - - if (likely(next_vcpu_id < CPU_TRACE_DSTATE_MAX_EVENTS)) { - events[i]->vcpu_id =3D next_vcpu_id++; - } else { - warn_report("too many vcpu trace events; dropping '%s'", - events[i]->name); - } } event_groups =3D g_renew(TraceEventGroup, event_groups, nevent_groups = + 1); event_groups[nevent_groups].events =3D 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)) =20 for e in events: - if "vcpu" in e.properties: - vcpu_id =3D 0 - else: - vcpu_id =3D "TRACE_VCPU_EVENT_NONE" out('TraceEvent %(event)s =3D {', ' .id =3D 0,', - ' .vcpu_id =3D %(vcpu_id)s,', ' .name =3D \"%(name)s\",', ' .sstate =3D %(sstate)s,', ' .dstate =3D &%(dstate)s ', '};', event =3D e.api(e.QEMU_EVENT), - vcpu_id =3D vcpu_id, name =3D e.name, sstate =3D "TRACE_%s_ENABLED" % e.name.upper(), dstate =3D 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): =20 out('}') =20 - # tracer wrapper with checks (per-vCPU tracing) - if "vcpu" in e.properties: - trace_cpu =3D next(iter(e.args))[1] - cond =3D "trace_event_get_vcpu_state(%(cpu)s,"\ - " TRACE_%(id)s)"\ - % dict( - cpu=3Dtrace_cpu, - id=3De.name.upper()) - else: - cond =3D "true" + cond =3D "true" =20 out('', 'static inline void %(api)s(%(args)s)', --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105545; cv=none; d=zohomail.com; s=zohoarc; b=U26p4s85NzMsVaxd6Dk1lSuxXDLOmKHEaXoaL7YfQqO5AknjsTS/MAZTuHoMPSeZpx3knsCbHoybycZcgyBNOqDdzaVym3WqICIpsJ0U0k/7ITMRKDnbLOXLpLWROFSQH0C+g2a78eLDK2HfU50WtJ1PEaWZyEvGmKChFwELCXI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105545; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Z+2ARsKrUE4IDGgBP183cB95dxoDFN2S1gyD75E2rZs=; b=f79yPHNW0xz1QLbYsRYHTJ8BmcUFUa2twTp0y2k7huq7pPWmCkpGcqVFaEj3vMO1fXsExXOIkDlmGLgRxDFTCDMTxv9QyaErDSkJ0j/oejrW+BHb2DUPoKCdsFYKAu60ZsRU5V7o5Y+BYvMsYgjNxQI8VcvYWZLmeDnj8NOBlRk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 168310554504954.6716783377052; Wed, 3 May 2023 02:19:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8ce-0002y2-Ai; Wed, 03 May 2023 05:18:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pu8cd-0002o3-2m for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -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 1pu8ca-0000Lq-RL for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:02 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3063afa2372so1369071f8f.0 for ; Wed, 03 May 2023 02:18:00 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r3-20020adfda43000000b003047ae72b14sm24929980wrl.82.2023.05.03.02.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 70C1D1FFC1; Wed, 3 May 2023 10:17:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105479; x=1685697479; 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=Z+2ARsKrUE4IDGgBP183cB95dxoDFN2S1gyD75E2rZs=; b=jhj03op2h/snNh+exJmyTrSNN4Npp7WpHimKm9BFMp3XNtK6tMD9gpceZt4RDFnEAm NbWnzFZtVeL1cbyGGsZoK6ZDyNXNQsjV9EdCYfUXepMdz7yEmI2IlzIyMiJ9dzYyf/LT DBFo4yNfmQ+o3kl8zOF3jXPt6bzVtEnlI31yAgyyfyd6UIaTme1Zp9fYZLfdAgLJS88v cytUh+9gq3yJJblyiqd9vdX34vIo8qWGCWdwhPBnY9EtTVeiPwHIscFAKjJpq19BDCUX 6RijgNXUGfu4NO0Kzf+DsOcblISL5Ujg734MOBpUcChI7SqIOEm4knVgNmHyDPkGUset ylhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105479; x=1685697479; 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=Z+2ARsKrUE4IDGgBP183cB95dxoDFN2S1gyD75E2rZs=; b=AEFhcm1ljk1JHjD+9Sb7aJjnvdHZbO4wdcGONFfj+ltsRFhIRpqnIsC7WOg3fOPwjb mdUNOMTkNLauAXf+SuVjr/XQ8c8VjxShd80YwmC7EqB2w1L2cHDFhmALRxX5gpsX98lR EihrbC3Vfes2MqsDLbPxgxv5AM/ti8gH0HLtJj0UElCtM643daVU8W/o5GDG1bNPc1cQ GKvqh2vq1deM1jhKE4PpasQNzJrFTmx6KVVx99vmG/liCLFy7XRCoLig1Las65y9tX72 wEpa1jy1MH7SdLa8PpC1AhqzCDw/0QR/sAn7jGFIdcikd/5SWewobRKEFbVseH4YVlS2 o+QA== X-Gm-Message-State: AC+VfDxyLBfY7BVQwnLTr7QcEbmRbXTjVVvwkDHzO9nkQm8e/f0wLEv7 p2DL4XjZUPyF8QugTlqQl5zWcw== X-Google-Smtp-Source: ACHHUZ5LPs6TN3ZgFRbFM8Ldm/1TJaEF4FNxQ3W0YmVBqGW4exErAOj1PAoR7HhFWrV7F9ASkCfXfQ== X-Received: by 2002:a5d:6a83:0:b0:2f3:e981:f183 with SMTP id s3-20020a5d6a83000000b002f3e981f183mr15789311wru.10.1683105479379; Wed, 03 May 2023 02:17:59 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 04/10] scripts/qapi: document the tool that generated the file Date: Wed, 3 May 2023 10:17:50 +0100 Message-Id: <20230503091756.1453057-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105545507100001 This makes it a little easier for developers to find where things where being generated. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- 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 8f8f784f4a..e724507e1a 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@ -162,7 +162,7 @@ def __init__(self, fname: str, blurb: str, pydoc: str): =20 def _top(self) -> str: return mcgen(''' -/* AUTOMATICALLY GENERATED, DO NOT MODIFY */ +/* AUTOMATICALLY GENERATED by QAPIGenC, DO NOT MODIFY */ =20 /* %(blurb)s @@ -195,7 +195,7 @@ def _bottom(self) -> str: =20 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' =20 =20 @contextmanager --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105531; cv=none; d=zohomail.com; s=zohoarc; b=ElD9SuG66RaR9WybDfgk6App3u63sm2I3dwT19gGf9E3GwFVPuVzYULxs5YVQ7Lw1OGZKnAiNQFLRGvzUb5MVPmtAu0xz0Cqcugc4TlGt5pn2MCPuMB8uWUw1c5CgCWcUcYdUZTiqN3cr0TNF0A21YIQ80sw38BKIKoTovQI99E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105531; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HhmcuF0/XnbOqyb1HjLMiE2Zylh3hHKPmhLHcsVGruI=; b=X/wxo85j/rGXbja3/f4v+GoALWwr740qMlkzfXYRlthrsLmcIEL1bTLzCrJCTolQN3Cmixsr0O62z6rVXTH4KwYAM2IXwMDRUVEc/wGeWbtESpc1T/nhKy0SO1jnJf45nz2U3pZTwqUhEqJS59l58Q0CaN0eIGJUl4f8s2r6ND0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683105531457295.5239977558631; Wed, 3 May 2023 02:18:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8ch-0003Jo-QD; Wed, 03 May 2023 05:18:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pu8ce-0002wt-4H for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:04 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cb-0000Lt-Lt for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-2f58125b957so4864440f8f.3 for ; Wed, 03 May 2023 02:18:01 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t15-20020adfe10f000000b00304832cd960sm23319951wrz.10.2023.05.03.02.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:59 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 88B951FFC2; Wed, 3 May 2023 10:17:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105480; x=1685697480; 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=HhmcuF0/XnbOqyb1HjLMiE2Zylh3hHKPmhLHcsVGruI=; b=qLEp+nG1f3adaolUGZ6GSck6bsB3/e8KafzOWa7UzMgPRSBsU6B0jg8Pobyoy0X4ky EbnW/W59JcXvrVmBDDRs/JzGlBAYmnA+sPaMUOaNIVQlAiv886VoxDg8s5GcUF4X6ol8 70hSXHVoQR1HbyxDL0Opm/GePhPXsTLBgbCmpelh3vizn7a2lkHjAczFMhhhxUeG4JSU VlfNP+cw3ikIKl0DlzaXSRg2hx51Kg3R+DQ8QYZ2JOnV5BS/QlBqqXD3TNQO/gNr9Ijh MAc0xDUrR6kqrJode+ZFj6j3LfDeFgvzjO+q/KgiQl6BccVKHEG5e//WCSKmrRlTRg4U D36Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105480; x=1685697480; 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=HhmcuF0/XnbOqyb1HjLMiE2Zylh3hHKPmhLHcsVGruI=; b=RrSsECf20xW4JVHHqQkpxWiB1bKK+CJ675o2+vAtXEz+al9a54UE9bv5KEW3fj75xa p8K9HAU+ZvrefcILp7VTlF/X903++U+OjOjI3TzuZVCqPmPgxc25Zm/qLQb6SvPBWWCQ j5dp0VcZUOOPRaFfIjRCTLbWEUC2obJLi5A5YAjTmPPmi75M5un3Efn33H27tZvpqo49 gtodJWcY9KvpuAEwwJ+LW2AdaZYN+zdJQpDiyScyNWlphHmU+nZRNgD52EQb25YkCLnC dd9BOv1qog8urzDhjJ7TRaThHTqoC7iRUkmyt/SYMpX40ZlZxB9VGXJZ1GkY4byuympf cSnQ== X-Gm-Message-State: AC+VfDwCJoX9QPfNeZf5O2r+OZ8rjgg86Da3pFaO3bnRPVYeLoBZmVWH ADCwNMQw1RXEPdMFry/qwl+WVQ== X-Google-Smtp-Source: ACHHUZ7HmZxq9LpFYr/7s3AsjpyUTwbB1s7qLjvYXOEQPjKrEaEYCPsO2T0BtBE48q6PyRsOUz1gog== X-Received: by 2002:adf:cc85:0:b0:306:34ae:6a16 with SMTP id p5-20020adfcc85000000b0030634ae6a16mr4304809wrj.35.1683105480039; Wed, 03 May 2023 02:18:00 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 05/10] qapi: make the vcpu parameters deprecated for 8.1 Date: Wed, 3 May 2023 10:17:51 +0100 Message-Id: <20230503091756.1453057-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105531718100001 I don't think I can remove the parameters directly but certainly mark them as deprecated. Message-Id: <20230420150009.1675181-6-alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- qapi/trace.json | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/qapi/trace.json b/qapi/trace.json index f425d10764..de6b1681aa 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-ev= ents" # 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 "vc= pu" property, -# an error is returned. +# There are no longer any per-vCPU events # # Since: 2.2 # @@ -84,17 +80,13 @@ # @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 eve= nts, -# 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 matc= h. # # Since: 2.2 # --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105511; cv=none; d=zohomail.com; s=zohoarc; b=iFOpAiRLNw2/+bw7RMW+S7N4hxO/vFo9+ZuSzsARxb49EG+Friq6kUyQ47mNtrhrhk665WsSQ/uTbcgPvtbxSo4sR545pkjDxG5UCxJhgARqOtu6g9DBsmyt44jaCdzGCSdjZz5o8mLNPlKN/s+fQjumLaqBxh1rh1sY4iu0GQg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105511; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZQsGi60INw/0OukH3jlS0r0tU9G4mIe+6CYIPnGJyEQ=; b=AiEPFe9LMB9NoeqtDhgFt5VLeppnHcluwt+ow/V6PMpijyJ+wLMUGbUSGl7IyjsBGDBL0Ll7cn2i7fDpAPhVE24OAb7cW674wAlBb5BcYDu02LjPK6TrdR3cVeE2GC5hlEQRl0lI9dbZWZ/QozzZvypgn9UJSFJLQJSNu0CoT6s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683105511656510.7989272028069; Wed, 3 May 2023 02:18:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8ck-0003aM-66; Wed, 03 May 2023 05:18:10 -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 1pu8cf-00036s-Jr for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:05 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cc-0000M1-5S for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:05 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f3331f928cso30251555e9.2 for ; Wed, 03 May 2023 02:18:01 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w12-20020a5d680c000000b0030630120e56sm6591790wru.57.2023.05.03.02.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:59 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B4FB11FFC3; Wed, 3 May 2023 10:17:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105480; x=1685697480; 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=ZQsGi60INw/0OukH3jlS0r0tU9G4mIe+6CYIPnGJyEQ=; b=xPI/4fQG3AzNrcZJoBRYy6vYkXHaogntnLp3nadPG9RBYDUVMTGLfLVOlGgkzA1T+/ wvtnqj1q3nCiJ86f19AcRgqoYDn1dmt7BRTHZhpsr6/tWxrtR/OZbZ1XW2jETSHz7cWj zpB4B0E3iUYMf1L3u+SQfR9MAq6aVl59l6UsyWBN/M/2I980/4IombU7lHW1IOWtvpRR D+F+pGq2fb4A6xTYbKfIGt1X4z7BNvqjHdydTqxtJX+QgkfwVIgFZOX66vAD0stZSTf0 bB4Ia+pFN0/MmUOSH83FTICwuaTCkppeNNCJ1HMiF4DEi3pQ/fLuPxmbfs9X3Jehcetw R1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105480; x=1685697480; 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=ZQsGi60INw/0OukH3jlS0r0tU9G4mIe+6CYIPnGJyEQ=; b=ZVbekDGIZv9jTnc6Zc/EWt7D37bvHuJBNYAHK8bEQZ2JI9zJdTe2mzaO3GpeIxTbF2 ckLuXsXIyX5ecF/BO+NuDYMgcmGCbIdKyqmil2Wt9DyDaO9//4dHNVJBplLb/9Dt9Dd2 QIgKoHuIGZutLZtp4UP/vV3N3MkROMXSNQrMYK4ZNbGBr/1/4w+aQ4UY4tYpJTTWAj+j 8/Ro8NfwkyBxcrT5Tark3x9eQeXy2R1toHoi08WZ/3mB/Hi85zpZvQAHUJGZZTNO8Y4w aituYyYbhIpLYi+xPnYmlywOQH5+ZNTuaVmcsTNxfQxWGbU76+chDCk/z0UcTXbOx4yj 7SuQ== X-Gm-Message-State: AC+VfDxQhpG42THgneFqZUNQWkjxuKVUbHSM5XNuC6hgLwzMxhybyQU3 8P2EpPy8nyxGvEB8ZuX2G8gzeQ== X-Google-Smtp-Source: ACHHUZ4z9ixcZQciIb/gf23jVxLBUy7vypPgooTXnhNgYoB/ANBeyB4gYaBTIABIhrycLO+XTIYDBg== X-Received: by 2002:a5d:554c:0:b0:2dc:c0da:409 with SMTP id g12-20020a5d554c000000b002dcc0da0409mr14428977wrw.27.1683105480246; Wed, 03 May 2023 02:18:00 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 06/10] trace: remove code that depends on setting vcpu Date: Wed, 3 May 2023 10:17:52 +0100 Message-Id: <20230503091756.1453057-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105513730100001 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. Message-Id: <20230420150009.1675181-7-alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- 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; } =20 -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 !=3D 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)) =20 -/** - * 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" =20 static inline bool @@ -51,13 +44,4 @@ trace_event_get_vcpu_state_dynamic_by_vcpu_id(CPUState *= vcpu, } } =20 -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 =3D 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); =20 -/** - * 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-specif= ic - * (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); =20 -/** - * 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) =3D=3D true - * - * Note: Changes for execution-time events with the 'tcg' property will no= t be - * propagated until the next TB is executed (iff executing in TCG mo= de). - */ -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); =20 -/** - * 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 951477a7fd..f4e51c8a1b 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -211,7 +211,6 @@ static void cpu_common_realizefn(DeviceState *dev, Erro= r **errp) } =20 /* NOTE: latest generic point where the cpu is fully realized */ - trace_init_vcpu(cpu); } =20 static void cpu_common_unrealizefn(DeviceState *dev) @@ -219,7 +218,6 @@ static void cpu_common_unrealizefn(DeviceState *dev) CPUState *cpu =3D CPU(dev); =20 /* NOTE: latest generic point before the cpu is fully unrealized */ - trace_fini_vcpu(cpu); cpu_exec_unrealizefn(cpu); } =20 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) =20 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 !=3D 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 =3D *ev->dstate; - if (state_pre !=3D state) { - if (state) { - trace_events_enabled_count++; - *ev->dstate =3D 1; - } else { - trace_events_enabled_count--; - *ev->dstate =3D 0; - } - } - } -} =20 -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 =3D trace_event_get_vcpu_id(ev); - state_pre =3D 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 =3D *ev->dstate; if (state_pre !=3D state) { if (state) { trace_events_enabled_count++; - set_bit(vcpu_id, vcpu->trace_dstate_delayed); - (*ev->dstate)++; + *ev->dstate =3D 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 fr= om a - * single set of dstate values to ensure consistency of genera= ted - * tracing code. - */ - async_run_on_cpu(vcpu, trace_event_synchronize_vcpu_state_dyna= mic, - RUN_ON_CPU_NULL); - } else { - trace_event_synchronize_vcpu_state_dynamic(vcpu, RUN_ON_CPU_NU= LL); - } - } -} - -static bool adding_first_cpu1(void) -{ - CPUState *cpu; - size_t count =3D 0; - CPU_FOREACH(cpu) { - count++; - if (count > 1) { - return false; - } - } - return true; -} - -static bool adding_first_cpu(void) -{ - bool res; - cpu_list_lock(); - res =3D 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 =3D trace_event_iter_next(&iter)) !=3D 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 =3D=3D 1); - /* disable early-init state ... */ - *ev->dstate =3D 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 =3D 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 } =20 -void trace_fini_vcpu(CPUState *vcpu) -{ - TraceEventIter iter; - TraceEvent *ev; - - trace_event_iter_init_all(&iter); - while ((ev =3D trace_event_iter_next(&iter)) !=3D 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" =20 =20 -static CPUState *get_cpu(bool has_vcpu, int vcpu, Error **errp) -{ - if (has_vcpu) { - CPUState *cpu =3D qemu_get_cpu(vcpu); - if (cpu =3D=3D 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_p= attern, +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_unav= ailable, bool is_pattern return false; } =20 - /* 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 cha= r *name, bool has_vcpu, int64_t vcpu, Error **errp) { - Error *err =3D NULL; TraceEventInfoList *events =3D NULL; TraceEventIter iter; TraceEvent *ev; bool is_pattern =3D trace_event_is_pattern(name); - CPUState *cpu; - - /* Check provided vcpu */ - cpu =3D get_cpu(has_vcpu, vcpu, &err); - if (err) { - error_propagate(errp, err); - return NULL; - } =20 /* Check events */ - if (!check_events(has_vcpu, true, is_pattern, name, errp)) { + if (!check_events(true, is_pattern, name, errp)) { return NULL; } =20 @@ -93,33 +65,17 @@ TraceEventInfoList *qmp_trace_event_get_state(const cha= r *name, trace_event_iter_init_pattern(&iter, name); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { TraceEventInfo *value; - bool is_vcpu =3D trace_event_is_vcpu(ev); - if (has_vcpu && !is_vcpu) { - continue; - } =20 value =3D g_new(TraceEventInfo, 1); - value->vcpu =3D is_vcpu; value->name =3D g_strdup(trace_event_get_name(ev)); =20 if (!trace_event_get_state_static(ev)) { value->state =3D TRACE_EVENT_STATE_UNAVAILABLE; } else { - if (has_vcpu) { - if (is_vcpu) { - if (trace_event_get_vcpu_state_dynamic(cpu, ev)) { - value->state =3D TRACE_EVENT_STATE_ENABLED; - } else { - value->state =3D TRACE_EVENT_STATE_DISABLED; - } - } - /* else: already skipped above */ + if (trace_event_get_state_dynamic(ev)) { + value->state =3D TRACE_EVENT_STATE_ENABLED; } else { - if (trace_event_get_state_dynamic(ev)) { - value->state =3D TRACE_EVENT_STATE_ENABLED; - } else { - value->state =3D TRACE_EVENT_STATE_DISABLED; - } + value->state =3D 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 =3D NULL; TraceEventIter iter; TraceEvent *ev; bool is_pattern =3D trace_event_is_pattern(name); - CPUState *cpu; - - /* Check provided vcpu */ - cpu =3D get_cpu(has_vcpu, vcpu, &err); - if (err) { - error_propagate(errp, err); - return; - } =20 /* Check events */ - if (!check_events(has_vcpu, has_ignore_unavailable && ignore_unavailab= le, + 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 =3D trace_event_iter_next(&iter)) !=3D 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 =3D qdict_get_str(qdict, "name"); bool new_state =3D qdict_get_bool(qdict, "option"); - bool has_vcpu =3D qdict_haskey(qdict, "vcpu"); - int vcpu =3D qdict_get_try_int(qdict, "vcpu", 0); Error *local_err =3D NULL; =20 - 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, vc= pu, &local_err); + qmp_trace_event_set_state(tp_name, new_state, true, true, false, 0, &l= ocal_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 =3D qdict_get_try_str(qdict, "name"); - bool has_vcpu =3D qdict_haskey(qdict, "vcpu"); - int vcpu =3D qdict_get_try_int(qdict, "vcpu", 0); TraceEventInfoList *events; TraceEventInfoList *elem; Error *local_err =3D NULL; @@ -89,12 +80,8 @@ void hmp_info_trace_events(Monitor *mon, const QDict *qd= ict) if (name =3D=3D NULL) { name =3D "*"; } - if (vcpu < 0) { - monitor_printf(mon, "argument vcpu must be positive"); - return; - } =20 - events =3D qmp_trace_event_get_state(name, has_vcpu, vcpu, &local_err); + events =3D qmp_trace_event_get_state(name, false, 0, &local_err); if (local_err) { error_report_err(local_err); return; --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105568; cv=none; d=zohomail.com; s=zohoarc; b=VqN2z7p4h0H8v5uwZjICIIZlPifGHKxHmRleJkmwnU1fW0+8aKS0YQaKGSkmZ8Uh5GEPyo6LB5LW+IdzAPhe2PpaZ3v+ZrdNbpxAsbI7bCpvG780CYR7Hkw6j7p+EFqirIAAA5SyvZSFS0kdmS86kdcuNnoTrLi97+jwrsUPTFw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105568; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=R0xmDVAIv0XD4yi7vmosoJPR2UzMLoDsipcZ6y9UWA8=; b=QWB3bQN6RBhlumlG+p5s0HeMV4EGYRMx2y99x/8T8IsOABrSn+QnfU9YvphZXO2jznvieevo6zrX637sIRk/+MYRevqj1o8FL6APAd16Vw+mBwZmCexQpeqMBAkjopumv59xdkooe8UVW7HaNAIVM7TuiTR3DWpcbJ03fr1TPAU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 168310556842698.77772556997365; Wed, 3 May 2023 02:19:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8cl-0003nH-5m; Wed, 03 May 2023 05:18:11 -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 1pu8cf-00037v-Tq for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:05 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cd-0000Me-8v for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:05 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-30644c18072so202516f8f.2 for ; Wed, 03 May 2023 02:18:02 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id f12-20020a5d4dcc000000b0030630de6fbdsm6384679wru.13.2023.05.03.02.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:59 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D051F1FFC4; Wed, 3 May 2023 10:17:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105481; x=1685697481; 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=R0xmDVAIv0XD4yi7vmosoJPR2UzMLoDsipcZ6y9UWA8=; b=KsPt7by+E7mfN4KvGnGlKmQjn+sBIvTGZnjVCFkDFPGs7bPHVZVQng2hhEtAAewZ1x iml+RaBoUkWouOs01zTFz/4qidPMmFd1FHk3Lkodo5bwONIivBmT7dciIBoEwRNcYhJW 4r0ea07TjUqZdvliL2G66AVU9wdztPXJyzqRzVpLqKoi7Va3JOdl51HL0uba1AYWRoSZ ERvkwaFnWuJ+zuXBoMs8pqNWdrYVR5xh9jwXKP6jG5cCag0t3Z7J+/x9ihBZLjQoDP64 g13t9WkjGx6IPDXD3gVYuefpnVRGa/FJ0rYlCXoPggxM+ImL5U0QXr5XNOtSD14G4P0W stiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105481; x=1685697481; 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=R0xmDVAIv0XD4yi7vmosoJPR2UzMLoDsipcZ6y9UWA8=; b=ZQhOBFjyJ4swLc7BWWGMWAjz8tCgOS46ovsm/J2zhUba4a8BrDV/J6VNCUmr7Sd7Qq RRtzsOiKDqff4Oz7tUcKWnqP32F2P9sNi0US1L8T2+vXh3MsIv0Q1QOloQ6N2F5VtKWK rjnkCO3JiI9Wcd4UKrCYZvO15w9t1pBRsrJFYcxb/rhTtYCbi3bqc4ZqaCVRnkjNMYJt Yk1rFpAhiAmusqSuSxkOUKC3QAZ7ClcOEFXu+j0Wp1ZItYT82Y57iVDYhNyhg10kc7mI UbuuD3MFonLrUNP+xBM1hsOGs/LnflVtwqPBAmVmHs8jSX3jIpZGlr9ejCJX/TXQ+obq iVUA== X-Gm-Message-State: AC+VfDzMpTeEek2OurCb2YIYjFkBxC23JqVJ3UTHd60T5oPUT/ULCTiP UyLhbmRMkd2iLI22wYgxR0fj7w== X-Google-Smtp-Source: ACHHUZ5xndH5W3t0cqYXG4CbUY5/HcSZyXZ2FOZP+GP0GVRUGUkcs4U5MIr1e0RKF/5DYK0vAup1eg== X-Received: by 2002:a5d:4d90:0:b0:305:e8db:37df with SMTP id b16-20020a5d4d90000000b00305e8db37dfmr9850355wru.22.1683105481339; Wed, 03 May 2023 02:18:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 07/10] trace: remove control-vcpu.h Date: Wed, 3 May 2023 10:17:53 +0100 Message-Id: <20230503091756.1453057-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105569968100001 Now we no longer have vcpu controlled trace events we can excise the code that allows us to query its status. Message-Id: <20230420150009.1675181-8-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- 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=C3=ADs Vilanova - * - * This work is licensed under the terms of the GNU GPL, version 2 or late= r. - * 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 giv= en - * vCPU. - * - * If the event has the disabled property, the check will have no performa= nce - * 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" =20 =20 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 @@ =20 =20 def generate(events, backend, group): - if group =3D=3D "root": - header =3D "trace/control-vcpu.h" - else: - header =3D "trace/control.h" + header =3D "trace/control.h" =20 out('/* This file is autogenerated by tracetool, do not edit. */', '', --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105545; cv=none; d=zohomail.com; s=zohoarc; b=ht5CCnexeR8tQKr5DkMssHcMO4D+Il61krVArl3TuloO6f9kmXy4HhkQd3Wy0Pu7AwbtiHk67nXk+PpvQVT7wXQmxELU1A0FmipdLPr24BH+IBbntIavQO/AlvNCgozHCahI5vMwHtmYOE7S520zY524UKloKXxjCfp8HrYtR8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105545; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qJAOJ4EXHACimrdHAT+8NGgN7/duYCO4RM5TtjB7UUU=; b=J7uJilZQe4baq8PKPELK4bj3wqt9FNcPrFNEJkSQHH5v0hGPqnomy29sGPGPlvboyPSI6fY4d5tm/GNdBo+HkmbG73SoPFUJX5Ds+ZHD/QfdpC56Bk8wMbLUTHcS0tKO5/+L3szO/xWLcpHI5F6mC/vJQM5fgmxzQQU7K177B5s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683105545306427.0368203538711; Wed, 3 May 2023 02:19:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8ci-0003QX-Mq; Wed, 03 May 2023 05:18:08 -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 1pu8cf-00033h-1B for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:05 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cc-0000M6-2x for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:04 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f19323259dso48219755e9.3 for ; Wed, 03 May 2023 02:18:01 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id f6-20020a5d6646000000b002f6dafef040sm33171644wrw.12.2023.05.03.02.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:59 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 008C11FFBB; Wed, 3 May 2023 10:17:58 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105480; x=1685697480; 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=qJAOJ4EXHACimrdHAT+8NGgN7/duYCO4RM5TtjB7UUU=; b=NYAhGaNbj7u6WLMN2Dp9jE+zf3B2g4FN+pn1KwMYHcGTvpeDUnEm3yGZq5zpWbAiAv 5gFpozX4d+gFZBsbfsDBCX6aVUNlYWvMKfB0iQDNvxdnrJj3yY4RFfkYwBxDGLexhr2w IGDd64GKrg6MvZVKLn2j4QM/IP92Frnw4ASKFhwUsNEDjMcPtvSMErqCLIh8aT3iQVTF Y8HH3gFi4u5zmDVh1wsFK1fGYspmxOYqiHxMlR79Mg4VbTLnrs2ouSKNM+Vso8bs2ki6 Wmr+tYxMDMpWsLNfRKTisYlRgVi9ks1BKFicDmuLd/KmgaHCyedtNrwXsJEZFxfg8YHG SqQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105480; x=1685697480; 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=qJAOJ4EXHACimrdHAT+8NGgN7/duYCO4RM5TtjB7UUU=; b=GE/PQHZeigXc9EMp/QRQi0+R9nAmAeszki4YY9lcSPTfXrJDau7g3Nix2r8w9tbCfp kdoXJpUWGx73kLCEPrcBV2GzFp4RY1J4ulhEbqDXI7BmXHhCFdZWV+AbZr0Ue2qTK5Qf SHcqgeTMCFQgJa5/SRxdvNvijiSyPRhXtJc4kVjdvFkX1x/5+32JAaiTZHLnpy8Z+1s/ pYvPCAcFIU8o2XGBI3mm+8em+vtzapuBBFQS1bp/qOT1FxbdeCR62jTcbdzII8upU5vf I3nqNLqg77ve1BAQrlmf9DVW8wH3agwPLwS6kA8BJvtqXUgnT/tryFjRImjIcIiyT6Ov +9Dg== X-Gm-Message-State: AC+VfDy0aU23Uq5hkfONGofBUrEJz1eruaj/rI+9o3prIC8ihKZg9pOU /ut9qnAAdeQM1/x7zzcqcrfMTw== X-Google-Smtp-Source: ACHHUZ58RISC1wthGKD2/ZYkLzssVTlWt5jSCQyh0Tk+USncDa71nanQYkF+BhzH+CkaUnVUL7szxA== X-Received: by 2002:a5d:5602:0:b0:306:32be:f0f8 with SMTP id l2-20020a5d5602000000b0030632bef0f8mr4992696wrv.20.1683105480522; Wed, 03 May 2023 02:18:00 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 08/10] tcg: remove the final vestiges of dstate Date: Wed, 3 May 2023 10:17:54 +0100 Message-Id: <20230503091756.1453057-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105545877100005 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 Message-Id: <20230420150009.1675181-9-alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- 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(targe= t_ulong pc) #endif /* CONFIG_SOFTMMU */ =20 static inline -uint32_t tb_hash_func(tb_page_addr_t phys_pc, target_ulong pc, uint32_t fl= ags, - 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); } =20 #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 =20 - /* 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_c= pu_data data); struct qemu_work_item; =20 #define CPU_UNSET_NUMA_NODE_ID -1 -#define CPU_TRACE_DSTATE_MAX_EVENTS 32 =20 /** * CPUState: @@ -403,10 +402,6 @@ struct CPUState { /* Use by accel-block: CPU is executing an ioctl() */ QemuLockCnt in_ioctl_lock; =20 - /* 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); =20 #ifdef CONFIG_PLUGIN diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index bc0e1c3299..973da2a434 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; }; =20 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) =3D=3D desc->page_addr0 && tb->cs_base =3D=3D desc->cs_base && tb->flags =3D=3D desc->flags && - tb->trace_vcpu_dstate =3D=3D desc->trace_vcpu_dstate && tb_cflags(tb) =3D=3D desc->cflags) { /* check next page if needed */ tb_page_addr_t tb_phys_page1 =3D tb_page_addr1(tb); @@ -228,7 +226,6 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu= , target_ulong pc, desc.cs_base =3D cs_base; desc.flags =3D flags; desc.cflags =3D cflags; - desc.trace_vcpu_dstate =3D *cpu->trace_dstate; desc.pc =3D pc; phys_pc =3D get_page_addr_code(desc.env, pc); if (phys_pc =3D=3D -1) { @@ -236,7 +233,7 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu= , target_ulong pc, } desc.page_addr0 =3D phys_pc; h =3D 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); } =20 @@ -263,7 +260,6 @@ static inline TranslationBlock *tb_lookup(CPUState *cpu= , target_ulong pc, jc->array[hash].pc =3D=3D pc && tb->cs_base =3D=3D cs_base && tb->flags =3D=3D flags && - tb->trace_vcpu_dstate =3D=3D *cpu->trace_dstate && tb_cflags(tb) =3D=3D cflags)) { return tb; } @@ -282,7 +278,6 @@ static inline TranslationBlock *tb_lookup(CPUState *cpu= , target_ulong pc, tb->pc =3D=3D pc && tb->cs_base =3D=3D cs_base && tb->flags =3D=3D flags && - tb->trace_vcpu_dstate =3D=3D *cpu->trace_dstate && tb_cflags(tb) =3D=3D 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 =3D=3D b->cs_base && a->flags =3D=3D b->flags && (tb_cflags(a) & ~CF_INVALID) =3D=3D (tb_cflags(b) & ~CF_INVALI= D) && - a->trace_vcpu_dstate =3D=3D b->trace_vcpu_dstate && tb_page_addr0(a) =3D=3D tb_page_addr0(b) && tb_page_addr1(a) =3D=3D 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 =3D tb_page_addr0(tb); h =3D 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, =20 /* add in the hash table */ h =3D 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); =20 /* 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" =20 -/* 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; =20 /* Encode VAL as a signed leb128 sequence at P. @@ -348,7 +343,6 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tb->cs_base =3D cs_base; tb->flags =3D flags; tb->cflags =3D cflags; - tb->trace_vcpu_dstate =3D *cpu->trace_dstate; tb_set_page_addr0(tb, phys_pc); tb_set_page_addr1(tb, -1); tcg_ctx->gen_tb =3D tb; --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105556; cv=none; d=zohomail.com; s=zohoarc; b=VbQe/vvmi17BLtVYqwDRLalQ6RtecL/fLvv4WRjs/MboajoX3MkbiLREXlrhJjUBypxk0O0Uewwrol5ArZMdR3+dC9sCVzlD0gftIx2oVr02pyqG1XcYOCr5B6xSzTmoCu3Y5uPk+Ut6POQB/BDaiErt18C2iRpbdKD6Agh/S7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105556; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SIbkDONpT/MgcuDaFYNVS9jJaHe0Is7g3tjeak7dyjM=; b=UVszd99wbA/zF3pnOnbqvzXZo5WXAzpGr947d8He/oM6G3h4ozmjRKFn4znKR6LVtI2pfIRO42HdJmqG4KNp0msK6GvtavTFHi8D+4QYZEXM+3tR89fXHOlm7iZG5rAoFLYIwrK4yWTcY02UkrbIqXuXE2KNHHME3DopwfeMfeA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683105556133538.2851775286931; Wed, 3 May 2023 02:19:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8cj-0003WC-Jy; Wed, 03 May 2023 05:18:09 -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 1pu8cf-00036O-Gt for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:05 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cd-0000Mi-8f for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:05 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-306342d7668so1633000f8f.1 for ; Wed, 03 May 2023 02:18:02 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d15-20020adfe84f000000b002fb60c7995esm33539437wrn.8.2023.05.03.02.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:59 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1850A1FFC5; Wed, 3 May 2023 10:17:58 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105481; x=1685697481; 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=SIbkDONpT/MgcuDaFYNVS9jJaHe0Is7g3tjeak7dyjM=; b=oWZGqr1qhY1le/QYRV8tnYVx096uuF1L+dwFN2sbLHc1JoBFG1PyyfhX51xmUGgQ2i r3gW5jPAafMAagG9a6OBzDeQ8+3sKE8XCCG+wIwDcqPfWdhFecRAErJBUbYMYfNgtHxL 1A3auNvHvpkF7ewqegIuWijsYjIpGSuMcKnW6QS5HZkScgGuWnEVxT+hYm/seAT+XosB VXBdkRQQy+ocL5ghGfjMBtPEFNet7nELftQJaVboC7kz+0QuHdVcr9EXpUvS1yymwfjX 9IEUwIlg9uo4rzS2S2P4+zHLbvnJTTiC0ownfqZpLYEQTH1623FTUl2Zwji11yTUiuy8 CP+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105481; x=1685697481; 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=SIbkDONpT/MgcuDaFYNVS9jJaHe0Is7g3tjeak7dyjM=; b=JRLHdgemfoY2u6oFlGPaQNGXmV46e7h/eAtEAaP0A/HOEq4JKIovlHWOP+E2MjHe11 J4FSgVf0u93TbOWhmWWZtjMiKq9WHmQ7cXGS2PoLT+koGg0mGW+WIMZfjSvS3bu8D35j YIBQuUDcMZLuOaXLBkomzDDhKvNHPZSXJLEKXD+StvD82M24OGQ1JtVXhPVPc9JpKMaR PGB0VG/FW/oYOVGojxyLlQf3H8+fM9iWce5tKrBT0vAjUqzxBRDssStG2Rmk0rl6PZIu eCdzeM6ZRsVOXb/uW/y+E8YMIgm+g1TsPZ+KW7SvtRMFZF7iBHtCXcOh+Czc9pSvlOOK dq8Q== X-Gm-Message-State: AC+VfDyONZGOfonbyZbnlZHK/CWh+ZeQcYqnO8EkQFqtUPrSpCXkbt7U UaC1w/CNfYztFLWCEuUEo333kQ== X-Google-Smtp-Source: ACHHUZ7m5lvEPfRj81aharqBjGfjPJ0nPoEuLrs9IAs3bt0+C6nxKg7Z37+9P+pfm8pfWHZrXMPceA== X-Received: by 2002:a5d:4b50:0:b0:2fb:703d:1915 with SMTP id w16-20020a5d4b50000000b002fb703d1915mr14053322wrs.43.1683105481712; Wed, 03 May 2023 02:18:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 09/10] hw/9pfs: use qemu_xxhash4 Date: Wed, 3 May 2023 10:17:55 +0100 Message-Id: <20230503091756.1453057-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105557759100009 No need to pass zeros as we have helpers that do that for us. Message-Id: <20230420150009.1675181-10-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Christian Schoenebeck Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- 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); } =20 static uint32_t qpf_hash(QpfEntry e) { - return qemu_xxhash7(e.ino, e.dev, 0, 0, 0); + return qemu_xxhash4(e.ino, e.dev); } =20 static bool qpd_cmp_func(const void *obj, const void *userp) --=20 2.39.2 From nobody Wed May 15 00:39:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1683105547; cv=none; d=zohomail.com; s=zohoarc; b=iv1bKW3TFyt/QwZsJrQ9z7UZCIw7jK2Lfj5X55GATuQispOCD5LszdHzYKo5X+dIxjaO9WA6FvgiQglBXl3DBGxGvnQjJDch4IBIKagirrEBHymWPUTP0Z8Wxx4EBfuTAJ6qBBboY3ZAV3mWr2c1D75uqDhs/+ratkuBqe04sf8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683105547; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WC01IUajOQVovgGje8S9D1xVOHkvVNHazKK2bsSkbgs=; b=V5JTYgtPf95e5qGQsq/k6kkycikcTAYXTHNHzWYZSNgp2QtK8Ly9LSd4YaV1rSU+JXFL5seib1UPSFZ1oRppGs0/5z8fUd1V37niVA/oZENG9jXblQEw1xB7AYP4G1qisW6Pb7AA87WYJKCcCSrSdjmw0dCv74bz5oAo/3x3y/k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683105547369633.9030790107533; Wed, 3 May 2023 02:19:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8ci-0003Mk-8N; Wed, 03 May 2023 05:18:08 -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 1pu8ce-00032d-Qt for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:04 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cd-0000Mg-0w for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:04 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f315735514so15053895e9.1 for ; Wed, 03 May 2023 02:18:02 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t4-20020a7bc3c4000000b003f1745c7df3sm1271469wmj.23.2023.05.03.02.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:59 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2E8391FFC6; Wed, 3 May 2023 10:17:58 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105481; x=1685697481; 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=WC01IUajOQVovgGje8S9D1xVOHkvVNHazKK2bsSkbgs=; b=WoBm1tBuYVLcFWmyFf/X/fgLa1BvNKPO5dsct1X4vwwZVr6MtR0miW3BSOdVoA01vE A4txyu0OM+RXD+POmUPjcntelipDxCPkAHVGBU6ZceSsESK8r80xuk2nJi5/pfz7wE4z vL/8WKJyPvBOeI0Ag9R4quQWC9crw/YlFtTNb/ZQFJvkwsv35YNLuB+6+g+j1DQn/man M13rhJs9C3Rxj9uumKnZNoDOVfzUMuKZQegQCvFyfGYWSqQsDuFlxRAggmtKTyiQpJOV Am73SV9Zu+1V86DlCdmfk9sg4ZZkxcw0eSijywEMEUqlVogs9r9LLNLmZdiqWdeb8xuC cCcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105481; x=1685697481; 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=WC01IUajOQVovgGje8S9D1xVOHkvVNHazKK2bsSkbgs=; b=ZBVm5QXapqjwNhyATBUKFsXXlIFMsJLgBut9uCq6AuurbthZs8nQS76QJKJRkTpxeC z/rwFelrLOfLOLN+bV7HS/3HeH0Y433Bcj38k67+q6y3QDEfadTpi8cISphE+hQFeu+g BEhmK7wdYC0Mt1q3lEUJYXotef/Xwc0aRtXlX1uk0N5ngIcOaaDVm/Q2cz1lOHW0XVvt ecQYAOWsdYnTabRHYUyp2iQA1JAtyAmMa9LCCYfAN+nx6AKaaaQUBXNH1CiRyqAfN63N flF09QqSpuMHq9iNs8y/Q65+VPEGsfATneMSqKMfgbBPjUqFQ28us/k8gxC9QRXG8j77 POlQ== X-Gm-Message-State: AC+VfDyHTU3VVvNy3CTwv0msAbY7p57nfIucdcB/g/+6rBhQLD5UsUsZ kEAABKyuMaNYQd/whSf/nzWjsw== X-Google-Smtp-Source: ACHHUZ6FGT/G7Up6Z4aE0dr/nD/yfuGFPxfueb4qq75dtT+UyR8uSZUPaxxD2hHjkIxTLPMCdpn52A== X-Received: by 2002:a05:600c:1c21:b0:3f1:7371:86bb with SMTP id j33-20020a05600c1c2100b003f1737186bbmr846903wms.20.1683105481532; Wed, 03 May 2023 02:18:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 10/10] xxhash: remove qemu_xxhash7 Date: Wed, 3 May 2023 10:17:56 +0100 Message-Id: <20230503091756.1453057-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1683105549519100011 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. Message-Id: <20230420150009.1675181-11-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Benn=C3=A9e --- 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 =3D QEMU_XXHASH_SEED + PRIME32_1 + PRIME32_2; uint32_t v2 =3D 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 +=3D f * PRIME32_3; h32 =3D rol32(h32, 17) * PRIME32_4; =20 - h32 +=3D g * PRIME32_3; - h32 =3D rol32(h32, 17) * PRIME32_4; - h32 ^=3D h32 >> 15; h32 *=3D PRIME32_2; h32 ^=3D h32 >> 13; @@ -100,23 +97,17 @@ qemu_xxhash7(uint64_t ab, uint64_t cd, uint32_t e, uin= t32_t f, uint32_t g) =20 static inline uint32_t qemu_xxhash2(uint64_t ab) { - return qemu_xxhash7(ab, 0, 0, 0, 0); + return qemu_xxhash6(ab, 0, 0, 0); } =20 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); } =20 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); } =20 /* --=20 2.39.2