[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/4] qdev-monitor: Trace qdev creation
|
From: |
Peter Xu |
|
Subject: |
[PATCH 1/4] qdev-monitor: Trace qdev creation |
|
Date: |
Wed, 18 Aug 2021 15:42:14 -0400 |
Add a tracepoint for creations of qdev. This can be used to see what devices
are created under the hood, along with the ordering of their creation.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
softmmu/qdev-monitor.c | 2 ++
softmmu/trace-events | 3 +++
2 files changed, 5 insertions(+)
diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c
index 721dec2d82..8602164082 100644
--- a/softmmu/qdev-monitor.c
+++ b/softmmu/qdev-monitor.c
@@ -40,6 +40,7 @@
#include "qemu/cutils.h"
#include "hw/qdev-properties.h"
#include "hw/clock.h"
+#include "trace.h"
/*
* Aliases were a bad idea from the start. Let's keep them
@@ -674,6 +675,7 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **errp)
dev->opts = NULL;
goto err_del_dev;
}
+ trace_qdev_device_add(driver, qemu_opts_id(opts));
return dev;
err_del_dev:
diff --git a/softmmu/trace-events b/softmmu/trace-events
index 7b278590a0..fad85e9d5c 100644
--- a/softmmu/trace-events
+++ b/softmmu/trace-events
@@ -29,3 +29,6 @@ runstate_set(int current_state, const char
*current_state_str, int new_state, co
system_wakeup_request(int reason) "reason=%d"
qemu_system_shutdown_request(int reason) "reason=%d"
qemu_system_powerdown_request(void) ""
+
+# qdev-monitor.c
+qdev_device_add(const char *driver, const char *id) "driver '%s' id '%s'"
--
2.31.1
- [PATCH 0/4] vl: Prioritize device realizations, Peter Xu, 2021/08/18
- [PATCH 1/4] qdev-monitor: Trace qdev creation,
Peter Xu <=
- [PATCH 2/4] qemu-config: Allow in-place sorting of QemuOptsList, Peter Xu, 2021/08/18
- [PATCH 3/4] qdev: Export qdev_get_device_class(), Peter Xu, 2021/08/18
- [PATCH 4/4] vl: Prioritize realizations of devices, Peter Xu, 2021/08/18
- Re: [PATCH 4/4] vl: Prioritize realizations of devices, Eduardo Habkost, 2021/08/23
- Re: [PATCH 4/4] vl: Prioritize realizations of devices, Peter Xu, 2021/08/23
- Re: [PATCH 4/4] vl: Prioritize realizations of devices, Eduardo Habkost, 2021/08/23
- Re: [PATCH 4/4] vl: Prioritize realizations of devices, Peter Xu, 2021/08/23
- Re: [PATCH 4/4] vl: Prioritize realizations of devices, Michael S. Tsirkin, 2021/08/23
- Re: [PATCH 4/4] vl: Prioritize realizations of devices, Peter Xu, 2021/08/23
- Re: [PATCH 4/4] vl: Prioritize realizations of devices, Eduardo Habkost, 2021/08/23