From patchwork Wed May 31 19:48:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 687296 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp1441705wru; Wed, 31 May 2023 12:49:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6e9KPYkZHBLcVvU2oQB1tTo1Yj0bZUSR+q/64gwDGaGP/CpfrETtGC3Vm8kJ/ffWWnFcCq X-Received: by 2002:a05:620a:8c0a:b0:75b:23a1:46c with SMTP id qz10-20020a05620a8c0a00b0075b23a1046cmr6245731qkn.50.1685562552577; Wed, 31 May 2023 12:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685562552; cv=none; d=google.com; s=arc-20160816; b=sWOqU+8OrC1Onq9AWz2/uulpTyxkIHgQzVJOpuNqj/L9bwwDgAbmm1DWbyhD9cj300 Vj0PYBjtLtnludwk5+HXQ35S1minAckMV9G26F8Q/OdQnDrbcXETqU1SvUJQBE4oi/3e dO7Ioz2yiyUMrWR29BxNjLmyye06Bjl8L6ldU8pKEMiOZqiJ7jrd2alulpGi1D2+NMxW kqFQDxU3esssMkxfVdOuh/2R3l1szUW+FF0xSEnnmZFLsqWA9RWKw27vvFRC0FhlK92V xYOxwt6/i5X71kwPuyCw5v910hDZ7iH82qaEe59XIm/OGvH8mhlP3gdBYG8oyvGG0HTs 19ag== 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=l0mUomyf/Ox+xXMSaQ9IpuFfwKhp3csXMu7acYo6q+8=; b=FTgT3NjvYOr9nyuEPcuFlNC0jA49tcYeMQGvi2NGa5L5I+Tdrxl5gD3rduOGksevIh gXFvb2FwPTCkbZOx71AXFk41toQpquynyITZ8emB/AjJWQft3ObQkvZc7bjgW/5EbqBV jCzjlMfyTajUQRdl9HgqH8SunY9Mt/5nehrtj4R2mXc7K7aDvCusvrRSb0zfLEk5ZQ1t eUZ1jJUODNP4DCSXelaItZNfxRKbZt/YJo2pIIfHt+gLpJ8taqFrVmPWycOSEj69aW8V KC54+fEkCCBqYdkIan5h+ILKwuoUo49UF3Lc9CDJ4FDHAxXloIZToqLHw873xOY7RMgT BVVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TtrSyaIH; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.133.124]) by mx.google.com with ESMTPS id u8-20020ae9c008000000b0075cf2261b22si3949274qkk.470.2023.05.31.12.49.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 12:49:12 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TtrSyaIH; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685562552; 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=l0mUomyf/Ox+xXMSaQ9IpuFfwKhp3csXMu7acYo6q+8=; b=TtrSyaIHZ+r6c5goxcHJoQYS991dxVRX5hbnYIizEk3K2ytKlJOOWpWutIDZtpKMquNebG TZqyJ/ka9GbCLNsjlzUqQP0GR/8OYNs6a4jD2qMVRZysbLxV7EB5P2Wwl5OnK+EikpJlN5 3qN3dThzxlclP+wP1e641rlyZfc4MpU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-218-A3TbXJ1DNsuZQexBOzpgUw-1; Wed, 31 May 2023 15:49:05 -0400 X-MC-Unique: A3TbXJ1DNsuZQexBOzpgUw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C00EC1C0755F; Wed, 31 May 2023 19:49:02 +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 AA1F0421DF; Wed, 31 May 2023 19:49:02 +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 83EF019465B1; Wed, 31 May 2023 19:49:02 +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 447F419452C1 for ; Wed, 31 May 2023 19:48:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EEE1440CFD4C; Wed, 31 May 2023 19:48:38 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from localhost (unknown [10.39.192.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52B6840CFD46; Wed, 31 May 2023 19:48:38 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PULL 08/11] trace: remove control-vcpu.h Date: Wed, 31 May 2023 15:48:12 -0400 Message-Id: <20230531194815.1508961-9-stefanha@redhat.com> In-Reply-To: <20230531194815.1508961-1-stefanha@redhat.com> References: <20230531194815.1508961-1-stefanha@redhat.com> MIME-Version: 1.0 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 , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , libvir-list@redhat.com, Kyle Evans , Riku Voipio , Richard Henderson , Greg Kurz , Markus Armbruster , Yanan Wang , Stefan Hajnoczi , Michael Roth , Paolo Bonzini , Christian Schoenebeck , Eric Blake , Warner Losh , Richard Henderson Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Alex Bennée 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: 20230526165401.574474-9-alex.bennee@linaro.org Message-Id: <20230524133952.3971948-8-alex.bennee@linaro.org> Signed-off-by: Stefan Hajnoczi --- 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. */', '',