aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorTing Wang <kathy.wangting@huawei.com>2015-06-26 16:07:13 +0800
committerMarkus Armbruster <armbru@redhat.com>2015-09-04 13:26:26 +0200
commit62313160cb5b6bdfbd77a063e94a5a7d25e59f2b (patch)
tree651ee5eb53ea1c66dee76fac1e2c8a2802f3efcf /hmp.c
parente2f9a6572bb400e64e7a56526c5f7a4a9f8f6f90 (diff)
hmp: add info iothreads command
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> Message-Id: <1435306033-58372-1-git-send-email-kathy.wangting@huawei.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Amos Jianjun Kong <kongjianjun@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index dcc66f159a..3f807b75f1 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");