qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Markus Armbruster" <armbru@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Eric Blake" <eblake@redhat.com>,
	"Cameron Esfahani" <dirty@apple.com>,
	"Mads Ynddal" <mads@ynddal.dk>,
	"Phil Dennis-Jordan" <phil@philjordan.eu>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Roman Bolshakov" <rbolshakov@ddn.com>
Subject: Re: [PATCH-for-10.1 v5 6/7] accel/tcg: Implement get_[vcpu]_stats()
Date: Tue, 15 Jul 2025 07:18:04 -0600	[thread overview]
Message-ID: <3bb37477-046c-4425-a96e-4dbef24c851e@linaro.org> (raw)
In-Reply-To: <9e199d53-9b7e-400a-9172-9986602cf6a7@linaro.org>

On 7/15/25 07:06, Philippe Mathieu-Daudé wrote:
> On 15/7/25 14:48, Richard Henderson wrote:
>> On 7/15/25 04:40, Philippe Mathieu-Daudé wrote:
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>> ---
>>>   accel/tcg/tcg-all.c | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>
>> Oh, this is what causes tcg-stats to be used by user-only binaries, is it?
> 
> Indeed, otherwise we'd have to use #ifdef'ry or stubs; and there is
> no good reason to not dump TCG stats on user emulation (except indeed
> this code path is currently unreachable there).

Ok, that's fine.  Let's avoid the ifdefs.

r~

> 
>>
>>>
>>> diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
>>> index eaeb465dfd5..fc3f28e3532 100644
>>> --- a/accel/tcg/tcg-all.c
>>> +++ b/accel/tcg/tcg-all.c
>>> @@ -236,6 +236,11 @@ static int tcg_gdbstub_supported_sstep_flags(AccelState *as)
>>>       }
>>>   }
>>> +static void tcg_get_stats(AccelState *as, GString *buf)
>>> +{
>>> +    tcg_dump_stats(as, buf);
>>> +}
>>
>> Is this shim preparatory for something else?
> 
> No, I didn't realize during rebase this can be simplified.
> 
>> Otherwise...
>>
>>> +
>>>   static void tcg_accel_class_init(ObjectClass *oc, const void *data)
>>>   {
>>>       AccelClass *ac = ACCEL_CLASS(oc);
>>> @@ -243,6 +248,7 @@ static void tcg_accel_class_init(ObjectClass *oc, const void *data)
>>>       ac->init_machine = tcg_init_machine;
>>>       ac->cpu_common_realize = tcg_exec_realizefn;
>>>       ac->cpu_common_unrealize = tcg_exec_unrealizefn;
>>> +    ac->get_stats = tcg_get_stats;
>>
>> ... assign tcg_dump_stats directly?
>>
>>
>> r~
>>
>>>       ac->allowed = &tcg_allowed;
>>>       ac->gdbstub_supported_sstep_flags = tcg_gdbstub_supported_sstep_flags;
>>
> 



  reply	other threads:[~2025-07-15 13:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 10:40 [PATCH-for-10.1 v5 0/7] accel/system: Add 'info accel' on human monitor Philippe Mathieu-Daudé
2025-07-15 10:40 ` [PATCH-for-10.1 v5 1/7] Revert "accel/tcg: Unregister the RCU before exiting RR thread" Philippe Mathieu-Daudé
2025-07-15 11:19   ` Manos Pitsidianakis
2025-07-15 12:38   ` Richard Henderson
2025-07-15 10:40 ` [PATCH-for-10.1 v5 2/7] accel/tcg: Extract statistic related code to tcg-stats.c Philippe Mathieu-Daudé
2025-07-15 12:44   ` Richard Henderson
2025-07-15 13:18   ` Richard Henderson
2025-07-15 10:40 ` [PATCH-for-10.1 v5 3/7] accel/system: Introduce @x-accel-stats QMP command Philippe Mathieu-Daudé
2025-07-15 10:40 ` [PATCH-for-10.1 v5 4/7] accel/system: Add 'info accel' on human monitor Philippe Mathieu-Daudé
2025-07-15 10:40 ` [PATCH-for-10.1 v5 5/7] accel/tcg: Propagate AccelState to tcg_dump_stats() Philippe Mathieu-Daudé
2025-07-15 11:19   ` Manos Pitsidianakis
2025-07-15 13:20   ` Richard Henderson
2025-07-15 10:40 ` [PATCH-for-10.1 v5 6/7] accel/tcg: Implement get_[vcpu]_stats() Philippe Mathieu-Daudé
2025-07-15 10:42   ` Philippe Mathieu-Daudé
2025-07-15 12:48   ` Richard Henderson
2025-07-15 13:06     ` Philippe Mathieu-Daudé
2025-07-15 13:18       ` Richard Henderson [this message]
2025-07-15 13:26         ` Philippe Mathieu-Daudé
2025-07-15 10:40 ` [PATCH-for-10.1 v5 7/7] accel/hvf: Implement get_vcpu_stats() Philippe Mathieu-Daudé
2025-07-15 10:57   ` Mads Ynddal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bb37477-046c-4425-a96e-4dbef24c851e@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=dirty@apple.com \
    --cc=eblake@redhat.com \
    --cc=mads@ynddal.dk \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=phil@philjordan.eu \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rbolshakov@ddn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).