mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
182970509b
commit
b2b6c39a79
2 changed files with 34 additions and 38 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue