diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2014-02-27 11:48:42 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-03-13 14:42:24 +0100 |
commit | dc3dd0d2bed6edf3b60041f31200c674348168e9 (patch) | |
tree | 5b390cd8da5ebcf82d83844d858c6fd8f4e08d9d /qmp-commands.hx | |
parent | 88eb7c29e4320597d2f246adf731f0aac97cfbcc (diff) |
qmp: add query-iothreads command
The "query-iothreads" command returns a list of information about
iothreads. See the patch for API documentation.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index d982cd62b9..a22621fd44 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -2327,6 +2327,45 @@ EQMP }, SQMP +query-iothreads +--------------- + +Returns a list of information about each iothread. + +Note this list excludes the QEMU main loop thread, which is not declared +using the -object iothread command-line option. It is always the main thread +of the process. + +Return a json-array. Each iothread is represented by a json-object, which contains: + +- "id": name of iothread (json-str) +- "thread-id": ID of the underlying host thread (json-int) + +Example: + +-> { "execute": "query-iothreads" } +<- { + "return":[ + { + "id":"iothread0", + "thread-id":3134 + }, + { + "id":"iothread1", + "thread-id":3135 + } + ] + } + +EQMP + + { + .name = "query-iothreads", + .args_type = "", + .mhandler.cmd_new = qmp_marshal_input_query_iothreads, + }, + +SQMP query-pci --------- |