From nobody Wed Oct 30 22:18:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1684846215; cv=none; d=zohomail.com; s=zohoarc; b=G3TZfu/+28M/9o2eljli2Cufy9cnXGEUGPNdyuZSZxfFCMesX7wQOjLWXqV6DyusrMzC52qfPOm3DJ7CMFOssuQiudnjDh4yVP9hCPi68QRG27qdDOKAHW3IW92pvzBu2cJVx5ub2fGmKcVP8xv15txiG8t0wobbeQxeKA/3rVQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684846215; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JqWNsbArYu1VYA7jPglcF2LkuoAj2XAQgpWQZ9CCyOA=; b=du0BgCXXRbkns/hhl+EN4gCsyflQiboZdfMsOTAXhG28kMZ5AgpsCtKjFLDCSy3WQysEHQG3kUuemJCBuGMDXu7KQm+UIfeFaknSJrCn10+FnBg6PkUgBvYNSy4J8gEbJYTqAHpjtxtKeZPvSvrbpewg20/a3DqVbQDS992CAqA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1684846215465435.60431297849493; Tue, 23 May 2023 05:50:15 -0700 (PDT) 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-448-KMWSaiwANveXzM9y6wWD-g-1; Tue, 23 May 2023 08:50:09 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 498DE811762; Tue, 23 May 2023 12:50:07 +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 3336B2029F6E; Tue, 23 May 2023 12:50:07 +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 F187819465A8; Tue, 23 May 2023 12:50:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 865D319465A0 for ; Tue, 23 May 2023 12:50:05 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6462A9D7B; Tue, 23 May 2023 12:50:05 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C9E69D73 for ; Tue, 23 May 2023 12:50:05 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (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 3E4818039B7 for ; Tue, 23 May 2023 12:50:05 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-zQERWOB1MIils6lzsZrnAQ-1; Tue, 23 May 2023 08:50:03 -0400 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3f60e730c4bso3269575e9.1 for ; Tue, 23 May 2023 05:50:02 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m7-20020a5d56c7000000b0030630120e56sm10943460wrw.57.2023.05.23.05.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 05:50:01 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2BF7D1FFBD; Tue, 23 May 2023 13:50:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684846214; 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=JqWNsbArYu1VYA7jPglcF2LkuoAj2XAQgpWQZ9CCyOA=; b=hCJKP5yZLJ1b330Eyi623AQSWQd9nqT0PvLyfP9g8Fl8QNRC4E0BRbFc376HgKa6Psl/6A XrKX7CKTtm4sbRasg5gE9rKdbpomZjrhzcYDHCKSV5wDxen99MlAwy5bP7orPI6ELWSEXW 5Ft/KQded5yk5s9xfoTB3KwjVL8LUhM= X-MC-Unique: KMWSaiwANveXzM9y6wWD-g-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: zQERWOB1MIils6lzsZrnAQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684846202; x=1687438202; 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=JqWNsbArYu1VYA7jPglcF2LkuoAj2XAQgpWQZ9CCyOA=; b=Q+vmxF1DAZQxcYTLt2l9TY4/LNVbgg6sSkTr8KxCDWTwcHNhSNKPFZ41GTX6gk9V6R 4PwBNX1f8rLm17Tzx2FOu+u51ObJf9rOkVU2IeoN7LvlieW34+ymwYKoa9kS+P3k4jst vLPzOKFtdZdtz7w8iAi6QShJGniwALoWmXQweAqNbj2899yVh1Ur+6yN5S2mwI11j16S ymS588QqEfF995EMpn7GTgLMg5bPPXvehdZKnoet/A+L7vmP8CZDtzvnPFBsvErRsut0 RIzFepnE6UxuC6H0/wakuInApHsX+OFcgDBzXbMj0ZUJ2Kl7qc6uLB1lxVCuWYs0idaQ CVgw== X-Gm-Message-State: AC+VfDzTNQ2weR9q2G1zQsTcI5YclDwT9EhpCFL1q8/6cI9NQYLEM/Ed 4gQT/R2OW6Xw1VMvY6IOwynPUQ== X-Google-Smtp-Source: ACHHUZ4sgX3oqPR75I1pHYMd6vCkpFXPLSeQhyOWH4IMQp3FUOJokcRxZhQ+BiNydPTi2kn7X9DtSQ== X-Received: by 2002:a1c:f614:0:b0:3f5:d0b8:4a53 with SMTP id w20-20020a1cf614000000b003f5d0b84a53mr10552864wmc.34.1684846201991; Tue, 23 May 2023 05:50:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PATCH v4 02/10] trace-events: remove the remaining vcpu trace events Date: Tue, 23 May 2023 13:49:52 +0100 Message-Id: <20230523125000.3674739-3-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.5 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=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=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.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684846216336100001 While these are all in helper functions being designated vcpu events complicates the removal of the dynamic vcpu state code. TCG plugins allow you to instrument vcpu_[init|exit|idle]. We rename cpu_reset and make it a normal trace point. Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Message-Id: <20230503091756.1453057-3-alex.bennee@linaro.org> Signed-off-by: Alex Benn=C3=A9e Message-Id: <20230505155336.137393-3-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/core/cpu-common.c | 4 ++-- trace/control-target.c | 1 - trace/control.c | 2 -- hw/core/trace-events | 3 +++ trace-events | 31 ------------------------------- 5 files changed, 5 insertions(+), 36 deletions(-) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 5ccc3837b6..951477a7fd 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -32,7 +32,7 @@ #include "sysemu/tcg.h" #include "hw/boards.h" #include "hw/qdev-properties.h" -#include "trace/trace-root.h" +#include "trace.h" #include "qemu/plugin.h" =20 CPUState *cpu_by_arch_id(int64_t id) @@ -113,7 +113,7 @@ void cpu_reset(CPUState *cpu) { device_cold_reset(DEVICE(cpu)); =20 - trace_guest_cpu_reset(cpu); + trace_cpu_reset(cpu->cpu_index); } =20 static void cpu_common_reset_hold(Object *obj) diff --git a/trace/control-target.c b/trace/control-target.c index c0c1e2310a..a10752924b 100644 --- a/trace/control-target.c +++ b/trace/control-target.c @@ -144,5 +144,4 @@ void trace_init_vcpu(CPUState *vcpu) } } } - trace_guest_cpu_enter(vcpu); } diff --git a/trace/control.c b/trace/control.c index 6c77cc6318..d24af91004 100644 --- a/trace/control.c +++ b/trace/control.c @@ -277,8 +277,6 @@ void trace_fini_vcpu(CPUState *vcpu) TraceEventIter iter; TraceEvent *ev; =20 - trace_guest_cpu_exit(vcpu); - trace_event_iter_init_all(&iter); while ((ev =3D trace_event_iter_next(&iter)) !=3D NULL) { if (trace_event_is_vcpu(ev) && diff --git a/hw/core/trace-events b/hw/core/trace-events index 56da55bd71..2cf085ac66 100644 --- a/hw/core/trace-events +++ b/hw/core/trace-events @@ -29,3 +29,6 @@ clock_set(const char *clk, uint64_t old, uint64_t new) "'= %s', %"PRIu64"Hz->%"PRI clock_propagate(const char *clk) "'%s'" clock_update(const char *clk, const char *src, uint64_t hz, int cb) "'%s',= src=3D'%s', val=3D%"PRIu64"Hz cb=3D%d" clock_set_mul_div(const char *clk, uint32_t oldmul, uint32_t mul, uint32_t= olddiv, uint32_t div) "'%s', mul: %u -> %u, div: %u -> %u" + +# cpu-common.c +cpu_reset(int cpu_index) "%d" diff --git a/trace-events b/trace-events index 691c3533e4..dd318ed1af 100644 --- a/trace-events +++ b/trace-events @@ -54,34 +54,3 @@ qmp_job_resume(void *job) "job %p" qmp_job_complete(void *job) "job %p" qmp_job_finalize(void *job) "job %p" qmp_job_dismiss(void *job) "job %p" - - -### Guest events, keep at bottom - - -## vCPU - -# trace/control-target.c - -# Hot-plug a new virtual (guest) CPU -# -# Mode: user, softmmu -# Targets: all -vcpu guest_cpu_enter(void) - -# trace/control.c - -# Hot-unplug a virtual (guest) CPU -# -# Mode: user, softmmu -# Targets: all -vcpu guest_cpu_exit(void) - -# hw/core/cpu.c - -# Reset the state of a virtual (guest) CPU -# -# Mode: user, softmmu -# Targets: all -vcpu guest_cpu_reset(void) - --=20 2.39.2