[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/5] qdev: add qdev_{create,free} tracepoints
From: |
Kazuya Saito |
Subject: |
[Qemu-devel] [PATCH 4/5] qdev: add qdev_{create,free} tracepoints |
Date: |
Fri, 22 Mar 2013 17:29:10 +0900 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
This patch adds tracepoints at creating and removing virtual
devices. It is useful for investigation of trouble related to virtual
devices.
Signed-off-by: Kazuya Saito <address@hidden>
---
hw/qdev.c | 3 +++
trace-events | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index 0b20280..0fda23e 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -30,6 +30,7 @@
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qapi/visitor.h"
+#include "trace.h"
int qdev_hotplug = 0;
static bool qdev_hot_added = false;
@@ -124,6 +125,7 @@ DeviceState *qdev_create(BusState *bus, const char *name)
}
}
+ trace_qdev_create(dev, dev->parent_bus);
return dev;
}
@@ -268,6 +270,7 @@ void qdev_init_nofail(DeviceState *dev)
/* Unlink device from bus and free the structure. */
void qdev_free(DeviceState *dev)
{
+ trace_qdev_free(dev, dev->parent_bus);
object_unparent(OBJECT(dev));
}
diff --git a/trace-events b/trace-events
index c691ce4..235b978 100644
--- a/trace-events
+++ b/trace-events
@@ -1102,3 +1102,7 @@ kvm_ioctl(int type) "type %d"
kvm_vm_ioctl(int type) "type %d"
kvm_vcpu_ioctl(int type) "type %d"
kvm_run_exit(uint32_t reason) "reason %d"
+
+# qdev.c
+qdev_create(void *dev, void *bus) "dev %p, bus %p"
+qdev_free(void *dev, void *bus) "dev %p, bus %p"
--
1.7.1
- [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles, Kazuya Saito, 2013/03/22
- [Qemu-devel] [PATCH 1/5] vl: add runstate_set tracepoint, Kazuya Saito, 2013/03/22
- [Qemu-devel] [PATCH 2/5] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints, Kazuya Saito, 2013/03/22
- [Qemu-devel] [PATCH 3/5] kvm-all: add kvm_run_exit tracepoint, Kazuya Saito, 2013/03/22
- [Qemu-devel] [PATCH 4/5] qdev: add qdev_{create,free} tracepoints,
Kazuya Saito <=
- [Qemu-devel] [PATCH 5/5] qdev-monitor: add device_add tracepoint, Kazuya Saito, 2013/03/22
- Re: [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles, Paolo Bonzini, 2013/03/22
- Re: [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles, Kazuya Saito, 2013/03/26
- Re: [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles, Paolo Bonzini, 2013/03/26
- Re: [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles, Kazuya Saito, 2013/03/27
- Re: [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles, Paolo Bonzini, 2013/03/27
- Re: [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles, Kazuya Saito, 2013/03/28
- Re: [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles, Paolo Bonzini, 2013/03/28