From: Markus Armbruster <armbru@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [PATCH v3 1/3] qmp: Support for querying stats
Date: Fri, 11 Feb 2022 14:51:30 +0100 [thread overview]
Message-ID: <87zgmxmrz1.fsf@pond.sub.org> (raw)
In-Reply-To: <YfkTCCFU0vg/PwgQ@redhat.com> ("Daniel P. Berrangé"'s message of "Tue, 1 Feb 2022 11:01:28 +0000")
Daniel P. Berrangé <berrange@redhat.com> writes:
> On Tue, Feb 01, 2022 at 11:51:26AM +0100, Paolo Bonzini wrote:
>> On 1/31/22 20:43, Mark Kanda wrote:
>> >
>> > { "execute": "query-stats", "arguments" : { "target": "vm" } }
>> > { "return": {
>> > "list": [
>> > { "provider": "kvm",
>> > "stats": [
>> > { "name": "max_mmu_page_hash_collisions", "value": 0 },
>> > { "name": "max_mmu_rmap_size", "value": 0 },
>> > { "name": "nx_lpage_splits", "value": 131 },
>> > ...
>> > ] }
>> > { "provider": "provider XYZ",
>> > ...
>> > ],
>> > "target": "vm"
>> > }
>> > }
>>
>> Perhaps it's better to have a better name than "list" for clarity, like you
>> already did with 'stats':
>>
>> { 'struct': 'VCPUResultsEntry',
>> 'data': { 'path': 'str',
>> 'providers': [ 'StatsResultsEntry' ] } }
>>
>> { 'struct': 'VCPUStatsResults',
>> 'data': { 'objects': [ 'VCPUResultsEntry' ] } }
>>
>>
>> { 'struct': 'VMStatsResults',
>> 'data': { 'providers' : [ 'StatsResultsEntry' ] } }
>>
>> Also, here:
>>
>> > +{ 'alternate': 'StatsValue',
>> > + 'data': { 'scalar': 'uint64',
>> > + 'list': 'StatsValueArray' } }
>>
>> is it possible to just do
>>
>> { 'alternate': 'StatsValue',
>> 'data': { 'scalar': 'uint64',
>> 'list': ['uint64'] } }
>
> No, the QAPI generator throws its toys out of the pram.
>
> It claims you can have any set of data types which have a
> distinct representation on the wire, so this is valid from
> that POV. Something about the parser/code generator can't
> cope with this inline array though - it wants a named type
> which means a built-in scalar, or a compound type, but not
> an array :-(
Array is not implemented, simply because we haven't had a use for it.
Should not make you settle for an inferior schema design! Implementing
array alternates shouldn't be hard.
next prev parent reply other threads:[~2022-02-11 14:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 19:43 [PATCH v3 0/3] Support fd-based KVM stats Mark Kanda
2022-01-31 19:43 ` [PATCH v3 1/3] qmp: Support for querying stats Mark Kanda
2022-02-01 10:51 ` Paolo Bonzini
2022-02-01 11:01 ` Daniel P. Berrangé
2022-02-11 13:51 ` Markus Armbruster [this message]
2022-02-01 12:08 ` Daniel P. Berrangé
2022-02-03 18:12 ` Mark Kanda
2022-02-03 18:30 ` Daniel P. Berrangé
2022-02-03 18:37 ` Mark Kanda
2022-02-03 18:39 ` Paolo Bonzini
2022-02-03 18:38 ` Paolo Bonzini
2022-02-03 18:53 ` Daniel P. Berrangé
2022-02-03 18:52 ` Mark Kanda
2022-01-31 19:43 ` [PATCH v3 2/3] hmp: " Mark Kanda
2022-01-31 19:43 ` [PATCH v3 3/3] kvm: Support for querying fd-based stats Mark Kanda
2022-02-01 10:08 ` Daniel P. Berrangé
2022-02-01 10:51 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zgmxmrz1.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.