qemu-e2k/accel
Paolo Bonzini cf7405bc02 qmp: add filtering of statistics by name
Allow retrieving only a subset of statistics.  This can be useful
for example in order to plot a subset of the statistics many times
a second: KVM publishes ~40 statistics for each vCPU on x86; retrieving
and serializing all of them would be useless.

Another use will be in HMP in the following patch; implementing the
filter in the backend is easy enough that it was deemed okay to make
this a public interface.

Example:

{ "execute": "query-stats",
  "arguments": {
    "target": "vcpu",
    "vcpus": [ "/machine/unattached/device[2]",
               "/machine/unattached/device[4]" ],
    "providers": [
      { "provider": "kvm",
        "names": [ "l1d_flush", "exits" ] } } }

{ "return": {
    "vcpus": [
      { "path": "/machine/unattached/device[2]"
        "providers": [
          { "provider": "kvm",
            "stats": [ { "name": "l1d_flush", "value": 41213 },
                       { "name": "exits", "value": 74291 } ] } ] },
      { "path": "/machine/unattached/device[4]"
        "providers": [
          { "provider": "kvm",
            "stats": [ { "name": "l1d_flush", "value": 16132 },
                       { "name": "exits", "value": 57922 } ] } ] } ] } }

Extracted from a patch by Mark Kanda.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-14 16:50:30 +02:00
..
hvf Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
kvm qmp: add filtering of statistics by name 2022-06-14 16:50:30 +02:00
qtest misc: Remove unnecessary "sysemu/cpu-timers.h" include 2022-03-06 13:15:42 +01:00
stubs compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
tcg accel/tcg: Inline dump_opcount_info() and remove it 2022-06-11 11:44:50 +02:00
xen
accel-common.c
accel-softmmu.c
accel-softmmu.h
accel-user.c
dummy-cpus.c
Kconfig
meson.build accel/meson: Only build hw virtualization with system emulation 2022-03-06 13:15:42 +01:00