All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 17/21] qapi: Drop unused non-strict qobject input visitor
Date: Mon, 27 Feb 2017 06:46:04 +0100	[thread overview]
Message-ID: <87d1e4nq3n.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <fdf01e1e-c903-b029-8785-0c9f341d7d06@redhat.com> (Eric Blake's message of "Sat, 25 Feb 2017 15:16:33 -0600")

Eric Blake <eblake@redhat.com> writes:

> On 02/24/2017 09:02 AM, Markus Armbruster wrote:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>> 
>>> On 23/02/2017 22:45, Markus Armbruster wrote:
>>>> The split between tests/test-qobject-input-visitor.c and
>>>> tests/test-qobject-input-strict.c now makes less sense than ever.  The
>>>> next commit will take care of that.
>>>
>>> I'm actually adding a use for non-strict visitors (and one that makes
>>> sense IMHO, with comments, testcases and all that :)).  See
>>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg432069.html.
>> 
>> I replied.
>
> Hmm. Right now, we implement strict checking by populating a hash table
> in parallel to the QObject being visited, then checking if it gets
> emptied.  I wonder if it would be any simpler to clone the QObject and
> then remove keys, rather than tracking a separate hash table.  In fact,
> you could then turn strict checking into an after-the-fact item:
> creating the visitor passes in a QObject, then after the visit you check
> whether the QObject has been emptied.  But that's not something that has
> to be solved for 2.9.

Only dictionaries need to be cloned, everything else can be shared.

But cloning is still slow.

If QDict was an association list rather than an array, we could use a
bit vector to record visits.

Association list could well be better anyway.  I suspect most QDicts
have few keys.  Measurements needed to confirm.

>>> For what it's worth, however, I believe that even non-strict visits
>>> should detect unvisited list tails.
>> 
>> Bit of an asymmetry.  Not sure it matters, because to not visit list
>> tails, you have to put in some effort.

  reply	other threads:[~2017-02-27  5:46 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 21:44 [Qemu-devel] [PATCH 00/21] qapi: QMP dispatch and input visitor work Markus Armbruster
2017-02-23 21:44 ` [Qemu-devel] [PATCH 01/21] qga: Fix crash on non-dictionary QMP argument Markus Armbruster
2017-02-23 22:46   ` Eric Blake
2017-02-23 22:50     ` Eric Blake
2017-02-24  6:07       ` Markus Armbruster
2017-02-23 21:44 ` [Qemu-devel] [PATCH 02/21] libqtest: Work around a "QMP wants a newline" bug Markus Armbruster
2017-02-23 22:59   ` Eric Blake
2017-02-23 21:44 ` [Qemu-devel] [PATCH 03/21] qmp-test: New, covering basic QMP protocol Markus Armbruster
2017-02-23 23:05   ` Eric Blake
2017-02-24  6:12     ` Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 04/21] qmp: Dumb down how we run QMP command registration Markus Armbruster
2017-02-24 19:39   ` Eric Blake
2017-02-24 20:21     ` Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 05/21] qmp: Clean up how we enforce capability negotiation Markus Armbruster
2017-02-24 21:56   ` Eric Blake
2017-02-25  6:33     ` Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 06/21] qmp: Drop duplicated QMP command object checks Markus Armbruster
2017-02-24 23:03   ` Eric Blake
2017-02-25  6:37     ` Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 07/21] qmp: Eliminate silly QERR_QMP_* macros Markus Armbruster
2017-02-24 23:11   ` Eric Blake
2017-02-23 21:45 ` [Qemu-devel] [PATCH 08/21] qmp: Improve QMP dispatch error messages Markus Armbruster
2017-02-24 23:13   ` Eric Blake
2017-02-25  6:39     ` Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 09/21] qapi: Improve a QObject input visitor error message Markus Armbruster
2017-02-25 15:44   ` Eric Blake
2017-02-23 21:45 ` [Qemu-devel] [PATCH 10/21] qapi: Clean up after commit 3d344c2 Markus Armbruster
2017-02-25 15:45   ` Eric Blake
2017-02-23 21:45 ` [Qemu-devel] [PATCH 11/21] qapi: Make QObject input visitor set *list reliably Markus Armbruster
2017-02-25 15:56   ` Eric Blake
2017-02-23 21:45 ` [Qemu-devel] [PATCH 12/21] qapi: Improve qobject input visitor error reporting Markus Armbruster
2017-02-25 16:08   ` Eric Blake
2017-02-27  5:31     ` Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 13/21] qapi: Drop string input visitor method optional() Markus Armbruster
2017-02-25 16:12   ` Eric Blake
2017-02-23 21:45 ` [Qemu-devel] [PATCH 14/21] qapi: Make string input and opts visitor require non-null input Markus Armbruster
2017-02-25 16:14   ` Eric Blake
2017-02-23 21:45 ` [Qemu-devel] [PATCH 15/21] qom: Make object_property_set_qobject()'s input visitor strict Markus Armbruster
2017-02-25 16:15   ` Eric Blake
2017-02-23 21:45 ` [Qemu-devel] [PATCH 16/21] test-qobject-input-visitor: Use strict visitor Markus Armbruster
2017-02-25 16:30   ` Eric Blake
2017-02-27  5:35     ` Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 17/21] qapi: Drop unused non-strict qobject input visitor Markus Armbruster
2017-02-24  9:27   ` Paolo Bonzini
2017-02-24 15:02     ` Markus Armbruster
2017-02-25 21:16       ` Eric Blake
2017-02-27  5:46         ` Markus Armbruster [this message]
2017-02-23 21:45 ` [Qemu-devel] [PATCH 18/21] tests-qobject-input-strict: Merge into test-qobject-input-visitor Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 19/21] tests: Cover partial input visit of list Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 20/21] qapi: Make input visitors detect unvisited list tails Markus Armbruster
2017-02-23 21:45 ` [Qemu-devel] [PATCH 21/21] qapi: Improve qobject visitor documentation Markus Armbruster
2017-02-24 19:49 ` [Qemu-devel] [PATCH 00/21] qapi: QMP dispatch and input visitor work no-reply

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=87d1e4nq3n.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@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.