From patchwork Wed May 24 13:39:49 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: 685351 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp257531wrt; Wed, 24 May 2023 06:41:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ70wPqFs5wQLe35C/p1E9RbWf/k/giBXSJvos9b7pNSOcbcRISkVwZ5dFW7I3XFPGHZdtNa X-Received: by 2002:a37:88b:0:b0:75b:23a1:44c with SMTP id 133-20020a37088b000000b0075b23a1044cmr6775662qki.18.1684935681564; Wed, 24 May 2023 06:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684935681; cv=none; d=google.com; s=arc-20160816; b=t3S30yHHWwRzsGQk+g7duEdviSUyoyikpZCrA9usypSSiITf0NERTSVWX2X0T74gNQ 9PzTJHm2HfsBCc9zOB9lWb8or1Fdtmx2ek2HkxAN9lcj9FEwLYO8mePrnCwyt3i0htNm kpH0MPOqGXnrI6diiwI+vhc5QRomLQP5HVEP6RdA1qbcv8iIwZUDFLwuAObXPw0GQuev glsozlNp6FRX+DEfLfCbMSZpNTHwPSnaqsVOaLT8WNVqE4TkDMjzd1rbj668fWKPvRvI OLz3L12b3OyDUG8s9E9d8F1oieWRCT3PD7mXa8SEWS6buy0LZOQ8K++CYHbzK1ToemqT oxzw== 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=YsEdqGbxU2y6FlYfEnNxap+gqqDYEIfE5No7MGGYe64=; b=eOnvR9Pp2gQ2YAoOWPSrR91pcVwVMIgj7ydkA4RwK69l5yflIb9uwmT0tWBiIDEHT4 uOAbphqClAYE2xxVHWlHHVQjOPt5glbm6AyaSr12Ln3ZB57DEMcml1/HIpD0+Gk3kRRE aac828aIIi2itc2HmpVUGB/LYkNr6K68C5UBab42s9xoUgH50J1we0Krf7E36/EYcfVH fZ88E/qpY1fxaGGwL1UUT9fB4Wy44EU/uzPXq0wIIFtpL5+3X2N4wpp6B7U1jGVHa/YP CqBhf/nAAHdhtdoH1o//H2dHgHjE1EKUGvMHRrj+Ulk69VV2zKCZKq3o8kAArz1lXeZg A5rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pR3ZMLwc; 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 j5-20020a37c245000000b0074df9f1f2aasi6302177qkm.690.2023.05.24.06.41.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 06:41:21 -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=pR3ZMLwc; 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 1q1oil-0008Qy-4Q; Wed, 24 May 2023 09:40:07 -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 1q1oie-0008DJ-Iu for qemu-devel@nongnu.org; Wed, 24 May 2023 09:40:01 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1oib-0003mD-TK for qemu-devel@nongnu.org; Wed, 24 May 2023 09:40:00 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-30aa1eb95a0so834598f8f.1 for ; Wed, 24 May 2023 06:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684935596; x=1687527596; 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=YsEdqGbxU2y6FlYfEnNxap+gqqDYEIfE5No7MGGYe64=; b=pR3ZMLwc9lG7RmWQe2PcalUtPoapOU3kGnJVEX+z2YOLLT7D4o786DcQ9UAGc9/vlG z+qcFSe+8oCii2PvR9s9SkBR6KRZfsAq+9sZQrCeASft8BPkDPnQn/DZ/85HSNIFC6jM yOzFESLA9CX4/XpXqlZz4eTM4vzeZDr6iv55Z1NIZlIE4EiIHHm/IH+fI2DoaLz1U2F7 07ybchdXOFyNoZ2/36cYSWQbbZwNyPa07mGyrx+NMKR18XTdIFuK24r9Zpgre+YgZvXQ TetVFITdcqAv7RmfdXb3hWOZnn0iJ2df/ydG8ltbNJZprPr1+vQZVef7qqG4Vornny96 A5pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684935596; x=1687527596; 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=YsEdqGbxU2y6FlYfEnNxap+gqqDYEIfE5No7MGGYe64=; b=RB51wzfnEhNPiqzA4LO/cMXAtNc8ajTJF5Zoi5TjYXIFxadke88eaEWrgz23w/mrd6 PW9kPzmVrjkgbdWVfPLPxkPENg5JBNWym127YToWyC9fz8cCCmo6TqNUOr3L5nHGzXyl mkht7JQujWMNqKHLkZmGEH/a57GLFguAWHTbhucPRl+OAuC2J9MQsN75SVMhySW6BEBy 7PVZdS2UatRtlR4MoXXPZLzoewtBqOWRQFiVu9csWRj3lNehIPmUGsPsl3EA+r9Z3XIn lqroqwkscUwpiWLr7KxrcUspd1YIJf3Ssh2279vn7Casl+ZTwM7yuwZ4ijEnfEB1ovAU 4ifQ== X-Gm-Message-State: AC+VfDxBqOoFoPOvAecGJO2AaSkdxC8p4Kz0KH2s+JaUy3F7XcVP4SDz uzUpSIy1JPG2/wmKqD7BCu/f4g== X-Received: by 2002:a5d:6748:0:b0:30a:9043:8f1d with SMTP id l8-20020a5d6748000000b0030a90438f1dmr7600798wrw.5.1684935596438; Wed, 24 May 2023 06:39:56 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n11-20020a7bcbcb000000b003f427cba193sm2347049wmi.41.2023.05.24.06.39.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 06:39:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CAA891FFC2; Wed, 24 May 2023 14:39:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kyle Evans , libvir-list@redhat.com, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Greg Kurz , Eric Blake , Markus Armbruster , Warner Losh , Marcel Apfelbaum , Eduardo Habkost , Michael Roth , Richard Henderson , Christian Schoenebeck , Riku Voipio , Paolo Bonzini , Yanan Wang , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v5 07/10] trace: remove control-vcpu.h Date: Wed, 24 May 2023 14:39:49 +0100 Message-Id: <20230524133952.3971948-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524133952.3971948-1-alex.bennee@linaro.org> References: <20230524133952.3971948-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.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. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230523125000.3674739-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. */', '',