[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC v2 08/12] VMState test: hmp interface for queryi
From: |
Sanidhya Kashyap |
Subject: |
[Qemu-devel] [PATCH RFC v2 08/12] VMState test: hmp interface for querying the vmstate testing process |
Date: |
Fri, 25 Jul 2014 21:09:32 +0530 |
Added a hmp interface for providing the information about the testing process.
I have used the underscore as a separater on Eric's advice. But, I have found
some of the commands having hyphen.
Signed-off-by: Sanidhya Kashyap <address@hidden>
---
hmp-commands.hx | 2 ++
hmp.c | 14 ++++++++++++++
hmp.h | 1 +
monitor.c | 7 +++++++
4 files changed, 24 insertions(+)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 6af72a6..c1dc6a2 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1770,6 +1770,8 @@ show migration status
show current migration capabilities
@item info migrate_cache_size
show current migration XBZRLE cache size
address@hidden info test_vmstates
+show current vmstates testing process info
@item info balloon
show balloon information
@item info qtree
diff --git a/hmp.c b/hmp.c
index 9e01127..385fb99 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1753,3 +1753,17 @@ void hmp_test_vmstates(Monitor *mon, const QDict *qdict)
error_free(err);
}
}
+
+void hmp_info_test_vmstates(Monitor *mon, const QDict *qdict)
+{
+ VMStateLogStateInfo *log_info = qmp_query_test_vmstates(NULL);
+
+ if (log_info) {
+ monitor_printf(mon, "current-iteration: %"PRId64 "\n"
+ "iterations: %"PRId64 "\n"
+ "period: %"PRId64 "\n",
log_info->current_iteration,
+ log_info->iterations, log_info->period);
+ }
+
+ qapi_free_VMStateLogStateInfo(log_info);
+}
diff --git a/hmp.h b/hmp.h
index 41bc781..b77f14c 100644
--- a/hmp.h
+++ b/hmp.h
@@ -39,6 +39,7 @@ 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_qdev_devices(Monitor *mon, const QDict *qdict);
+void hmp_info_test_vmstates(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 bf828d6..427eef1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2862,6 +2862,13 @@ static mon_cmd_t info_cmds[] = {
.mhandler.cmd = hmp_info_migrate_capabilities,
},
{
+ .name = "test_vmstates",
+ .args_type = "",
+ .params = "",
+ .help = "show current vmstates testing process info",
+ .mhandler.cmd = hmp_info_test_vmstates,
+ },
+ {
.name = "migrate_cache_size",
.args_type = "",
.params = "",
--
1.9.3
- Re: [Qemu-devel] [PATCH RFC v2 03/12] VMState test: query command to extract the qdevified device names, (continued)
- [Qemu-devel] [PATCH RFC v2 04/12] VMState test: hmp interface for showing qdevified devices, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 05/12] VMstate test: basic VMState testing mechanism, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 06/12] VMState test: hmp interface for vmstate testing, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 07/12] VMState test: qmp interface for querying the vmstate testing process, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 08/12] VMState test: hmp interface for querying the vmstate testing process,
Sanidhya Kashyap <=
- [Qemu-devel] [PATCH RFC v2 09/12] VMState test: update period of vmstate testing process, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 10/12] VMState test: hmp interface for period update, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 11/12] VMState test: cancel mechanism for an already running vmstate testing process, Sanidhya Kashyap, 2014/07/25
- [Qemu-devel] [PATCH RFC v2 12/12] VMState test: hmp interface for cancel mechanism, Sanidhya Kashyap, 2014/07/25