From b2b6c39a7915e82cade4ab8689344c91c5e45653 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Mon, 12 Dec 2011 14:29:40 -0600 Subject: qom: optimize qdev_get_canonical_path using a parent link The full tree search was a bit unreasonable. Signed-off-by: Anthony Liguori --- hw/qdev.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hw/qdev.h') diff --git a/hw/qdev.h b/hw/qdev.h index 4351e2e5af..fdab84835e 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); -- cgit v1.2.3