From: "Andreas Färber" <afaerber@suse.de>
To: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/5] qdev: add qdev_{create, free} tracepoints
Date: Wed, 27 Mar 2013 12:03:39 +0100 [thread overview]
Message-ID: <5152D20B.5090101@suse.de> (raw)
In-Reply-To: <514C1656.8020503@jp.fujitsu.com>
Am 22.03.2013 09:29, schrieb Kazuya Saito:
> 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 <saito.kazuya@jp.fujitsu.com>
I would prefer not to do this. I had previously posted a patch to remove
qdev_free() in favor of using the QOM function object_unparent()
directly, which adding stuff to qdev_free() would interfere with. And
you should rather add a tracepoint to object_new() or better to
object_initialize() than into the legacy qdev_create() - which doesn't
cover qdev_try_create() btw. Either way, adding new tracepoints with the
legacy "qdev" in the name is ugly.
Regards,
Andreas
P.S. Your patches arrived in HTML format, please check your workflow.
> ---
> 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"
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-03-27 11:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 8:25 [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles Kazuya Saito
2013-03-22 8:26 ` [Qemu-devel] [PATCH 1/5] vl: add runstate_set tracepoint Kazuya Saito
2013-03-22 11:13 ` Paolo Bonzini
2013-03-28 13:21 ` Stefan Hajnoczi
2013-03-22 8:27 ` [Qemu-devel] [PATCH 2/5] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints Kazuya Saito
2013-03-22 11:12 ` Paolo Bonzini
2013-03-22 8:28 ` [Qemu-devel] [PATCH 3/5] kvm-all: add kvm_run_exit tracepoint Kazuya Saito
2013-03-22 11:12 ` Paolo Bonzini
2013-03-22 8:29 ` [Qemu-devel] [PATCH 4/5] qdev: add qdev_{create,free} tracepoints Kazuya Saito
2013-03-27 11:03 ` Andreas Färber [this message]
2013-03-28 5:56 ` [Qemu-devel] [PATCH 4/5] qdev: add qdev_{create, free} tracepoints Kazuya Saito
2013-03-22 8:29 ` [Qemu-devel] [PATCH 5/5] qdev-monitor: add device_add tracepoint Kazuya Saito
2013-03-22 11:13 ` [Qemu-devel] [PATCH 0/5] Add some tracepoints for clarification of the cause of troubles Paolo Bonzini
2013-03-26 7:13 ` Kazuya Saito
2013-03-26 7:15 ` Paolo Bonzini
2013-03-27 6:21 ` Kazuya Saito
2013-03-27 8:45 ` Paolo Bonzini
2013-03-28 5:53 ` Kazuya Saito
2013-03-28 8:52 ` Paolo Bonzini
2013-03-28 12:49 ` Anthony Liguori
2013-03-28 13:21 ` Stefan Hajnoczi
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=5152D20B.5090101@suse.de \
--to=afaerber@suse.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=saito.kazuya@jp.fujitsu.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.