From patchwork Wed May 3 09:17:53 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: 678836 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp948395wrs; Wed, 3 May 2023 02:19:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/nmjlmP3pZXunSFVfC9y0S6kwqv2ThJ1GFQ5+eA9owiGWHLTmcmd2lkFKI8IE0TEquvZm X-Received: by 2002:a05:6214:f2a:b0:5e0:7ecb:8ffb with SMTP id iw10-20020a0562140f2a00b005e07ecb8ffbmr9590169qvb.8.1683105567865; Wed, 03 May 2023 02:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683105567; cv=none; d=google.com; s=arc-20160816; b=ZapsTNcXPzz/Nrzc4ULP66wl8DtAQexb3B9nv5qn48R5OeZhomeak3HR6qq0aPGzzu GzvfzF7x/v4tS1sjdNuczE1uL+J5b/cnNeEB3YPnf5M9h57f6PEcuB6W4jnbsksis66r j/ciqJrTZm93mcdEofKuxcYkmmVvss0ve3DudcF2ETpzqKxdvIAmcCsBu36LTnycGKST xCrAqyXJtvbjn+ViuS9KOW+1Lx0ePE0skUx4AOsmowa1ghdu7rdpDgCcQi0sPFQ0erSp wkXmxPQs4Kq+fn9d8bnV7emeKgcR9f3A2bBvdQS/n8np5blh3TUyvx//PQgug/kz6HF5 aibA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=R0xmDVAIv0XD4yi7vmosoJPR2UzMLoDsipcZ6y9UWA8=; b=FpG93gVqumkOctR9MFxNG71YrdcdJSJiJJR/0FCgdFx2AdnALq4PSfpCmIYPSGz/fl /VwJo1ONJAduC7u2zSCUJnEKcYzHpikEYngaCCKoTVdUoSL6oOPUaCKieU6MMr6jYjA1 5eSeqAWEHD59qxFQZawKBAyfxP0+HWN3wnqg+wfD6Riy5fbyjrYq23+ETOrlrjrW70Um 8k73Ul+F88/HrAeqtz4zbDUDzGuBlEKF8jFXso56qJTwG4mcSyICcg9ttSR0KTcsKCx0 PpernMn7PsUQyHNSc0hCCJhSs+sIdamWowJAG5X7bKbrdSLUBjOs8u1tShtwTZeGtCoP d5pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KsPt7by+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ge13-20020a05621427cd00b006164c1eab8fsi10841197qvb.266.2023.05.03.02.19.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2023 02:19:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KsPt7by+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=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_Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?utf-8?q?Alex_Benn=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.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 Signed-off-by: Alex Bennée 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í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. */', '',