qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, berrange@redhat.com, ehabkost@redhat.com
Subject: [PATCH not-for-merge 1/5] qom: Instrument to detect missed realize
Date: Mon, 18 May 2020 07:19:41 +0200	[thread overview]
Message-ID: <20200518051945.8621-2-armbru@redhat.com> (raw)
In-Reply-To: <20200518051945.8621-1-armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 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



  reply	other threads:[~2020-05-18  5:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18  5:19 [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization" Markus Armbruster
2020-05-18  5:19 ` Markus Armbruster [this message]
2020-05-18  5:19 ` [PATCH not-for-merge 2/5] qom: Make "info qom-tree" show children sorted Markus Armbruster
2020-05-18 21:04   ` Eric Blake
2020-05-19  6:43     ` Markus Armbruster
2020-05-18  5:19 ` [PATCH not-for-merge 3/5] qdev: Make "info qtree" show child devices sorted by QOM path Markus Armbruster
2020-05-18  5:19 ` [PATCH not-for-merge 4/5] qdev: Instrument to detect missed QOM parenting Markus Armbruster
2020-05-18  5:19 ` [PATCH not-for-merge 5/5] qdev: Instrument to detect bus mismatch Markus Armbruster
2020-05-18  6:54 ` [PATCH not-for-merge 0/5] Instrumentation for "Fixes around device realization" no-reply
2020-05-18  7:08 ` no-reply
2020-05-18  7:27 ` no-reply
2020-05-18 20:56 ` Mark Cave-Ayland
2020-05-19  6:50   ` Markus Armbruster
2020-05-20 12:13 ` Philippe Mathieu-Daudé
2020-05-20 14:18   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200518051945.8621-2-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).