[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] monitor: show sync profiling info with 'inf
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] monitor: show sync profiling info with 'info sync' |
Date: |
Tue, 14 Aug 2018 10:43:47 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
* Emilio G. Cota (address@hidden) wrote:
> Signed-off-by: Emilio G. Cota <address@hidden>
> ---
> monitor.c | 7 +++++++
> hmp-commands-info.hx | 16 ++++++++++++++++
> 2 files changed, 23 insertions(+)
>
> diff --git a/monitor.c b/monitor.c
> index 77861e96af..66d8d85b97 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -1454,6 +1454,13 @@ static void hmp_info_opcount(Monitor *mon, const QDict
> *qdict)
> }
> #endif
>
> +static void hmp_info_sync(Monitor *mon, const QDict *qdict)
> +{
> + int64_t max = qdict_get_try_int(qdict, "max", 10);
> +
> + qsp_report((FILE *)mon, monitor_fprintf, max);
> +}
> +
> static void hmp_info_history(Monitor *mon, const QDict *qdict)
> {
> int i;
> diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
> index 70639f656a..56a3249bad 100644
> --- a/hmp-commands-info.hx
> +++ b/hmp-commands-info.hx
> @@ -297,6 +297,22 @@ STEXI
> @item info opcount
> @findex info opcount
> Show dynamic compiler opcode counters
> +ETEXI
> +
> + {
> + .name = "sync",
> + .args_type = "max:i?",
> + .params = "[max]",
> + .help = "show sync profiling info for "
> + "up to max entries (default: 10). "
> + "Entries are sorted by wait time.",
> + .cmd = hmp_info_sync,
> + },
> +
> +STEXI
> address@hidden info sync
> address@hidden sync
> +Show sync profiling info.
> ETEXI
>
> {
As long as this is just for devs I'm OK with this from the HMP side;
however, if you want to automate the display or wire it to other
tools then you should probably wire it up via QMP.
Dave
> --
> 2.17.1
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK