From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIxLs-0002c9-S9 for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:29:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIxLq-00065w-2Z for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:29:28 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:38764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIxLp-00065k-JX for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:29:26 -0400 Received: from m2.gw.fujitsu.co.jp (unknown [10.0.50.72]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id 975923EE081 for ; Fri, 22 Mar 2013 17:29:24 +0900 (JST) Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 7D53245DE4D for ; Fri, 22 Mar 2013 17:29:24 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.fujitsu.co.jp [10.0.50.92]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 632DE45DDCF for ; Fri, 22 Mar 2013 17:29:24 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 547B51DB8038 for ; Fri, 22 Mar 2013 17:29:24 +0900 (JST) Received: from g01jpexchyt24.g01.fujitsu.local (g01jpexchyt24.g01.fujitsu.local [10.128.193.107]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 08C761DB802C for ; Fri, 22 Mar 2013 17:29:24 +0900 (JST) Message-ID: <514C1656.8020503@jp.fujitsu.com> Date: Fri, 22 Mar 2013 17:29:10 +0900 From: Kazuya Saito MIME-Version: 1.0 References: <514C1560.1020406@jp.fujitsu.com> In-Reply-To: <514C1560.1020406@jp.fujitsu.com> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 4/5] qdev: add qdev_{create,free} tracepoints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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