qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] Monitor patches
@ 2015-09-04 14:24 Markus Armbruster
  2015-09-04 14:24 ` [Qemu-devel] [PULL 1/2] qmp-shell: add documentation Markus Armbruster
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Markus Armbruster @ 2015-09-04 14:24 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit b041066421e8dcc7d080dfcfd83551c9c9f24ade:

  Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2015-09-03 16:17:28 +0100)

are available in the git repository at:

  git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2015-09-04

for you to fetch changes up to 62313160cb5b6bdfbd77a063e94a5a7d25e59f2b:

  hmp: add info iothreads command (2015-09-04 13:26:26 +0200)

----------------------------------------------------------------
Monitor patches

----------------------------------------------------------------
John Snow (1):
      qmp-shell: add documentation

Ting Wang (1):
      hmp: add info iothreads command

 hmp-commands.hx       |  2 ++
 hmp.c                 | 13 +++++++++++++
 hmp.h                 |  1 +
 monitor.c             |  7 +++++++
 scripts/qmp/qmp-shell | 35 +++++++++++++++++++++++++++++++++++
 5 files changed, 58 insertions(+)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 1/2] qmp-shell: add documentation
  2015-09-04 14:24 [Qemu-devel] [PULL 0/2] Monitor patches Markus Armbruster
@ 2015-09-04 14:24 ` Markus Armbruster
  2015-09-04 14:24 ` [Qemu-devel] [PULL 2/2] hmp: add info iothreads command Markus Armbruster
  2015-09-04 17:54 ` [Qemu-devel] [PULL 0/2] Monitor patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2015-09-04 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: John Snow

From: John Snow <jsnow@redhat.com>

I should probably document the changes that were made.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <1435775149-17285-1-git-send-email-jsnow@redhat.com>
Reviewed-By: Kashyap Chamarthy <kchamart@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 scripts/qmp/qmp-shell | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index 65280d2..fa39bf0 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -29,6 +29,41 @@
 # (QEMU) device_add driver=e1000 id=net1
 # {u'return': {}}
 # (QEMU)
+#
+# key=value pairs also support Python or JSON object literal subset notations,
+# without spaces. Dictionaries/objects {} are supported as are arrays [].
+#
+#    example-command arg-name1={'key':'value','obj'={'prop':"value"}}
+#
+# Both JSON and Python formatting should work, including both styles of
+# string literal quotes. Both paradigms of literal values should work,
+# including null/true/false for JSON and None/True/False for Python.
+#
+#
+# Transactions have the following multi-line format:
+#
+#    transaction(
+#    action-name1 [ arg-name1=arg1 ] ... [arg-nameN=argN ]
+#    ...
+#    action-nameN [ arg-name1=arg1 ] ... [arg-nameN=argN ]
+#    )
+#
+# One line transactions are also supported:
+#
+#    transaction( action-name1 ... )
+#
+# For example:
+#
+#     (QEMU) transaction(
+#     TRANS> block-dirty-bitmap-add node=drive0 name=bitmap1
+#     TRANS> block-dirty-bitmap-clear node=drive0 name=bitmap0
+#     TRANS> )
+#     {"return": {}}
+#     (QEMU)
+#
+# Use the -v and -p options to activate the verbose and pretty-print options,
+# which will echo back the properly formatted JSON-compliant QMP that is being
+# sent to QEMU, which is useful for debugging and documentation generation.
 
 import qmp
 import json
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 2/2] hmp: add info iothreads command
  2015-09-04 14:24 [Qemu-devel] [PULL 0/2] Monitor patches Markus Armbruster
  2015-09-04 14:24 ` [Qemu-devel] [PULL 1/2] qmp-shell: add documentation Markus Armbruster
@ 2015-09-04 14:24 ` Markus Armbruster
  2015-09-04 17:54 ` [Qemu-devel] [PULL 0/2] Monitor patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2015-09-04 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: Ting Wang

From: Ting Wang <kathy.wangting@huawei.com>

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>
---
 hmp-commands.hx |  2 ++
 hmp.c           | 13 +++++++++++++
 hmp.h           |  1 +
 monitor.c       |  7 +++++++
 4 files changed, 23 insertions(+)

diff --git a/hmp-commands.hx b/hmp-commands.hx
index d6e81e4..286dcc7 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1809,6 +1809,8 @@ show the TPM device
 show the memory devices
 @item info skeys
 Display the value of a storage key (s390 only)
+@item info iothreads
+show iothreads
 @end table
 ETEXI
 
diff --git a/hmp.c b/hmp.c
index dcc66f1..3f807b7 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 b8f5d33..81656c3 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 b1f2a29..5455ab9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2854,6 +2854,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",
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] Monitor patches
  2015-09-04 14:24 [Qemu-devel] [PULL 0/2] Monitor patches Markus Armbruster
  2015-09-04 14:24 ` [Qemu-devel] [PULL 1/2] qmp-shell: add documentation Markus Armbruster
  2015-09-04 14:24 ` [Qemu-devel] [PULL 2/2] hmp: add info iothreads command Markus Armbruster
@ 2015-09-04 17:54 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-09-04 17:54 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: QEMU Developers

On 4 September 2015 at 15:24, Markus Armbruster <armbru@redhat.com> wrote:
> The following changes since commit b041066421e8dcc7d080dfcfd83551c9c9f24ade:
>
>   Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2015-09-03 16:17:28 +0100)
>
> are available in the git repository at:
>
>   git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2015-09-04
>
> for you to fetch changes up to 62313160cb5b6bdfbd77a063e94a5a7d25e59f2b:
>
>   hmp: add info iothreads command (2015-09-04 13:26:26 +0200)
>
> ----------------------------------------------------------------
> Monitor patches
>

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-04 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 14:24 [Qemu-devel] [PULL 0/2] Monitor patches Markus Armbruster
2015-09-04 14:24 ` [Qemu-devel] [PULL 1/2] qmp-shell: add documentation Markus Armbruster
2015-09-04 14:24 ` [Qemu-devel] [PULL 2/2] hmp: add info iothreads command Markus Armbruster
2015-09-04 17:54 ` [Qemu-devel] [PULL 0/2] Monitor patches Peter Maydell

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).