summaryrefslogtreecommitdiffstats
path: root/hw/qdev.h
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-12 14:29:40 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-15 09:20:49 -0600
commitb2b6c39a7915e82cade4ab8689344c91c5e45653 (patch)
tree54aaf0ea1a1e21f9f0b516081a2cd9b8db071c36 /hw/qdev.h
parent182970509bd79635a5b16a06d2e918d3f5187486 (diff)
downloadhqemu-b2b6c39a7915e82cade4ab8689344c91c5e45653.zip
hqemu-b2b6c39a7915e82cade4ab8689344c91c5e45653.tar.gz
qom: optimize qdev_get_canonical_path using a parent link
The full tree search was a bit unreasonable. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r--hw/qdev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 4351e2e..fdab848 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -92,6 +92,10 @@ struct DeviceState {
uint32_t ref;
QTAILQ_HEAD(, DeviceProperty) properties;
+
+ /* Do not, under any circumstance, use this parent link below anywhere
+ * outside of qdev.c. You have been warned. */
+ DeviceState *parent;
};
typedef void (*bus_dev_printfn)(Monitor *mon, DeviceState *dev, int indent);
OpenPOWER on IntegriCloud