From patchwork Fri May 26 16:53:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 685923 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1025153wrt; Fri, 26 May 2023 09:54:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5WXMSHKDmpvumW/pN+zvx2cvcT+BTw7qiAXb0tgxAb2AifA1CPf0iy9jzpv4NsJdyB3pRB X-Received: by 2002:a05:622a:353:b0:3f6:99f7:bf94 with SMTP id r19-20020a05622a035300b003f699f7bf94mr2673380qtw.62.1685120056788; Fri, 26 May 2023 09:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685120056; cv=none; d=google.com; s=arc-20160816; b=gwCHyt1Qba/9bEHBYm8qc1s3LgC0DPPTFLh6inSEKq59sXUur2blfaK+mrzazPSK0g P85qq3pDQ9bdssLee57pnbt0y4QERD2WBMp6AdrzuPur38urLinGSNTuZopua72edHUV Y88lslYOTCiXCzCLL0u63m0a/xSD45+O0zQbs7IOXGfsjtt5SnzvYHXvv2VEcrX85krq WXyjHP3H5JlaAc2KdBOS0mT3TIj8c0IIQ4n9J5tPNUDxRABzzV4gTZv94f/Q/tpPL08I 4EnYZXMOdW2dPwfItwI6FDTCL2iQTaeBkqAZRsTnBYInvZdvklQzvwsOt3l2q3je4bRY f6Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:sender:errors-to:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to:delivered-to:dkim-signature; bh=jR3hYoNQairvfPLkchXzs2j4mJfUeyks2q4lp9MRHVc=; b=XF/ePxPKEfBhQ36dLSVYy30NbV+K169mpLmCZQ782uuUK6JFwXmZsdPORDOzL2L8vK fxLT2Ij4Oc3wTlnmwTB7VsRi437wGdmpiqjP7ZaG/CQjfcMbwQiXrz3sjp2YNEl8FEjR NWsGrQUk+samrmKZcph2B1anev83TUuBmgLGvzIGKyGKy5mLQqywhm11ZADget8i4E5Y LHcPMi8FQGNF5o4ufy1wCkLvIiqnEqf/TOfqTYsffnywEmZ3tBSyJJsmUmkiuiEohNY6 1pHC5Hz25G8VXfih3G1zewCNsBFXWjwHPv9ZzDpXg/SFP+2afXS4UemwP84rX/kD74bt e2qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gG8UMMIL; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.129.124]) by mx.google.com with ESMTPS id s2-20020ac85cc2000000b003ef499add83si1529996qta.516.2023.05.26.09.54.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:54:16 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gG8UMMIL; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685120056; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jR3hYoNQairvfPLkchXzs2j4mJfUeyks2q4lp9MRHVc=; b=gG8UMMILe5FewBezjqUx/kHaSzlXqIaA7yMh7GrIOUgAdE3hY5wVUHCN7K4jmq5aKcqeVI 8056HSbotidpHAEhNBQEpapqJJokWrlYkwazR5XnIehrOr3ajMpIiBQLb2fmrnOh3hN/hF 5NePBL9BgFpf+SKGvo4NODw4KpVvcRY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-445--h0Zafk0Mx-iAGHOaFTgug-1; Fri, 26 May 2023 12:54:13 -0400 X-MC-Unique: -h0Zafk0Mx-iAGHOaFTgug-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 20949185A7BA; Fri, 26 May 2023 16:54:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0539FC0297C; Fri, 26 May 2023 16:54:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B69371946A46; Fri, 26 May 2023 16:54:10 +0000 (UTC) X-Original-To: libvir-list@listman.corp.redhat.com Delivered-To: libvir-list@listman.corp.redhat.com Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C7FAC19465B7 for ; Fri, 26 May 2023 16:54:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BE85040CFD46; Fri, 26 May 2023 16:54:09 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from mimecast-mx02.redhat.com (mimecast07.extmail.prod.ext.rdu2.redhat.com [10.11.55.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B6AA940CFD45 for ; Fri, 26 May 2023 16:54:09 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9C9BF3C14123 for ; Fri, 26 May 2023 16:54:09 +0000 (UTC) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-440-b1RYypBnOYSH4PHMz75GQQ-1; Fri, 26 May 2023 12:54:08 -0400 X-MC-Unique: b1RYypBnOYSH4PHMz75GQQ-1 Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-3f606912ebaso10057315e9.3 for ; Fri, 26 May 2023 09:54:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685120047; x=1687712047; 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=jR3hYoNQairvfPLkchXzs2j4mJfUeyks2q4lp9MRHVc=; b=cE14adKrAXvj05d709vzUA7oDkxJYjCPntvCDfRX+JCGnE3WKyiD5O5vHo1Mfbu458 eyjs1DPB5EHE1i4KXLGVe1cVhoBGP2OaHohJq2jUbUlXCqal7u8tvgarwqsaV1dqVZRS iPNsWIBvMpsk5Gqt5Peb2h4nONEM46hqfAjOSRuoE4cjo1ccID+2VvD17wlBJRrc2hkV qKzmd3s1tX9YoSiwOR43/aR2lfyiO9A2rgNZnd2Xu7oyJ+K6QT3SGV57PjCo0wv/1g30 oNxc2LmWwzpYBhM0XTuL15w1ECkLQfmsPHE2MaerP7e4pFK/51JSoAHUe+jaaq0web2u c1eg== X-Gm-Message-State: AC+VfDyYs5xJXfbNby9fvEniDqGP/39gJY9+o5359X7I/3nPiqxdKcyN nDrafWBIuGzejMKPHhvQemYnsg== X-Received: by 2002:a1c:7216:0:b0:3f6:476:915 with SMTP id n22-20020a1c7216000000b003f604760915mr2003755wmc.6.1685120046854; Fri, 26 May 2023 09:54:06 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c2-20020adfed82000000b003078a3f3a24sm5647610wro.114.2023.05.26.09.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:54:05 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AF2461FFBB; Fri, 26 May 2023 17:54:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PATCH v6 08/11] trace: remove control-vcpu.h Date: Fri, 26 May 2023 17:53:58 +0100 Message-Id: <20230526165401.574474-9-alex.bennee@linaro.org> In-Reply-To: <20230526165401.574474-1-alex.bennee@linaro.org> References: <20230526165401.574474-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , libvir-list@redhat.com, Kyle Evans , Riku Voipio , Richard Henderson , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Michael Roth , Paolo Bonzini , Christian Schoenebeck , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Now we no longer have vcpu controlled trace events we can excise the code that allows us to query its status. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230524133952.3971948-8-alex.bennee@linaro.org> --- trace/control-vcpu.h | 47 ----------------------------------- trace/qmp.c | 2 +- scripts/tracetool/format/h.py | 5 +--- 3 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 trace/control-vcpu.h diff --git a/trace/control-vcpu.h b/trace/control-vcpu.h deleted file mode 100644 index 800fc5a219..0000000000 --- a/trace/control-vcpu.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Interface for configuring and controlling the state of tracing events. - * - * Copyright (C) 2011-2016 Lluís Vilanova - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - */ - -#ifndef TRACE__CONTROL_VCPU_H -#define TRACE__CONTROL_VCPU_H - -#include "control.h" -#include "event-internal.h" -#include "hw/core/cpu.h" - -/** - * trace_event_get_vcpu_state: - * @vcpu: Target vCPU. - * @id: Event identifier name. - * - * Get the tracing state of an event (both static and dynamic) for the given - * vCPU. - * - * If the event has the disabled property, the check will have no performance - * impact. - */ -#define trace_event_get_vcpu_state(vcpu, id) \ - ((id ##_ENABLED) && \ - trace_event_get_vcpu_state_dynamic_by_vcpu_id( \ - vcpu, _ ## id ## _EVENT.vcpu_id)) - -#include "control-internal.h" - -static inline bool -trace_event_get_vcpu_state_dynamic_by_vcpu_id(CPUState *vcpu, - uint32_t vcpu_id) -{ - /* it's on fast path, avoid consistency checks (asserts) */ - if (unlikely(trace_events_enabled_count)) { - return test_bit(vcpu_id, vcpu->trace_dstate); - } else { - return false; - } -} - -#endif diff --git a/trace/qmp.c b/trace/qmp.c index aa760f1fc4..3e3971c6a8 100644 --- a/trace/qmp.c +++ b/trace/qmp.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qapi/qapi-commands-trace.h" -#include "control-vcpu.h" +#include "control.h" static bool check_events(bool ignore_unavailable, bool is_pattern, diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py index 285d7b03a9..ea126b07ea 100644 --- a/scripts/tracetool/format/h.py +++ b/scripts/tracetool/format/h.py @@ -16,10 +16,7 @@ def generate(events, backend, group): - if group == "root": - header = "trace/control-vcpu.h" - else: - header = "trace/control.h" + header = "trace/control.h" out('/* This file is autogenerated by tracetool, do not edit. */', '',