From patchwork Tue May 23 12:49:57 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: 684908 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1697684wrt; Tue, 23 May 2023 05:50:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5K0TMbEvdrrzmPhEPASJSpDBgfrZ00Gg2/XKf83/sh5/caPDbZRVPX0ZYCCEO/Eq2xxmhk X-Received: by 2002:ac8:5b85:0:b0:3f5:3991:97c3 with SMTP id a5-20020ac85b85000000b003f5399197c3mr24147825qta.68.1684846226744; Tue, 23 May 2023 05:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684846226; cv=none; d=google.com; s=arc-20160816; b=sQgEdjgeK9+ZWyLD62PVEcwTyN6595FlnlNsoUNLd6P27v03ie3NDaa9w7VfmR6Zj9 /jmqBiHVQbUnaPeQXKjtOP9aUIp3Z01BYkUt+wngy9SVe+cXgmF1tLqExrRLe9430aFy 4/goUZo1kB1p4phnmknIjQHcLzD1FnWltTaE5tv+i8atwUURaCyS9c/ChfaMWtUycPsH GHWASQ6a6f1cdKWuDQqw241naMTjr4wBr4L5YZfTGtWavcDPTAdwnnnKBlnCn6IG5HsQ jCWb2WhoGsPy+I8dYfv1/isXbx6P6U6Lf1nPha3DGxKlk7JY8m9CQJs4VPfIaTz7Uo6g uJ3g== 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=K01VdPgPYNekowAJXeG2Q1UEkTaMboRdvQpIKYeYNGo=; b=FAR7ag9p7bMuSceFIZJLfo/WLA6ZgL6r6laxp9it6pqCCNB5tqSskwaTom9HgwSKT2 3SNrx01M2s/E4zq3nP4L5tdPRGDEj03s/e9Lp/c1dtA6fvX0LWTu1Dk+HpmXKBxTaieR NIe/798sNcNniRMKGbutnL5h+GuuuU7giM7TEXm2MI0BY+Gr0XKU29S8b7AGE3jdrJP3 wfsJW2uCuE2j6LLvNcZA3TUy4K9ao280LmfG+TnHvE/6hEumWdG0w2lfAwjIbWB/jyrr kjOqCaeqAgLTR8NEjHYrIHb2RjIPhUB61kacFor4lVKnd9CqyYYmKlOtstm5lGN3x1Yu PWLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eE++haUz; 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 w3-20020ac87e83000000b003ef5b5c0712si5041559qtj.230.2023.05.23.05.50.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 05:50:26 -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=eE++haUz; 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=1684846226; 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=K01VdPgPYNekowAJXeG2Q1UEkTaMboRdvQpIKYeYNGo=; b=eE++haUzUShKhtgH+znafKcXmtY6ekQpVg9+TADSQvSdsLDH9m2cHUn72YvQf5FIPYwtX/ VtKJNwDh+Jyrmt4LQJKXcPI8j+rHY7YVihWmQEjZfuYMMgFBqIJZ2lhpYYn4bY5O4BDW92 0h5CNYupAS3giCN/GLF9RTXV37EqOaA= 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-161-uwCycPrkNx6rcdXuErMTFA-1; Tue, 23 May 2023 08:50:21 -0400 X-MC-Unique: uwCycPrkNx6rcdXuErMTFA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE39D1859171; Tue, 23 May 2023 12:50:18 +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 B86E7492B0A; Tue, 23 May 2023 12:50:18 +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 2AB8119452D3; Tue, 23 May 2023 12:50:13 +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-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BA34019465BB for ; Tue, 23 May 2023 12:50:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9C77940D1B60; Tue, 23 May 2023 12:50:07 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 951BC40D1B63 for ; Tue, 23 May 2023 12:50:07 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (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 7B1BC85828C for ; Tue, 23 May 2023 12:50:07 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-512-XzYO6e5rNu65nTSr8Mr_Pg-1; Tue, 23 May 2023 08:50:05 -0400 X-MC-Unique: XzYO6e5rNu65nTSr8Mr_Pg-1 Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-309d3e8777cso2544031f8f.0 for ; Tue, 23 May 2023 05:50:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684846204; x=1687438204; 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=K01VdPgPYNekowAJXeG2Q1UEkTaMboRdvQpIKYeYNGo=; b=fPw6uONF4nn+KWGc8QbaFgUEMeA+Hmo0apL0Jq98eHeBmh8PqK2e4IXJziN5JEmiJH HEGDuP958SDQH9z6YOniEKRKHM+/j+CFzUaJ2WhUXczsuV6eN83git3hNkjIRQPvps1p U1Z3J2BQMz2uzKw+GYyiqfkvivMie2VeJ9r9qyVibE+yaIOrDpbZCyepYnSFLsLusQ4t uP7rMC9lmUoSgmykeQrI98KqElEMvCk94UZyfPjUtl6qlSGo0mSfnQhHgPDQhokxR3xJ d91s15lFiPioB27cPohnbp0M5RqHlGPlDrImvJB0aAtLlAhpkORJhJlyeUV/93NL1F2M zQ1Q== X-Gm-Message-State: AC+VfDwjl6PMBbgQJ+ZZjYT9lbVIQE83YUTK22JIzHM9GcEsenUm8NK5 169KrSnXyyU8U0ILmMZ/ABm+tQ== X-Received: by 2002:a5d:4585:0:b0:30a:a165:f95 with SMTP id p5-20020a5d4585000000b0030aa1650f95mr1450124wrq.19.1684846204645; Tue, 23 May 2023 05:50:04 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z16-20020a5d4d10000000b002f6176cc6desm11008898wrt.110.2023.05.23.05.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 05:50:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C8D6C1FFBB; Tue, 23 May 2023 13:50:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PATCH v4 07/10] trace: remove control-vcpu.h Date: Tue, 23 May 2023 13:49:57 +0100 Message-Id: <20230523125000.3674739-8-alex.bennee@linaro.org> In-Reply-To: <20230523125000.3674739-1-alex.bennee@linaro.org> References: <20230523125000.3674739-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.2 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, Michael Roth , Riku Voipio , Christian Schoenebeck , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Richard Henderson , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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. Message-Id: <20230420150009.1675181-8-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Message-Id: <20230503091756.1453057-8-alex.bennee@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20230505155336.137393-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. */', '',