qemu-e2k/include
Eric Blake 55e1819c50 qobject: Simplify QObject
The QObject hierarchy is small enough, and unlikely to grow further
(since we only use it to map to JSON and already cover all JSON
types), that we can simplify things by not tracking a separate
vtable, but just inline the code element of the vtable QType
directly into QObject (renamed to type), and track a separate array
of destroy functions.  We can drop qnull_destroy_obj() in the
process.

The remaining QObject subclasses must export their destructor.

This also has the nice benefit of moving the typename 'QType'
out of the way, so that the next patch can repurpose it for a
nicer name for 'qtype_code'.

The various objects are still the same size (so no change in cache
line pressure), but now have less indirection (although I didn't
bother benchmarking to see if there is a noticeable speedup, as
we don't have hard evidence that this was in a performance hotspot
in the first place).

A future patch could drop the refcnt size to 32 bits for a smaller
struct on 64-bit architectures, if desired (we have limits on the
largest JSON that we are willing to parse, and will probably never
need to take full advantage of a 64-bit refcnt).

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1449033659-25497-2-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2015-12-17 08:21:28 +01:00
..
block blkdebug: Merge hand-rolled and qapi BlkdebugEvent enum 2015-12-17 08:21:27 +01:00
crypto crypto: introduce new module for handling TLS sessions 2015-09-15 15:07:43 +01:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec translate-all: ensure host page mask is always extended with 1's 2015-12-02 13:12:30 +01:00
fpu softfloat: expand out STATUS macro 2015-02-06 16:11:38 +00:00
hw sdhci: Sanitize "sdhci-pci" properties for future qomification 2015-12-07 17:13:10 +00:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration qapi: Don't let implicit enum MAX member collide 2015-12-17 08:21:28 +01:00
monitor monitor/target-ppc: Define target_get_monitor_def 2015-11-12 14:53:36 +11:00
net vhost user: add rarp sending after live migration for legacy guest 2015-10-22 14:34:49 +03:00
qapi qobject: Simplify QObject 2015-12-17 08:21:28 +01:00
qemu typedefs: Put them back into alphabetical order 2015-12-04 09:39:55 +03:00
qom qom: Update documentation comment of struct Object 2015-12-03 20:10:22 +01:00
standard-headers linux-headers: update from kvm/next 2015-10-12 18:29:26 +02:00
sysemu oslib-win32: Change return type of function getpagesize 2015-11-30 06:47:02 +01:00
ui replay: recording of the user input 2015-11-06 10:16:03 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h elf: Update EM_MOXIE definition 2015-09-25 12:04:43 +02:00
glib-compat.h glib: add compatibility interface for g_hash_table_add() 2015-10-30 09:01:03 +01:00
qemu-common.h Move page_size_init earlier 2015-11-10 14:51:48 +01:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00