qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	qemu-block@nongnu.org, "David Hildenbrand" <david@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Peter Lieven" <pl@kamp.de>, "Greg Kurz" <groug@kaod.org>,
	qemu-s390x@nongnu.org,
	"Ronnie Sahlberg" <ronniesahlberg@gmail.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v4 34/34] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically
Date: Thu, 24 Jun 2021 15:57:12 +0100	[thread overview]
Message-ID: <YNSdSDAo1XKakpMK@work-vm> (raw)
In-Reply-To: <20210624103836.2382472-35-kraxel@redhat.com>

* Gerd Hoffmann (kraxel@redhat.com) wrote:
> One more little step towards modular tcg ...
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  accel/tcg/hmp.c       | 29 +++++++++++++++++++++++++++++
>  monitor/misc.c        | 18 ------------------
>  accel/tcg/meson.build |  1 +
>  hmp-commands-info.hx  |  2 --
>  4 files changed, 30 insertions(+), 20 deletions(-)
>  create mode 100644 accel/tcg/hmp.c
> 
> diff --git a/accel/tcg/hmp.c b/accel/tcg/hmp.c
> new file mode 100644
> index 000000000000..a6e72fdb3ed6
> --- /dev/null
> +++ b/accel/tcg/hmp.c
> @@ -0,0 +1,29 @@
> +#include "qemu/osdep.h"
> +#include "qemu/error-report.h"
> +#include "exec/exec-all.h"
> +#include "monitor/monitor.h"
> +#include "sysemu/tcg.h"
> +
> +static void hmp_info_jit(Monitor *mon, const QDict *qdict)
> +{
> +    if (!tcg_enabled()) {
> +        error_report("JIT information is only available with accel=tcg");
> +        return;
> +    }
> +
> +    dump_exec_info();
> +    dump_drift_info();
> +}
> +
> +static void hmp_info_opcount(Monitor *mon, const QDict *qdict)
> +{
> +    dump_opcount_info();
> +}
> +
> +static void hmp_tcg_register(void)
> +{
> +    monitor_register_hmp("jit", true, hmp_info_jit);
> +    monitor_register_hmp("opcount", true, hmp_info_opcount);
> +}
> +
> +type_init(hmp_tcg_register);
> diff --git a/monitor/misc.c b/monitor/misc.c
> index ad476c6e51ea..b28874d6dc59 100644
> --- a/monitor/misc.c
> +++ b/monitor/misc.c
> @@ -320,24 +320,6 @@ static void hmp_info_registers(Monitor *mon, const QDict *qdict)
>      }
>  }
>  
> -#ifdef CONFIG_TCG
> -static void hmp_info_jit(Monitor *mon, const QDict *qdict)
> -{
> -    if (!tcg_enabled()) {
> -        error_report("JIT information is only available with accel=tcg");
> -        return;
> -    }
> -
> -    dump_exec_info();
> -    dump_drift_info();
> -}
> -
> -static void hmp_info_opcount(Monitor *mon, const QDict *qdict)
> -{
> -    dump_opcount_info();
> -}
> -#endif
> -
>  static void hmp_info_sync_profile(Monitor *mon, const QDict *qdict)
>  {
>      int64_t max = qdict_get_try_int(qdict, "max", 10);
> diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build
> index 0ae9180282e3..137a1a44cc0a 100644
> --- a/accel/tcg/meson.build
> +++ b/accel/tcg/meson.build
> @@ -15,6 +15,7 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
>  
>  specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files(
>    'cputlb.c',
> +  'hmp.c',
>  ))
>  
>  tcg_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files(
> diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
> index ce42aef47acb..27206ac049df 100644
> --- a/hmp-commands-info.hx
> +++ b/hmp-commands-info.hx
> @@ -274,7 +274,6 @@ ERST
>          .args_type  = "",
>          .params     = "",
>          .help       = "show dynamic compiler info",
> -        .cmd        = hmp_info_jit,
>      },
>  #endif
>  
> @@ -289,7 +288,6 @@ ERST
>          .args_type  = "",
>          .params     = "",
>          .help       = "show dynamic compiler opcode counters",
> -        .cmd        = hmp_info_opcount,
>      },
>  #endif
>  
> -- 
> 2.31.1
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



  reply	other threads:[~2021-06-24 14:58 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 10:38 [PATCH v4 00/34] modules: add meta-data database Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 01/34] modules: add modinfo macros Gerd Hoffmann
2021-06-24 20:37   ` Eduardo Habkost
2021-07-06 17:07     ` Paolo Bonzini
2021-06-24 10:38 ` [PATCH v4 02/34] modules: collect module meta-data Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 03/34] modules: generate modinfo.c Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 04/34] modules: check if all dependencies can be satisfied Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 05/34] modules: add qxl module annotations Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 06/34] modules: add virtio-gpu " Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 07/34] modules: add chardev " Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 08/34] modules: add audio " Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 09/34] modules: add usb-redir " Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 10/34] modules: add ccid " Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 11/34] modules: add ui " Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 12/34] modules: add s390x " Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 13/34] modules: add block " Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 14/34] modules: use modinfo for dependencies Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 15/34] modules: use modinfo for qom load Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 16/34] modules: use modinfo for qemu opts load Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 17/34] modules: add tracepoints Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 18/34] modules: check arch and block load on mismatch Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 19/34] modules: check arch on qom lookup Gerd Hoffmann
2024-08-27 15:37   ` Philippe Mathieu-Daudé
2024-08-28  7:45     ` Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 20/34] modules: target-specific module build infrastructure Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 21/34] modules: add documentation for module sourcesets Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 22/34] modules: add module_obj() note to QOM docs Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 23/34] modules: module.h kerneldoc annotations Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 24/34] modules: hook up modules.h to docs build Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 25/34] accel: autoload modules Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 26/34] accel: add qtest module annotations Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 27/34] accel: build qtest modular Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 28/34] accel: add tcg module annotations Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 29/34] accel: build tcg modular Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 30/34] monitor: allow register hmp commands Gerd Hoffmann
2021-06-24 14:55   ` Dr. David Alan Gilbert
2021-06-24 17:40     ` Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 31/34] usb: drop usb_host_dev_is_scsi_storage hook Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 32/34] monitor/usb: register 'info usbhost' dynamically Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 33/34] usb: build usb-host as module Gerd Hoffmann
2021-06-24 10:38 ` [PATCH v4 34/34] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically Gerd Hoffmann
2021-06-24 14:57   ` Dr. David Alan Gilbert [this message]
2021-06-24 14:48 ` [PATCH v4 00/34] modules: add meta-data database Jose R. Ziviani
2021-06-24 15:01 ` Dr. David Alan Gilbert
2021-06-24 17:28   ` Gerd Hoffmann
2021-06-24 18:02     ` Dr. David Alan Gilbert

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=YNSdSDAo1XKakpMK@work-vm \
    --to=dgilbert@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=crosa@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=david@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=groug@kaod.org \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=thuth@redhat.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).