From patchwork Wed May 3 09:17:48 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: 678830 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp948218wrs; Wed, 3 May 2023 02:18:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xUUpyszAaQjjns9CazAiG2xOIGKLoaKXk1TlqpeZ1sWR7jUtbmrvRsBklPX4oZI3Hf9d1 X-Received: by 2002:a05:622a:184:b0:3ee:8baf:29bf with SMTP id s4-20020a05622a018400b003ee8baf29bfmr30560342qtw.42.1683105537220; Wed, 03 May 2023 02:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683105537; cv=none; d=google.com; s=arc-20160816; b=u7C80ZIfhA/sTCjNNT41/5i+PIjKfx69Sh9ZnVfDOm7FoJW/vJnzNhLD6+nZTvGreg IGv8SHEpZ+4GxTk3m755XjazDTSvSOFUagr5N8F5IYkR7HLEskMtIQs39YZzcyVtuQ7p OGrmbEqgnibSyHZwC33Rx4gN3pBdBmrhaWaGWoTyqr1gC49F8KHloGQS0DhrylPW4tp+ UZR9oRkkT1t5wj7UfwiZco3Whp0WL7e8Cl+EHv4jQg2pw46kYi49cqeFmOvXV3uvXaTp a2F6rdkwmhxqUW6zA7AIgC90ygVBNWekmielpFAt34UXpWZGQqyo6xn5u06+wenBYHse gDdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nnbuAda1HDg+mB6KFTRsN6PGn/CEDFiT2f/X2hh0Sns=; b=RsAvS+4TKBWeMKiqLCXTwJvhVj7rol9gD51newQjjzSqKJUpCUwK3YRT3BkiRMHZLX RgC9S34bScHFKyX2BK9lpIGlRKlocfTIvLly+87GbGX9o1WZjqsIXuL+QiB/GMu5nnrh WCH2bTeZe/hjFF4oDgcVHpczEqND5jCnNsQXqyQrxRwIwIIKUL5ug7RO+21g6T9b7N9g yqmSIIecN9vJET3DPLQouCm30i6yGqBVo8J7r9N4dpHuiwEShbKIYCs9QuS0AcvtoTOf /HBLJHHkCT7VONmqbX0ZcgnOQyvv/o8QhKqBsym06HFBDPTYgCzISB8vMY9jZczSYALK 4mxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VUC5w4cj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b21-20020ac87fd5000000b003d4da60a9d5si17522699qtk.214.2023.05.03.02.18.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2023 02:18:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VUC5w4cj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu8cg-00039w-Dq; Wed, 03 May 2023 05:18:06 -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 1pu8cd-0002pM-7N for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:03 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu8cZ-0000Lg-Nr for qemu-devel@nongnu.org; Wed, 03 May 2023 05:18:02 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f4000ec74aso1128305e9.3 for ; Wed, 03 May 2023 02:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683105478; x=1685697478; 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=nnbuAda1HDg+mB6KFTRsN6PGn/CEDFiT2f/X2hh0Sns=; b=VUC5w4cjKeJc1B27J+YmpdCgXgyEtAMYEQmCbJEk/v8PQn/oBBQc1tDTPFEIq+IySa caKAkBwES3iACXhuEmeDq3jI+bc9JLHtvY/LsyvrhbIw5tnFirv+FTvFR1wXPJTj3n28 CC8uQKzEL7C52GAd4oz7F48kiPKmg5UZKatMBnDRJuoehAe17wI2eFxrFF8dtRADY/ka Isa49DiWESgfSpk3KJZ1AQ29AaMRFfHQmoGnMt1C9gFLYdiGyYNRumorhq9mbK5eKWrl GqOlwhJSv0FwxmjmRzN5kIDlx92yMjfgxeON1pHeGEzTSzlTFxp8Ls8ChmiopV6Camp5 ev7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683105478; x=1685697478; 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=nnbuAda1HDg+mB6KFTRsN6PGn/CEDFiT2f/X2hh0Sns=; b=JqOVAgDFR383Y8tx/DOrlOJt3C7NnCwG1isPaoAiDik8QagrkWOt0xwHWtxDOlO52d zHN0zvff1pn99bcbElMesvxJh9QnbpAawOLhELHV8DhkMlJkzhgWJS4BktYRA5vkxPdw zWXEJpVELGi+t5KmgS0gwM6r2+q6vwzo5miXauiTWBr3bPwt+HnusSg0DyTYFXE+nWMA kszog3NlbW/UaSFWs1E8RK59l8yHeEbdsYTB+wr0nsQXpVSKQN8ZAGhx6jZpSmwcDvC9 Ip/sETq28ginAvwvPcryQWfbYQLNm1A3ZWefftkzra5//i3nbJEAhv5Ifl6ID3/8AQhs /Sdg== X-Gm-Message-State: AC+VfDxHyisID2lM9a1YjflHAwK++TX5tV4w+mwEG3YbzUktTYWYiCjE sCanrJ2Y6/AhmTmGtpaeFP9rqw== X-Received: by 2002:a5d:44c4:0:b0:304:4460:11e7 with SMTP id z4-20020a5d44c4000000b00304446011e7mr13920851wrr.51.1683105478286; Wed, 03 May 2023 02:17:58 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id u4-20020a5d5144000000b00304ae802f02sm16415808wrt.66.2023.05.03.02.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 02:17:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 38EC11FFBF; Wed, 3 May 2023 10:17:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Riku Voipio , Yanan Wang , Eduardo Habkost , Greg Kurz , Warner Losh , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Christian Schoenebeck , Richard Henderson , Eric Blake , Michael Roth , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 02/10] trace-events: remove the remaining vcpu trace events Date: Wed, 3 May 2023 10:17:48 +0100 Message-Id: <20230503091756.1453057-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230503091756.1453057-1-alex.bennee@linaro.org> References: <20230503091756.1453057-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.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 watch point. Message-Id: <20230420150009.1675181-3-alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - keep cpu_reset tracepoint --- 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 232c97a4a1..c6132f243f 100644 --- a/trace/control-target.c +++ b/trace/control-target.c @@ -145,5 +145,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) -