|
From: | Paolo Bonzini |
Subject: | Re: [PATCH 7/8] qmp: add filtering of statistics by name |
Date: | Wed, 27 Apr 2022 14:18:42 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 4/27/22 14:01, Dr. David Alan Gilbert wrote:
"providers": [ { "provider": "kvm", "names": [ "l1d_flush", "exits" ] } } }That looks inconsistent to me; I realise that 'names' has to be a child of providers (since the names are only relevant to a given provider) but how about making the "target" work similarly: { "execute": "query-stats", "arguments": { "target": { "vcpus": [ "/machine/unattached/device[2]", "/machine/unattached/device[4]" ] },
This would allow queries for different types of targets in a single command, but it would be harder for the client to do filtering:
* with something like "target": { "vcpus": [ array ] }, there is no way for the client to say "I want this one statistic, but for all the vCPUs"
* if target is optional, a client might expect relatively small output from today's QEMU, yet suddenly get hundreds of KB from targets other than VMs and vCPUs (e.g. block devices including all backing files in the chain, NIC backends, etc.).
"providers": [ { "provider": "kvm", "names": [ "l1d_flush", "exits" ] } } } It's not clear to me whether the "target" should also be specific to a given provider.
No, the target is a QEMU concept, such as a CPU or a device backend. It is identified by either a QOM path or a unique id.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |