summary refs log tree commit diff stats
path: root/hmp-commands.hx
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2021-06-07 09:11:57 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2021-06-08 20:18:26 +0100
commita4a571d97866d056787d7a654be5792765be8a60 (patch)
tree1610dad29b044c9e4fbedaa14faab8421d5c50b3 /hmp-commands.hx
parent7afa08cd8fd2e5016658c39f6eb327e92edf0612 (diff)
downloadfocaccia-qemu-a4a571d97866d056787d7a654be5792765be8a60.tar.gz
focaccia-qemu-a4a571d97866d056787d7a654be5792765be8a60.zip
hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds
These two commands are missing when adding the QMP sister commands.
Add them, so developers can play with them easier.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Message-Id: <4cc0039fc3ad6145136770cf3b0f056c09a2910b.1623027729.git.huangy81@chinatelecom.cn>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'hmp-commands.hx')
-rw-r--r--hmp-commands.hx14
1 files changed, 14 insertions, 0 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 2d21fe5ad4..84dcc3aae6 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1727,3 +1727,17 @@ ERST
         .flags      = "p",
     },
 
+SRST
+``calc_dirty_rate`` *second*
+  Start a round of dirty rate measurement with the period specified in *second*.
+  The result of the dirty rate measurement may be observed with ``info
+  dirty_rate`` command.
+ERST
+
+    {
+        .name       = "calc_dirty_rate",
+        .args_type  = "second:l,sample_pages_per_GB:l?",
+        .params     = "second [sample_pages_per_GB]",
+        .help       = "start a round of guest dirty rate measurement",
+        .cmd        = hmp_calc_dirty_rate,
+    },