hmp: add filtering of statistics by name
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 Apr 2022 12:09:31 +0000 (14:09 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Jun 2022 14:50:30 +0000 (16:50 +0200)
commit39cd0c7f12883ea99c3b321d836cb63b67352621
treea1819792d496e49ba31af314d160b66979932351
parentcf7405bc0228c795557e19bacbaa3b145bb17370
hmp: add filtering of statistics by name

Allow the user to request only a specific subset of statistics.
This can be useful when working on a feature or optimization that is
known to affect that statistic.

Example:

   (qemu) info stats vcpu halt_poll_fail_ns
   provider: kvm
       halt_poll_fail_ns (cumulative, ns): 0

In case multiple providers have the same statistic, the provider can be
specified too:

   (qemu) info stats vcpu halt_poll_fail_ns kvm
   provider: kvm
       halt_poll_fail_ns (cumulative, ns): 0

Extracted from a patch by Mark Kanda.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hmp-commands-info.hx
monitor/hmp-cmds.c