From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71065C7EE23 for ; Fri, 26 May 2023 16:55:03 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2ahg-0002ye-FG; Fri, 26 May 2023 12:54:12 -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 1q2ahe-0002wY-20 for qemu-devel@nongnu.org; Fri, 26 May 2023 12:54:10 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2ahc-0002GU-DQ for qemu-devel@nongnu.org; Fri, 26 May 2023 12:54:09 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f6094cb2d2so10115635e9.2 for ; Fri, 26 May 2023 09:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685120047; x=1687712047; 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=jR3hYoNQairvfPLkchXzs2j4mJfUeyks2q4lp9MRHVc=; b=D4C4koTjUYtAet6mMiAXC/EwUcUr7Mwj/8TrpFNP50Md5bAKN1BXKz9xtzFn9vt7fm xncUMH8StCJ68u2R88WseY3KL4oopFD015qXkit94oItHpf6wEyBzJ40o3+8N+q10d7k VNc2OsmD81UXu/xzD1guuABYM2I5E+k5ggQirBtBnG1rMaYjRV2OOxLZPIejd9bLqAKF vRXSXOH9ar6U9e8SLJwebHprvcUuhQ2hAIsdZjwRNSanvtqNyKlyxhryRAYIHrSJAdS5 LyuFvDUFt1TlWvHrmUYeqxUOG0TC85hu0CWeu70a7q2zrDnREuXc4xMdHMfxbYojWnuf 5b/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685120047; x=1687712047; 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=jR3hYoNQairvfPLkchXzs2j4mJfUeyks2q4lp9MRHVc=; b=hZhgKKw5eT3YRyc3/ldq7gl6jZU+d7Nz8ON7liwLfWQiKRYAahY2nWVZ1SyE2hTEYP m4gC7gsJf2AhkcVsMiYRyuJj8ftQETcx2O1cAYpJLzfAG2R/0cVDx0FaC9VC7gr3We0H o9u6Ead28FHbI5lj20vsFJUOekqLaYO99vXtipOVsp2qNX+DhSWJ+fUt7UxEtOgQI1ph lT4kdv8ZC3+6viQXFb6jZUYIjPHC5PFCE3DSqJyWarFmGX8KGK2FZTkXji5nRt6uMl2p OK+Q6aH5rpYILvqkG6Q28UoX+sf3kf0hTKvg/A62Af5epOOeOs8+qWUTS9l6utS1a+4o qAhg== X-Gm-Message-State: AC+VfDxrFBmlaTHDsGrpS+XshNYseg5eDwkpDMIvJ0mZREeD/vYXqBpq chvIxvee6xK4JP9bzSjkxayq3A== X-Google-Smtp-Source: ACHHUZ6+mNd5ftIMt/tFtbY+CXghOwlCZkMwRtp0WaVbK8YxlTpJFsmrVlzTNWhvI7YXtTo1CrstIA== X-Received: by 2002:a1c:7216:0:b0:3f6:476:915 with SMTP id n22-20020a1c7216000000b003f604760915mr2003755wmc.6.1685120046854; Fri, 26 May 2023 09:54:06 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c2-20020adfed82000000b003078a3f3a24sm5647610wro.114.2023.05.26.09.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:54:05 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AF2461FFBB; Fri, 26 May 2023 17:54:04 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Riku Voipio , Markus Armbruster , Kyle Evans , Eduardo Habkost , Warner Losh , Richard Henderson , Marcel Apfelbaum , Greg Kurz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Blake , libvir-list@redhat.com, Christian Schoenebeck , Paolo Bonzini , Michael Roth , Yanan Wang , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v6 08/11] trace: remove control-vcpu.h Date: Fri, 26 May 2023 17:53:58 +0100 Message-Id: <20230526165401.574474-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230526165401.574474-1-alex.bennee@linaro.org> References: <20230526165401.574474-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: <20230524133952.3971948-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. */', '', -- 2.39.2