From patchwork Tue May 23 12:49: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: 684904 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1697602wrt; Tue, 23 May 2023 05:50:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6FJJF15q4yU76VQnXzY0VABa58V1qNu/7g+xvGl4JEvKT5P72asZcNvjBG5hpCQxZ6wdf+ X-Received: by 2002:a17:906:ee82:b0:966:37b2:734a with SMTP id wt2-20020a170906ee8200b0096637b2734amr12749995ejb.22.1684846219173; Tue, 23 May 2023 05:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684846219; cv=none; d=google.com; s=arc-20160816; b=jEm1zvj72+Fr3eLulIoC7Ojv6Q3s89U3j0i/r2vga1r6ef7Mw+CtIA64/I706xJ1ft P0MQEwypAf2te8o3sUwmAyWPwYa3VYGbKUCe2GuYe3Y7nozVgVqUVr0p6q9Awxc3JsGd gaAH5SdQ1QnyJRhJ5lSl5NBsD9WzKGJEVii5bIFztQtSJX4waED4q2BZATXSHnWdSGVm +YeSfYlbaMwOSXlUNLPuXXCl1pmoew0MirUyA8z+Fu8Mb9d8M+FBMRJFIPXNhLBSj3/F 8Ahs+ZDqRey1dgOrgFp1bD6rStU13UWaEkOxx5G30g14YvLLI3hCHSwOBDUlWduVZm1j vJlA== 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=JqWNsbArYu1VYA7jPglcF2LkuoAj2XAQgpWQZ9CCyOA=; b=eI2rXk6QZdXXt5yXSNlb9A2BDCVNKgeMG4tUcOtMyTUjXGBtsS73gPYe+3sPW1cpxX 4r9sCSTFzZ8IfOcOxU9D8QvcxxYpJZhEXOViw0zzvvk7tjo9lKf7g0BpxTlH7VclABvR sxCNBYnvBvi6nY7YWQesREi3a4+Zg854k23Y6L/W1R8KcoIV5U5ZWcq+KzCmkSNgDAmu ru6NEXX5W9fZKWfGqZUBaU8lhUx7bNgXuN5zic62SX49Uj13J7JpeetMdLKZ0Izs3ffS aUSeRHiGidsPcBQX9f9lREZ+uxQmTzSTl1n60D5sYjCk8GHmE2r6osDKH2aNju+6IhxF VmQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Z/4kS6K/"; 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 o20-20020aa7c514000000b00506b2a534fcsi2837156edq.85.2023.05.23.05.50.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 05:50:19 -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="Z/4kS6K/"; 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=1684846218; 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=Z/4kS6K/GZaBxdzf0FryZbjbv5bTbovAilnL+gcTHweggB7dxXf9dF6X8Pv47+ze430Xg7 5J2PIyShCjnVdZeaht0JwiocMCxkOWbZQLlZX2HQab/Hk+07vTgIneuvt2oMiq1QXSN1fa 8cKQwRAfFOjUqtHBAd5jDoArdI+cHBs= 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 X-MC-Unique: KMWSaiwANveXzM9y6wWD-g-1 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) X-Original-To: libvir-list@listman.corp.redhat.com Delivered-To: libvir-list@listman.corp.redhat.com 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) Delivered-To: libvir-list@redhat.com 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 X-MC-Unique: zQERWOB1MIils6lzsZrnAQ-1 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3f60e730c4bso3269575e9.1 for ; Tue, 23 May 2023 05:50:02 -0700 (PDT) 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-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) 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) From: =?utf-8?q?Alex_Benn=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_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=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 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ée Message-Id: <20230505155336.137393-3-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé --- 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) -