[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH not-for-merge 1/5] qom: Instrument to detect missed realize
From: |
Markus Armbruster |
Subject: |
[PATCH not-for-merge 1/5] qom: Instrument to detect missed realize |
Date: |
Mon, 18 May 2020 07:19:41 +0200 |
Signed-off-by: Markus Armbruster <address@hidden>
---
qom/qom-hmp-cmds.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/qom/qom-hmp-cmds.c b/qom/qom-hmp-cmds.c
index cd08233a4c..4a61ee1b8c 100644
--- a/qom/qom-hmp-cmds.c
+++ b/qom/qom-hmp-cmds.c
@@ -91,6 +91,17 @@ static void print_qom_composition(Monitor *mon, Object *obj,
int indent)
} else {
name = object_get_canonical_path_component(obj);
}
+
+ DeviceState *dev = (DeviceState *)object_dynamic_cast(obj, TYPE_DEVICE);
+ DeviceClass *dc = (DeviceClass *)object_class_dynamic_cast(obj->class,
TYPE_DEVICE);
+ if (dev && !dev->realized) {
+ monitor_printf(mon, "### unrealized: %s (%s)\n",
+ name, object_get_typename(obj));
+ }
+ if (dev && dc->bus_type && !dev->parent_bus) {
+ monitor_printf(mon, "### no %s bus: %s (%s)\n",
+ dc->bus_type, name, object_get_typename(obj));
+ }
monitor_printf(mon, "%*s/%s (%s)\n", indent, "", name,
object_get_typename(obj));
g_free(name);
--
2.21.1
- [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization", Markus Armbruster, 2020/05/18
- [PATCH not-for-merge 1/5] qom: Instrument to detect missed realize,
Markus Armbruster <=
- [PATCH not-for-merge 4/5] qdev: Instrument to detect missed QOM parenting, Markus Armbruster, 2020/05/18
- [PATCH not-for-merge 3/5] qdev: Make "info qtree" show child devices sorted by QOM path, Markus Armbruster, 2020/05/18
- [PATCH not-for-merge 2/5] qom: Make "info qom-tree" show children sorted, Markus Armbruster, 2020/05/18
- [PATCH not-for-merge 5/5] qdev: Instrument to detect bus mismatch, Markus Armbruster, 2020/05/18
- Re: [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization", no-reply, 2020/05/18
- Re: [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization", no-reply, 2020/05/18
- Re: [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization", no-reply, 2020/05/18
- Re: [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization", Mark Cave-Ayland, 2020/05/18