From patchwork Fri May 26 16:53:52 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: 685930 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1025240wrt; Fri, 26 May 2023 09:54:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5D5WpNXOp52uhXMLSS9xxNXs54at+udDwSlBh80UFy5WDB9uVp+uf3cISZ7sgiewBRgkki X-Received: by 2002:a17:907:7e87:b0:971:484:6392 with SMTP id qb7-20020a1709077e8700b0097104846392mr2602566ejc.38.1685120066593; Fri, 26 May 2023 09:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685120066; cv=none; d=google.com; s=arc-20160816; b=koc6ugR1KCRJeEvQUITahoBrCjdOzX1D3fLuEXH1q2x0u3z+yIW29lD58nEnn0OXqr CDuuR8XGfRSzxtO4DJ9TPGm70rZIiIsFMmEmQD2wYsv/IJ+KjNOY3YkzLcaR0m+hYbT0 hfMJQ4vj9HJIk4s0aCe28jNFCyWHirIFyGrPm8OuNeKNtaOwUmRH3xLthaHMmNZPvY9n BLjM2n7xv9rH2vR8B+9dmltvxTUtc6LYlo3u4jSu9lpVTbXnAtV8vtgMeYHP3MPJcuJ5 hJiHiDs7a5CyVr8D0taYJdrtKMPMIk/2W7/EMnzeOL/ntIOqzKA/bhh19ImlrvFGjM6V E3Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:sender:errors-to:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to:delivered-to:dkim-signature; bh=GWrBsFMGiSuanAAhdh6yQ0xzGyZ5a0S2x2yI+CVJb+k=; b=s2HfGMhz/e8ZbNGOUnZOTvJcdFEx25eZFrk99ccd679pDHWcXay0kCJ4Rc5o/13WSl SmYQnRTqxqSO5dMmwexp1TUt1sIagZMmnyaZZWDVmLjvalzeuFU3TIDqKTX+6FdLetQp vRPfEsVEPc1me3SxGFXG5UjLuWUY/RdjZipTEegrel7I+VdMvHfxX52XetSFzvYzpOsK 6ndk6Pp6FHfB3eyBf0YRByeiyHd8y05b+go8gygzqMEOk6V7wvHRPtw1mV9oyEeLZhU4 /XsqSg7cyMoU/o0otj0p6voyJ4ztFnwtWhGncPj29FSeebDeVcrFl/UY9TMu8Ntp19NW vo/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gXuvkXtY; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.133.124]) by mx.google.com with ESMTPS id pg6-20020a170907204600b0095727b08140si1594216ejb.239.2023.05.26.09.54.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:54:26 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gXuvkXtY; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685120065; 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=gXuvkXtYoDDCZSNJsvSH7TGoiLd+cqgiFbAQDk3GXpf3xJXH7vObrv6NUIBvvaDoN6beLM S4iHjNarIgkKiGMr0IfPROK94u6la7Wfk1pnxdjfkF2X7fYo+MqbtfqTbWR7IU19GN+nYG 1AniT90l8+TpjGie1/UCNJMMSNmLcWM= 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 X-MC-Unique: COH-vik6OVm4KGKCaRywXg-1 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) X-Original-To: libvir-list@listman.corp.redhat.com Delivered-To: libvir-list@listman.corp.redhat.com 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) Delivered-To: libvir-list@redhat.com 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 X-MC-Unique: UmXzGBcAPvqk0Qx_ATFz6A-1 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3f6da07feb2so10944945e9.0 for ; Fri, 26 May 2023 09:54:04 -0700 (PDT) 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-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) 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) From: =?utf-8?q?Alex_Benn=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_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=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 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é Signed-off-by: Alex Bennée 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" CPUState *cpu_by_arch_id(int64_t id) @@ -113,7 +113,7 @@ void cpu_reset(CPUState *cpu) { device_cold_reset(DEVICE(cpu)); - trace_guest_cpu_reset(cpu); + trace_cpu_reset(cpu->cpu_index); } 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; - trace_guest_cpu_exit(vcpu); - trace_event_iter_init_all(&iter); while ((ev = trace_event_iter_next(&iter)) != 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='%s', val=%"PRIu64"Hz cb=%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) -