summaryrefslogtreecommitdiffstats
path: root/hmp-commands-info.hx
diff options
context:
space:
mode:
authorMark Kanda2022-04-26 12:17:35 +0200
committerPaolo Bonzini2022-06-14 16:50:30 +0200
commit433815f5bdf71b5b2c47d9f1104816b95b551c49 (patch)
tree3b2174bd33dc9e2ecc21f983bbfe419d11d1bdda /hmp-commands-info.hx
parentcutils: add functions for IEC and SI prefixes (diff)
downloadqemu-433815f5bdf71b5b2c47d9f1104816b95b551c49.tar.gz
qemu-433815f5bdf71b5b2c47d9f1104816b95b551c49.tar.xz
qemu-433815f5bdf71b5b2c47d9f1104816b95b551c49.zip
hmp: add basic "info stats" implementation
Add an HMP command to retrieve statistics collected at run-time. The command will retrieve and print either all VM-level statistics, or all vCPU-level statistics for the currently selected CPU. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hmp-commands-info.hx')
-rw-r--r--hmp-commands-info.hx13
1 files changed, 13 insertions, 0 deletions
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
index 834bed089e..28757768f7 100644
--- a/hmp-commands-info.hx
+++ b/hmp-commands-info.hx
@@ -894,3 +894,16 @@ SRST
``info via``
Show guest mos6522 VIA devices.
ERST
+
+ {
+ .name = "stats",
+ .args_type = "target:s",
+ .params = "target",
+ .help = "show statistics; target is either vm or vcpu",
+ .cmd = hmp_info_stats,
+ },
+
+SRST
+ ``stats``
+ Show runtime-collected statistics
+ERST