From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: [Qemu-devel] [PATCH v7 00/31] qapi visitor cleanups (post-introspection cleanups subset E)
Date: Mon, 7 Dec 2015 20:54:50 -0700 [thread overview]
Message-ID: <1449546921-6378-1-git-send-email-eblake@redhat.com> (raw)
Pending prerequisites:
+ Markus' qapi-not-next branch (including my subset D patches)
http://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/qapi-not-next
https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg00463.html
Also available as a tag at this location:
git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv7e
and will soon be part of my branch with the rest of the v5 series, at:
http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/qapi
v7 notes:
Rearrange several patches (trying to float the obvious ones up
front, moving hunks between patches to make review easier), and
add several new patches. In particular, I'm quite pleased with
how 29/31 turned out as a new patch for simplifying visitor
semantics; and 18-20 address an issue that caused some last-minute
flurry before 2.5-rc3.
Patch 31 is marked RFC because it might be overkill; when I first
conceived it, I thought a simple change to qapi-types.py and
GenericList in visitor.h would be enough to save memory; until
valgrind reminded me that if sizeof(GenericList) shrinks and
becomes variably-sized, I have to start passing sizes around. The
additional changes to visit_start_list() and visit_next_list()
didn't turn out as lean as I had hoped, so I'm okay if we ditch
that patch.
I'm very seriously considering writing a new JSON output visitor,
so that we can go straight from qapi to JSON without having to go
through an intermediate QObject tree, and as proof that the visitor
interface is starting to be better documented. But I guess I should
first focus on getting my subset F patches ready to go (we still
want to get netdev_add introspectible), since those have at least
been on list before.
Some patch retitling makes the backport-diff claim more new patches
than there actually are.
001/31:[down] 'qobject: Document more shortcomings in our number handling'
002/31:[down] 'qapi: Avoid use of misnamed DO_UPCAST()'
003/31:[down] 'qapi: Drop dead dealloc visitor variable'
004/31:[0008] [FC] 'hmp: Improve use of qapi visitor'
005/31:[0012] [FC] 'vl: Improve use of qapi visitor'
006/31:[----] [--] 'balloon: Improve use of qapi visitor'
007/31:[0007] [FC] 'qapi: Improve generated event use of qapi visitor'
008/31:[----] [--] 'qapi: Track all failures between visit_start/stop'
009/31:[down] 'qapi: Prefer type_int64 over type_int in visitors'
010/31:[down] 'qapi: Make all visitors supply uint64 callbacks'
011/31:[down] 'qapi: Consolidate visitor small integer callbacks'
012/31:[0002] [FC] 'qapi: Don't cast Enum* to int*'
013/31:[down] 'qapi: Drop unused 'kind' for struct/enum visit'
014/31:[0013] [FC] 'qapi: Drop unused error argument for list and implicit struct'
015/31:[0021] [FC] 'qmp: Fix reference-counting of qnull on empty output visit'
016/31:[down] 'qmp: Don't abuse stack to track qmp-output root'
017/31:[down] 'qapi: Document visitor interfaces, add assertions'
018/31:[down] 'qapi: Add visit_type_null() visitor'
019/31:[down] 'qmp: Tighten output visitor rules'
020/31:[down] 'spapr_drc: Expose 'null' in qom-get when there is no fdt'
021/31:[down] 'qapi: Simplify excess input reporting in input visitors'
022/31:[----] [-C] 'qapi: Add type.is_empty() helper'
023/31:[----] [--] 'qapi: Fix command with named empty argument type'
024/31:[0020] [FC] 'qapi: Eliminate empty visit_type_FOO_fields'
025/31:[0002] [FC] 'qapi: Canonicalize missing object to :empty'
026/31:[0002] [FC] 'qapi-visit: Unify struct and union visit'
027/31:[0002] [FC] 'qapi: Rework deallocation of partial struct'
028/31:[0030] [FC] 'qapi: Split visit_end_struct() into pieces'
029/31:[down] 'qapi: Simplify semantics of visit_next_list()'
030/31:[0154] [FC] 'qapi: Change visit_type_FOO() to no longer return partial objects'
031/31:[down] 'RFC: qapi: Adjust layout of FooList types
v6 notes:
https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg05793.html
My set of patches related to qapi visitors has grown, and it's time
that I post it on list again. Of course, since this is all 2.6
material, and there's already lots of patches earlier in the queue,
I may need a v7 to pick up rebase changes.
A lot of the new patches in this series are based on fallout from
implementing an early RFC posted against a v5 review:
https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg06878.html
v5 and earlier - look in the mail archives :)
Eric Blake (31):
qobject: Document more shortcomings in our number handling
qapi: Avoid use of misnamed DO_UPCAST()
qapi: Drop dead dealloc visitor variable
hmp: Improve use of qapi visitor
vl: Improve use of qapi visitor
balloon: Improve use of qapi visitor
qapi: Improve generated event use of qapi visitor
qapi: Track all failures between visit_start/stop
qapi: Prefer type_int64 over type_int in visitors
qapi: Make all visitors supply uint64 callbacks
qapi: Consolidate visitor small integer callbacks
qapi: Don't cast Enum* to int*
qapi: Drop unused 'kind' for struct/enum visit
qapi: Drop unused error argument for list and implicit struct
qmp: Fix reference-counting of qnull on empty output visit
qmp: Don't abuse stack to track qmp-output root
qapi: Document visitor interfaces, add assertions
qapi: Add visit_type_null() visitor
qmp: Tighten output visitor rules
spapr_drc: Expose 'null' in qom-get when there is no fdt
qapi: Simplify excess input reporting in input visitors
qapi: Add type.is_empty() helper
qapi: Fix command with named empty argument type
qapi: Eliminate empty visit_type_FOO_fields
qapi: Canonicalize missing object to :empty
qapi-visit: Unify struct and union visit
qapi: Rework deallocation of partial struct
qapi: Split visit_end_struct() into pieces
qapi: Simplify semantics of visit_next_list()
qapi: Change visit_type_FOO() to no longer return partial objects
RFC: qapi: Adjust layout of FooList types
hmp.c | 19 +-
hw/core/qdev-properties.c | 6 +-
hw/ppc/spapr_drc.c | 19 +-
hw/virtio/virtio-balloon.c | 25 +--
include/qapi/qmp-output-visitor.h | 1 +
include/qapi/visitor-impl.h | 92 ++++++----
include/qapi/visitor.h | 281 ++++++++++++++++++++++++++---
qapi/opts-visitor.c | 111 +++++++-----
qapi/qapi-dealloc-visitor.c | 97 ++++------
qapi/qapi-visit-core.c | 309 +++++++++++++++++---------------
qapi/qmp-input-visitor.c | 158 ++++++++--------
qapi/qmp-output-visitor.c | 149 +++++++--------
qapi/string-input-visitor.c | 83 +++++----
qapi/string-output-visitor.c | 78 ++++----
qobject/json-parser.c | 4 +-
qobject/qjson.c | 8 +-
qom/object.c | 13 +-
scripts/qapi-commands.py | 7 +-
scripts/qapi-event.py | 24 +--
scripts/qapi-types.py | 11 +-
scripts/qapi-visit.py | 248 +++++++++++++------------
scripts/qapi.py | 30 ++--
tests/qapi-schema/event-case.out | 2 +-
tests/qapi-schema/flat-union-empty.out | 1 +
tests/qapi-schema/ident-with-escape.out | 1 +
tests/qapi-schema/indented-expr.out | 4 +-
tests/qapi-schema/qapi-schema-test.json | 2 +
tests/qapi-schema/qapi-schema-test.out | 47 ++++-
tests/qapi-schema/union-clash-data.out | 2 +
tests/qapi-schema/union-empty.out | 1 +
tests/test-qmp-commands.c | 18 +-
tests/test-qmp-input-strict.c | 19 +-
tests/test-qmp-input-visitor.c | 10 +-
tests/test-qmp-output-visitor.c | 4 +
vl.c | 29 +--
35 files changed, 1129 insertions(+), 784 deletions(-)
--
2.4.3
next reply other threads:[~2015-12-08 3:55 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 3:54 Eric Blake [this message]
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 01/31] qobject: Document more shortcomings in our number handling Eric Blake
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 02/31] qapi: Avoid use of misnamed DO_UPCAST() Eric Blake
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 03/31] qapi: Drop dead dealloc visitor variable Eric Blake
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 04/31] hmp: Improve use of qapi visitor Eric Blake
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 05/31] vl: " Eric Blake
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 06/31] balloon: " Eric Blake
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 07/31] qapi: Improve generated event " Eric Blake
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 08/31] qapi: Track all failures between visit_start/stop Eric Blake
2015-12-08 3:54 ` [Qemu-devel] [PATCH v7 09/31] qapi: Prefer type_int64 over type_int in visitors Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 10/31] qapi: Make all visitors supply uint64 callbacks Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 11/31] qapi: Consolidate visitor small integer callbacks Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 12/31] qapi: Don't cast Enum* to int* Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 13/31] qapi: Drop unused 'kind' for struct/enum visit Eric Blake
2015-12-08 4:40 ` David Gibson
2015-12-11 13:51 ` Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 14/31] qapi: Drop unused error argument for list and implicit struct Eric Blake
2015-12-08 4:40 ` David Gibson
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 15/31] qmp: Fix reference-counting of qnull on empty output visit Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 16/31] qmp: Don't abuse stack to track qmp-output root Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 17/31] qapi: Document visitor interfaces, add assertions Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 18/31] qapi: Add visit_type_null() visitor Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 19/31] qmp: Tighten output visitor rules Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 20/31] spapr_drc: Expose 'null' in qom-get when there is no fdt Eric Blake
2015-12-08 4:40 ` David Gibson
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 21/31] qapi: Simplify excess input reporting in input visitors Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 22/31] qapi: Add type.is_empty() helper Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 23/31] qapi: Fix command with named empty argument type Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 24/31] qapi: Eliminate empty visit_type_FOO_fields Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 25/31] qapi: Canonicalize missing object to :empty Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 26/31] qapi-visit: Unify struct and union visit Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 27/31] qapi: Rework deallocation of partial struct Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 28/31] qapi: Split visit_end_struct() into pieces Eric Blake
2015-12-08 4:42 ` David Gibson
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 29/31] qapi: Simplify semantics of visit_next_list() Eric Blake
2015-12-08 4:51 ` David Gibson
2015-12-10 17:32 ` Eric Blake
2015-12-11 4:04 ` Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 30/31] qapi: Change visit_type_FOO() to no longer return partial objects Eric Blake
2015-12-08 3:55 ` [Qemu-devel] [PATCH v7 31/31] RFC: qapi: Adjust layout of FooList types Eric Blake
2015-12-08 4:54 ` David Gibson
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=1449546921-6378-1-git-send-email-eblake@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).