From nobody Wed Jan 15 11:18:58 2025 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=1685120067; cv=none; d=zohomail.com; s=zohoarc; b=HSSgHATcxHJFXRWyB8tv2QBHyFz13NR1INQE+MVkZll+/1QXNGw19NHRx2DK8cd1t0m+TKUFWPh6OuRUwnz9hdYQFHd1zDFD+mZaY7S4I3V1jr6ZU5oJ7cgfZLnGmOQ7o/e+0SHRWHOGK0zVbEQ8dVQjo8Cju7uh9hXCJBzS3jQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685120067; 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=GWrBsFMGiSuanAAhdh6yQ0xzGyZ5a0S2x2yI+CVJb+k=; b=BpmnlCD/YnVlnhTcZ7hh9kgouYU51aznk0BFvmv4f+KFIC+7MHhXD9FYrRGvUcc8p8u1WsTt8aZgQcLJyAClaqghH8hh/+hIpgXEEZhq3SIJcC61ktJN6NouTGDvCPdhFsfcZR90rT3JsAqx/2FPM6P/DN9V92m/TXY/d4au6Z8= 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 1685120067112939.1317908276636; Fri, 26 May 2023 09:54:27 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-652-COH-vik6OVm4KGKCaRywXg-1; Fri, 26 May 2023 12:54:18 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5B5731C08DBA; Fri, 26 May 2023 16:54:12 +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 44BFD140E963; Fri, 26 May 2023 16:54:12 +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 D891619465B3; Fri, 26 May 2023 16:54:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1B85519465BC for ; Fri, 26 May 2023 16:54:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0F29B40CFD46; Fri, 26 May 2023 16:54:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0747B40CFD45 for ; Fri, 26 May 2023 16:54:09 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 DF797811E98 for ; Fri, 26 May 2023 16:54:08 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-595-UmXzGBcAPvqk0Qx_ATFz6A-1; Fri, 26 May 2023 12:54:05 -0400 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3f6da07feb2so10944945e9.0 for ; Fri, 26 May 2023 09:54:04 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a18-20020a05600c225200b003f60a446fe5sm5783211wmm.29.2023.05.26.09.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:54:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8A09F1FFBD; Fri, 26 May 2023 17:54:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685120066; 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=GWrBsFMGiSuanAAhdh6yQ0xzGyZ5a0S2x2yI+CVJb+k=; b=I3KCC8JSGu7vZxram1uY/u6srd5OziqfKQ064vrS2X5XTAf9/f9PZV9rGmlDPqGIbKhIHq Vz+SeoOqckUPQLxvCdi9+e9CzBO3n+ed9v99zTvzJa024oa8S4rHEIMVyKomJ3s8GryOja R5sdee1rkCqqGqanqUUAUqJplrmVnzE= X-MC-Unique: COH-vik6OVm4KGKCaRywXg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: UmXzGBcAPvqk0Qx_ATFz6A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685120044; x=1687712044; 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=GWrBsFMGiSuanAAhdh6yQ0xzGyZ5a0S2x2yI+CVJb+k=; b=TDDH9L+HuDSQ+VDFqjomUb4jtxcsMwq/PnkiksDQHJpv8bGvxlIQMhZw3+vyAgKflD 1iZ6lC984ORhgzHdRs/Lg5oB2QeDRPpAH35hm3V/HOHon5bGGymnnTNHqp+wxKI7irp3 5YQtYMgoNDI07JIifmp4ZhyPKcVUnKSITo8kgVtl+hQlGk6vFMJyQj2TcTcqnKIqAAfo vPmQvrnYr2DJSNvSVJsX59qCOeXRYTdZ6IdDS2Qs7rgTmJyWdiXsNRFVBcQZhhHJS+Qr /k1cecR+qK/RfVZQHVDKKCmiZDyI18KJHoF19130Fi3g9uH/tcQpLzmQmW0WDWcs8ENp 2z9g== X-Gm-Message-State: AC+VfDyailcj7e1422CUlRTQxyRZa0UGOKLqUjbIYtD/Xdd1ksAh5GZ1 jnbLMCU2LZneF8qEKu7mQTb5RQ== X-Google-Smtp-Source: ACHHUZ6ONuEIQcdQzWu0iAYPaLWQApgh+dBv8YZzzcdfC3rCbwhdYfv7X40vyVuMEk3zahO4fRuY2g== X-Received: by 2002:a05:600c:2308:b0:3f6:1377:8b15 with SMTP id 8-20020a05600c230800b003f613778b15mr1986965wmo.21.1685120043969; Fri, 26 May 2023 09:54:03 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PATCH v6 02/11] trace-events: remove the remaining vcpu trace events Date: Fri, 26 May 2023 17:53:52 +0100 Message-Id: <20230526165401.574474-3-alex.bennee@linaro.org> In-Reply-To: <20230526165401.574474-1-alex.bennee@linaro.org> References: <20230526165401.574474-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.1 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, Kyle Evans , Riku Voipio , Richard Henderson , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Michael Roth , Paolo Bonzini , Christian Schoenebeck , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: 1685120069238100001 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20230524133952.3971948-3-alex.bennee@linaro.org> --- 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