From patchwork Fri Jun 20 17:13:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 898333 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f54:0:b0:3a4:ee3f:8f15 with SMTP id cm20csp1452144wrb; Fri, 20 Jun 2025 10:16:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW1pSVpJHfumZiYeEbBOZkW0Vw+WfESFSiThHFeVXVCUymYGs1DVMRxh2Y14fyz0LcsA2SrOw==@linaro.org X-Google-Smtp-Source: AGHT+IHa39HCbc51hDPpLLv5Pr6uha/BlgSzO2T7NBElHBCMoLp6M3ViYYTSOfnFoWh9uQWO43ay X-Received: by 2002:a05:622a:a549:b0:4a4:31c5:fc8d with SMTP id d75a77b69052e-4a7804c11camr22690591cf.43.1750439783168; Fri, 20 Jun 2025 10:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750439783; cv=none; d=google.com; s=arc-20240605; b=h7wKgFbgAOinSAP00j74C9YceLyElFHbnypnvnfzfDmCg3jwKlWAQySfz0ymHwRu58 5EftLQqlASGvwVvip/gF/E7Hmg2/ZAp+HsJUrPvcjF0Z2Cez193SINQnie7JFuEncwiC VQr4+WL9hRPqWKg+dJZL1d8POCmZg/tzF9kp0GX4GBM1+7Zd7NlQr57aTAeaQymRcoG4 ru5wDugZF7jiADfFgHQej4koHgs6jy8/ggtH54jOl90DVyJAs+ewV+unT3rPKMzLj3ov e0fnRpXnGnwk/R/NKH0mO/MgY4b6Ot8PlNuEpcD3hkbPf9UCRi8/Ao4u/7uNEHB+HEI8 ko6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=veQWKG+tAZzHOxq5ZSFoWdE7WJpX7Ekw5t3gq6/7ihM=; fh=8f2AL0Su0K9UlZksY2EEcc9O+An+AQ/T/SEdbs2pdSA=; b=IeEckgjLNa/sQk7STsQLDTgL02V/cf6huovPLf0uLUchKTt3oNGGlb9R3stFixeBpG qxeu67DD4bPR5+4s0Lq08TBwSFrqLyrFHJzoDwAcgGnrVxL1/Ey/47kTdIh31aL0Ofi+ LrHmObegoC8hUvhcGJlwUg6+3oqbWGMrGI2W8aADr/9ZAW/WfC0gn3sd1qjX5JkTQcXK MfRsi39LQV6znDKTBMslS/XX0McdJLEuCI5uyN6DwsJ+zhP6aVMpcGRi0RGFiBvcw0JE RynfIzKYNMx7osnV8WQxDHvhO3AMPO0NeopcVkSeQVVz2BjP1vJ/8Zf97/1ZmdA25bwY lSaQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gVjhKtwR; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a77a0d68a5si20664231cf.501.2025.06.20.10.16.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jun 2025 10:16:23 -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=gVjhKtwR; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uSfLT-0002O7-Hq; Fri, 20 Jun 2025 13:16:09 -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 1uSfKY-0001P0-5x for qemu-devel@nongnu.org; Fri, 20 Jun 2025 13:15:13 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uSfKW-0004SU-Kz for qemu-devel@nongnu.org; Fri, 20 Jun 2025 13:15:09 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3a588da60dfso1373222f8f.1 for ; Fri, 20 Jun 2025 10:15:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750439707; x=1751044507; darn=nongnu.org; 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=veQWKG+tAZzHOxq5ZSFoWdE7WJpX7Ekw5t3gq6/7ihM=; b=gVjhKtwRoN+FQNCHZAeaPEQXc1QSKvVuWQctMBTq0AhhjaBK474h/PHEpYFyRtmOHg ZxhrsEHZdPY4RQhvTgZESFHK3j/Cm2QX7U06pVhMqspZtuwdEYR14rNLcUh3sblnBzlT OWe4+Gulm4zyCEsWAFxGe9CLLLJe2aX1mTauX2xMFQNn0+6dnDyYOAR0IhvVgiCrfAX6 ZzaasBFFYRBsvfYj8r0StIvMBXNTerQioNORTYjgXwrjxxCkZMSoiUU6j3lH7ORsQt6k u3gGjp1p6NbXLIqTNQmOeJgSYJ2QKAEt+kIxPkq48U177qgO/l6fCXyPmJOAQkWdMSvX vJOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750439707; x=1751044507; 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=veQWKG+tAZzHOxq5ZSFoWdE7WJpX7Ekw5t3gq6/7ihM=; b=dsVhwHxbJYhk4NeTS5JiM+R+BFWblZOQf5AUKVoBQFDC+wxwjiFWyLT2aVDL9LpXs3 +5moSsJ3tkKXlfxI7ut+SjZJZ7nWFcsJy2FR8crISU+1S1f1fak+wygqtTlXmHYry4xi /nHG4T+KD/WasWSO2HHDtjj4aBShz3ppoY/ZkMR3XVQM9mpG0J88MVMHpfpWiKf+wOej dEdWTM43CW+pmp7fAtJdQ47ACtt1VTeQFvwJMw7Nd4Lz6osh6gBWhHsaJ6TMbTaLzeZ/ fWUy8gwc5gaKQFVJSFVKgJk4du4R0YZJxVoKhEuVUwCM5JULFxfFOgG3jZXomgaGNu63 5Atw== X-Gm-Message-State: AOJu0YynzXgM3O5xe2oIZkJW4JlqWX9QX49/ccrlEyo1J7DlvT4De/bG TsXobH13WLmCRZi0VPyju8GosBQB0Dyvx+vSa6303mE8CwQTemiApSxe3ljiEMu/znGeRoahTUv Koarzyz8= X-Gm-Gg: ASbGnctJLwGB+L5ZKp8EPvcrmkNqb6Tw2iNZR4MZHCcWYmG2Y3RvD5dCns+w2+VyuCK 2HJ/UlvTQc/nRkG6SEfIuSn3gxuD8XmSQnvRhRIEW/f0AZEJAd1C/qQDGJIVwGqGlqitVPVPp9Q cnUJBHBvzJ7OXoTpCinQquf1fN/VoH4jwG83MV7m34jhZw7lnm7KDCrCM/9hoEN7/Ew3X1Zvj8O Joxi0lGv7+uKcnwrDgBn0hqWvgYq378Eka4oxRdNTdOS3m0abQx4lH4bZUGRIyh2SNPjKtOto89 bWIta3st22OjScHMEUD7lpt4dcYpBVPGVMhqVs9zeKB3vVf56iS7DIf9I3rfd7CfxevpzroilGM N5FXDMb7u3z0JJ5gSL46zwR1OttYCVb2vXlI/ X-Received: by 2002:a05:6000:2308:b0:3a5:88cf:479c with SMTP id ffacd0b85a97d-3a6d12d52c5mr2945845f8f.30.1750439706646; Fri, 20 Jun 2025 10:15:06 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a6d0ec947fsm2601237f8f.0.2025.06.20.10.15.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Jun 2025 10:15:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alexander Graf , Richard Henderson , Pierrick Bouvier , Peter Maydell , Thomas Huth , Cameron Esfahani , Julian Armistead , Paolo Bonzini , "Edgar E. Iglesias" , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [RFC PATCH v2 17/48] accel/tcg: Implement get_[vcpu]_stats() Date: Fri, 20 Jun 2025 19:13:10 +0200 Message-ID: <20250620171342.92678-18-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250620171342.92678-1-philmd@linaro.org> References: <20250620171342.92678-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/tcg-all.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 28206ca5e76..f5920b5796e 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -239,11 +239,17 @@ static int tcg_gdbstub_supported_sstep_flags(AccelState *as) } } +static void tcg_get_stats(AccelState *as, GString *buf) +{ + tcg_dump_flush_info(buf); +} + static void tcg_accel_class_init(ObjectClass *oc, const void *data) { AccelClass *ac = ACCEL_CLASS(oc); ac->name = "tcg"; ac->init_machine = tcg_init_machine; + ac->get_stats = tcg_get_stats; ac->allowed = &tcg_allowed; ac->supports_guest_debug = tcg_supports_guest_debug; ac->gdbstub_supported_sstep_flags = tcg_gdbstub_supported_sstep_flags;