hmp: add filtering of statistics by provider

Allow the user to request statistics for a single provider of interest.
Extracted from a patch by Mark Kanda.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini
2022-04-26 13:58:59 +02:00
parent 068cc51d42
commit 7716417eac
2 changed files with 36 additions and 10 deletions

View File

@ -897,9 +897,10 @@ ERST
{
.name = "stats",
.args_type = "target:s",
.params = "target",
.help = "show statistics; target is either vm or vcpu",
.args_type = "target:s,provider:s?",
.params = "target [provider]",
.help = "show statistics for the given target (vm or vcpu); optionally filter by "
"provider",
.cmd = hmp_info_stats,
},