qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 22/22] qapi: introduce x-query-opcount QMP command


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v4 22/22] qapi: introduce x-query-opcount QMP command
Date: Thu, 28 Oct 2021 19:08:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 10/28/21 17:54, Daniel P. Berrangé wrote:
> This is a counterpart to the HMP "info opcount" command. It is being
> added with an "x-" prefix because this QMP command is intended as an
> ad hoc debugging tool and will thus not be modelled in QAPI as fully
> structured data, nor will it have long term guaranteed stability.
> The existing HMP command is rewritten to call the QMP command.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  accel/tcg/cpu-exec.c       | 14 ++++++++++++++
>  accel/tcg/hmp.c            |  7 +------
>  accel/tcg/translate-all.c  |  4 ++--
>  include/exec/cpu-all.h     |  2 +-
>  include/tcg/tcg.h          |  2 +-
>  qapi/machine.json          | 13 +++++++++++++
>  tcg/tcg.c                  | 10 +++++-----
>  tests/qtest/qmp-cmd-test.c |  1 +
>  8 files changed, 38 insertions(+), 15 deletions(-)
> 
> diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
> index 4212645cb6..7a7e813207 100644
> --- a/accel/tcg/cpu-exec.c
> +++ b/accel/tcg/cpu-exec.c
> @@ -1066,4 +1066,18 @@ HumanReadableText *qmp_x_query_jit(Error **errp)
>      return human_readable_text_from_str(buf);
>  }
>  
> +HumanReadableText *qmp_x_query_opcount(Error **errp)
> +{
> +    g_autoptr(GString) buf = g_string_new("");
> +
> +    if (!tcg_enabled()) {
> +        error_setg(errp, "JIT information is only available with accel=tcg");

s/JIT/Opcode count/ ? Otherwise,
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


> +        return NULL;
> +    }
> +
> +    dump_opcount_info(buf);
> +
> +    return human_readable_text_from_str(buf);
> +}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]