All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/4] QOM class properties - do we need them?
@ 2016-09-29  0:16 David Gibson
  2016-09-29  0:16 ` [Qemu-devel] [RFC 1/4] qcrypto: Remove usage of class properties David Gibson
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: David Gibson @ 2016-09-29  0:16 UTC (permalink / raw)
  To: afaerber, peter.maydell
  Cc: armbru, pbonzini, lcapitulino, qemu-devel, 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 is per-class.

Of course, that's also true in practice for the great majority of
"instance" properties, because they're created identically and
unconditionally for every instance from the per-class instance_init
hook.

This also means that the (unused) object_class_property_add_*_ptr()
functions don't make a lot of sense, since they require a fixed
pointer which means the value of such a property would only be
per-class.

Given that, is there really any value to supporting the "class"
properties in addition to the "instance" properties?  This series is
an RFC which removes all support for class properties, changing the
few existing users to instance properties instead.

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?

David Gibson (4):
  qcrypto: Remove usage of class properties
  s390: Don't use class properties
  tests: Remove tests for class properties
  qom: Abolish class properties

 crypto/secret.c            |  58 +++++++-------
 crypto/tlscreds.c          |  44 +++++-----
 crypto/tlscredsanon.c      |  16 ++--
 crypto/tlscredsx509.c      |  26 +++---
 include/qom/object.h       |  42 ----------
 qom/object.c               | 195 ---------------------------------------------
 target-s390x/cpu.c         |   1 -
 target-s390x/cpu_models.c  |  47 +++++------
 tests/check-qom-proplist.c |  30 +++----
 9 files changed, 106 insertions(+), 353 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-10-04  9:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29  0:16 [Qemu-devel] [RFC 0/4] QOM class properties - do we need them? David Gibson
2016-09-29  0:16 ` [Qemu-devel] [RFC 1/4] qcrypto: Remove usage of class properties David Gibson
2016-09-29  0:16 ` [Qemu-devel] [RFC 2/4] s390: Don't use " David Gibson
2016-09-29  0:16 ` [Qemu-devel] [RFC 3/4] tests: Remove tests for " David Gibson
2016-09-29  0:16 ` [Qemu-devel] [RFC 4/4] qom: Abolish " David Gibson
2016-09-29  7:52 ` [Qemu-devel] [RFC 0/4] QOM class properties - do we need them? Paolo Bonzini
2016-09-29  8:14 ` Daniel P. Berrange
2016-09-29 10:12   ` Andreas Färber
2016-09-29 10:21     ` Daniel P. Berrange
2016-09-29 10:23       ` Andreas Färber
2016-09-29 23:36         ` David Gibson
2016-10-04  9:51         ` Kevin Wolf
2016-09-29 23:33   ` David Gibson
2016-09-30  8:06     ` Daniel P. Berrange
2016-09-29 10:16 ` Andreas Färber
2016-09-29 23:37   ` David Gibson

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.