Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-10-04 Thread Kevin Wolf
Am 29.09.2016 um 12:23 hat Andreas Färber geschrieben: > Am 29.09.2016 um 12:21 schrieb Daniel P. Berrange: > > On Thu, Sep 29, 2016 at 12:12:32PM +0200, Andreas Färber wrote: > >> Am 29.09.2016 um 10:14 schrieb Daniel P. Berrange: > >>> Practically all instances properties should become class

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-30 Thread Daniel P. Berrange
On Fri, Sep 30, 2016 at 09:33:20AM +1000, David Gibson wrote: > On Thu, Sep 29, 2016 at 09:14:16AM +0100, Daniel P. Berrange wrote: > > On Thu, Sep 29, 2016 at 10:16:41AM +1000, David Gibson wrote: > > > QOM has the concept of both "object class" properties and "object > > > instance" properties.

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread David Gibson
On Thu, Sep 29, 2016 at 12:16:48PM +0200, Andreas Färber wrote: > Am 29.09.2016 um 02:16 schrieb David Gibson: > > is there really any value to supporting the "class" > > properties in addition to the "instance" properties? > > Yes, it makes enumerating available properties easier by not

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread David Gibson
On Thu, Sep 29, 2016 at 12:23:41PM +0200, Andreas Färber wrote: > Am 29.09.2016 um 12:21 schrieb Daniel P. Berrange: > > On Thu, Sep 29, 2016 at 12:12:32PM +0200, Andreas Färber wrote: > >> Am 29.09.2016 um 10:14 schrieb Daniel P. Berrange: > >>> Practically all instances properties should become

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread David Gibson
On Thu, Sep 29, 2016 at 09:14:16AM +0100, Daniel P. Berrange wrote: > On Thu, Sep 29, 2016 at 10:16:41AM +1000, David Gibson wrote: > > QOM has the concept of both "object class" properties and "object > > instance" properties. > > > > The accessor functions installed for the rarely-used class

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread Andreas Färber
Am 29.09.2016 um 12:21 schrieb Daniel P. Berrange: > On Thu, Sep 29, 2016 at 12:12:32PM +0200, Andreas Färber wrote: >> Am 29.09.2016 um 10:14 schrieb Daniel P. Berrange: >>> Practically all instances properties should become class properties >>> as its going to save wasting memory once most are

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2016 at 12:12:32PM +0200, Andreas Färber wrote: > Am 29.09.2016 um 10:14 schrieb Daniel P. Berrange: > > On Thu, Sep 29, 2016 at 10:16:41AM +1000, David Gibson wrote: > >> QOM has the concept of both "object class" properties and "object > >> instance" properties. > >> > >> The

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread Andreas Färber
Am 29.09.2016 um 02:16 schrieb David Gibson: > is there really any value to supporting the "class" > properties in addition to the "instance" properties? Yes, it makes enumerating available properties easier by not requiring to instantiate a new instance for printing, e.g., ",help" information.

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread Andreas Färber
Am 29.09.2016 um 10:14 schrieb Daniel P. Berrange: > On Thu, Sep 29, 2016 at 10:16:41AM +1000, David Gibson wrote: >> QOM has the concept of both "object class" properties and "object >> instance" properties. >> >> The accessor functions installed for the rarely-used class properties >> still take

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2016 at 10:16:41AM +1000, David Gibson wrote: > QOM has the concept of both "object class" properties and "object > instance" properties. > > The accessor functions installed for the rarely-used class properties > still take an Object *, so the *value* of such properties is still

Re: [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 02:16, David Gibson wrote: > Alternatively, if we *don't* want to remove class properties, should > we instead be trying to convert the many, many "instance" properties > whose existence is actually per-class to be class properties? Yes, this was the point of introducing them. :)

[Qemu-devel] [RFC 0/4] QOM class properties - do we need them?

2016-09-28 Thread David Gibson
QOM has the concept of both "object class" properties and "object instance" properties. The accessor functions installed for the rarely-used class properties still take an Object *, so the *value* of such properties is still per-instance; it's just the *existence* (and type) of the property that