From: Luiz Capitulino <lcapitulino@redhat.com>
To: Ting Wang <kathy.wangting@huawei.com>
Cc: stefanha@redhat.com, famz@redhat.com, qemu-devel@nongnu.org,
wu.wubin@huawei.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v5] hmp: add info iothreads command
Date: Thu, 30 Jul 2015 12:05:51 -0400 [thread overview]
Message-ID: <20150730120551.49b5d3c6@redhat.com> (raw)
In-Reply-To: <1435306033-58372-1-git-send-email-kathy.wangting@huawei.com>
On Fri, 26 Jun 2015 16:07:13 +0800
Ting Wang <kathy.wangting@huawei.com> wrote:
> Make "info iothreads" available on the HMP monitor.
>
> For example, the results are as follows when executing qemu
> command with "-object iothread,id=iothread-1 -object
> iothread,id=iothread-2".
> (qemu) info iothreads
> iothread-1: thread_id=123
> iothread-2: thread_id=456
>
> Signed-off-by: Ting Wang <kathy.wangting@huawei.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus will take this patch via his tree.
> ---
> v5: use "for" instead of "while"
> ---
> hmp-commands.hx | 2 ++
> hmp.c | 13 +++++++++++++
> hmp.h | 1 +
> monitor.c | 7 +++++++
> 4 files changed, 23 insertions(+)execute
>
> diff --git a/hmp-commands.hx b/hmp-commands.hx
> index d3b7932..c8c8d79 100644
> --- a/hmp-commands.hx
> +++ b/hmp-commands.hx
> @@ -1790,6 +1790,8 @@ show roms
> show the TPM device
> @item info memory-devices
> show the memory devices
> +@item info iothreads
> +show iothreads
> @end table
> ETEXI
>
> diff --git a/hmp.c b/hmp.c
> index 070aaf8..7192494 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1963,6 +1963,19 @@ void hmp_info_memory_devices(Monitor *mon, const QDict *qdict)
> qapi_free_MemoryDeviceInfoList(info_list);
> }
>
> +void hmp_info_iothreads(Monitor *mon, const QDict *qdict)
> +{
> + IOThreadInfoList *info_list = qmp_query_iothreads(NULL);
> + IOThreadInfoList *info;
> +
> + for (info = info_list; info; info = info->next) {
> + monitor_printf(mon, "%s: thread_id=%" PRId64 "\n",
> + info->value->id, info->value->thread_id);
> + }
> +
> + qapi_free_IOThreadInfoList(info_list);
> +}
> +
> void hmp_qom_list(Monitor *mon, const QDict *qdict)
> {
> const char *path = qdict_get_try_str(qdict, "path");
> diff --git a/hmp.h b/hmp.h
> index 0cf4f2a..c139a97 100644
> --- a/hmp.h
> +++ b/hmp.h
> @@ -39,6 +39,7 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict);
> void hmp_info_pci(Monitor *mon, const QDict *qdict);
> void hmp_info_block_jobs(Monitor *mon, const QDict *qdict);
> void hmp_info_tpm(Monitor *mon, const QDict *qdict);
> +void hmp_info_iothreads(Monitor *mon, const QDict *qdict);
> void hmp_quit(Monitor *mon, const QDict *qdict);
> void hmp_stop(Monitor *mon, const QDict *qdict);
> void hmp_system_reset(Monitor *mon, const QDict *qdict);
> diff --git a/monitor.c b/monitor.c
> index aeea2b5..917e827 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -2850,6 +2850,13 @@ static mon_cmd_t info_cmds[] = {
> .mhandler.cmd = hmp_info_memory_devices,
> },
> {
> + .name = "iothreads",
> + .args_type = "",
> + .params = "",
> + .help = "show iothreads",
> + .mhandler.cmd = hmp_info_iothreads,
> + },
> + {
> .name = "rocker",
> .args_type = "name:s",
> .params = "name",
next prev parent reply other threads:[~2015-07-30 16:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 8:07 [Qemu-devel] [PATCH v5] hmp: add info iothreads command Ting Wang
2015-07-03 12:43 ` Markus Armbruster
2015-07-06 2:24 ` Ting Wang
2015-07-30 16:05 ` Luiz Capitulino [this message]
2015-07-31 1:09 ` Ting Wang
2015-07-30 16:51 ` Amos Jianjun Kong
2015-07-30 17:07 ` Paolo Bonzini
2015-07-30 17:09 ` Amos Jianjun Kong
2015-08-05 9:54 ` Markus Armbruster
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=20150730120551.49b5d3c6@redhat.com \
--to=lcapitulino@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=kathy.wangting@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=wu.wubin@huawei.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).