From patchwork Thu Jun 1 15:06:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 687707 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp406370wru; Thu, 1 Jun 2023 08:07:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7jJp/gn5uHoB8bNVYfu97AGPbGe0SybPvSiPli4Q+vpNvvs1vGRZNPuBKYL2a8pMDJrY2y X-Received: by 2002:a17:907:da9:b0:94e:4b26:233c with SMTP id go41-20020a1709070da900b0094e4b26233cmr2420409ejc.16.1685632053313; Thu, 01 Jun 2023 08:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685632053; cv=none; d=google.com; s=arc-20160816; b=DUyWKftHFH0pMNz6eY30/CqLlgY3e3swXAGYwVmq+MMy+f6mu1AXOzbHIR2uwRxEXN DLibxENzNOg/AIPDR6HIwEFPJBwDD89B3TVwWJP6COFQikqBX+4r1+KIeNwHvKxscOUI mo2kTi53n6G1vZmVZ4aYaI5G9nLJFvET7Bdnb5fnm9qGutMXU/uS9kClfsi19rH/pOgW Rj5qdbCBfUshXAbRwS71ZLan36Gg23hx16RbJcnfF9+plbOR0B34taJxzdMQU2/wzJ88 mx8Zt8qvq6himIlx6JKkrwgc4yZMwfrH0pOQ4jDaK6E3ZX/UcGRsjlnoVm0IrVxmTEk4 qVfg== 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=RGk8hnlCXvv7i4v8ybzKcvLY4U9QSmV28cu/2vgWx1IQFzTQIVGzrrlWnz90x4x4+t Cp6moCD6xXgApKKM6pDhwtywH0NgLXowffLk2C6d7uA75GQp61uYlvk1tv3TGNj2qTyn vTIMiybKEuQp5K5Si8SGnIIOWzaqeWoTQW7pk9O8kxqcwvNAHFUx0KpAhqrtOuVZXM5J EzxuEUyDpVHhHTPNq1NJaE46EYaPEPhaDaGUDbcCgLHguLoH8N+GXfjJyW4JRKv2r9I0 +SxHzJfY9UfNTRzYtqHixps+4k0AHRSlku8MR92qazptKOOIIHVt1VPND8qgJ8oH9ESb 0f0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fFwcgZV8; 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 a6-20020a1709063e8600b0096f7d567661si11924561ejj.414.2023.06.01.08.07.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:07:33 -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=fFwcgZV8; 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=1685632051; 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=fFwcgZV8/qMwqRbaYTL+D+J3eEoa88gNRmOpcDPQBr1GI10zy4XQpwLuccuGIH8Ycp7d/O q5w65OeznKR9OsnVkv+MK6MLk9KyKInGuB1hBunnev1li5f678f1Y0GBflq57ZeIA/n833 OAWo8zV9pS1WtPOLQtqtrT+LnI3Wr0M= 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-168-o6AZp9YcNVWn5S5Sx-8Ofg-1; Thu, 01 Jun 2023 11:07:25 -0400 X-MC-Unique: o6AZp9YcNVWn5S5Sx-8Ofg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 62DD5803499; Thu, 1 Jun 2023 15:07:10 +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 4E79B492B00; Thu, 1 Jun 2023 15:07:10 +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 412F019465A2; Thu, 1 Jun 2023 15:07: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 09E7E194658C for ; Thu, 1 Jun 2023 15:07:10 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EDD4E40CFD47; Thu, 1 Jun 2023 15:07:09 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from localhost (unknown [10.39.194.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CBF840CFD45; Thu, 1 Jun 2023 15:07:09 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PULL v2 08/11] trace: remove control-vcpu.h Date: Thu, 1 Jun 2023 11:06:46 -0400 Message-Id: <20230601150649.1591095-9-stefanha@redhat.com> In-Reply-To: <20230601150649.1591095-1-stefanha@redhat.com> References: <20230601150649.1591095-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 , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , libvir-list@redhat.com, Michael Roth , Riku Voipio , Christian Schoenebeck , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Richard Henderson , 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.9 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. */', '',