From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Eduardo Habkost <ehabkost@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Cc: agraf@suse.de, qemu-devel@nongnu.org,
"Andreas Färber" <afaerber@suse.de>,
"Juan Quintela" <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK
Date: Fri, 01 May 2015 11:23:09 -0500 [thread overview]
Message-ID: <20150501162309.11253.4357@loki> (raw)
In-Reply-To: <20150501161905.11253.15908@loki>
Quoting Michael Roth (2015-05-01 11:19:05)
> Quoting Eduardo Habkost (2015-04-29 07:55:48)
> > On Wed, Apr 29, 2015 at 08:38:02AM -0400, Luiz Capitulino wrote:
> > > On Mon, 27 Apr 2015 14:23:20 -0300
> > > Eduardo Habkost <ehabkost@redhat.com> wrote:
> > >
> > > > On Sat, Apr 25, 2015 at 07:05:55PM +0200, Andreas Färber wrote:
> > > > > Am 25.04.2015 um 17:28 schrieb Eduardo Habkost:
> > > > > > The QJSON code used casts to (QJSON*) directly, instead of OBJECT_CHECK.
> > > > > > There were even some functions using object_dynamic_cast() calls
> > > > > > followed by assert(), which is exactly what OBJECT_CHECK does (by
> > > > > > calling object_dynamic_cast_assert()).
> > > > >
> > > > > Suggest s/OBJECT_CHECK/OBJECT_CHECK()/g everywhere for clarity.
> > >
> > > Everywhere? You mean, in other places? In this case someone has to
> > > post a different patch.
> >
> > Just in the commit message.
> >
> > >
> > > > I assume it can be fixed during commit by whoever is going to queue it.
> > > >
> > > > >
> > > > > >
> > > > > > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > > > > > ---
> > > > > > qjson.c | 10 +++++-----
> > > > > > 1 file changed, 5 insertions(+), 5 deletions(-)
> > > > >
> > > > > Reviewed-by: Andreas Färber <afaerber@suse.de>
> > > > >
> > > > > Wasn't aware QJSON is using QOM - assuming this will go through some
> > > > > QAPI/QMP tree.
> > > >
> > > > The only user of qjson.c right now is migration code. Should it go through
> > > > the migration tree?
> > >
> > > It could be, but I can take it if nobody does.
> >
> > Thanks!
> >
> > >
> > > > Also, why do we have two JSON writers in QEMU? And why do they have
> > > > exactly the same name?
> > >
> > > Not sure I got it, which writers?
> >
> > qjson.c and qobject/qjson.c:to_json().
>
> I'm guessing it's to avoid the need to build up a QObject throughout
> the migration code, as opposed to just serializing metadata/vmstate
> fields directly to string.
>
> Does make me wonder though why we don't just use visit_type_{int,etc}()
> interfaces to build up the QObject through a QMPOutputVisitor, then feed
> the resulting QObject through the existing qobject/qjson.c code.
I guess that would affect downtime. Don't imagine it would by much
though. A JSONOutputVisitor that simply wraps JSONMessageParser
and avoids the QObject intermediate might be another option.
>
> >
> > --
> > Eduardo
> >
next prev parent reply other threads:[~2015-05-01 16:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-25 15:28 [Qemu-devel] [PATCH] QJSON: Use OBJECT_CHECK Eduardo Habkost
2015-04-25 17:05 ` Andreas Färber
2015-04-27 17:23 ` Eduardo Habkost
2015-04-29 12:38 ` Luiz Capitulino
2015-04-29 12:46 ` Andreas Färber
2015-04-29 12:54 ` Luiz Capitulino
2015-04-29 12:55 ` Eduardo Habkost
2015-04-29 13:00 ` Luiz Capitulino
2015-05-01 16:19 ` Michael Roth
2015-05-01 16:23 ` Michael Roth [this message]
2015-05-02 14:44 ` Alexander Graf
2015-04-29 19:18 ` Paolo Bonzini
2015-05-01 12:04 ` Eduardo Habkost
2015-05-05 12:43 ` Juan Quintela
2015-05-05 12:53 ` Luiz Capitulino
2015-05-05 13:32 ` Juan Quintela
2015-05-01 17:16 ` Luiz Capitulino
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=20150501162309.11253.4357@loki \
--to=mdroth@linux.vnet.ibm.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=ehabkost@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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.