qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
	Kazuya Saito <saito.kazuya@jp.fujitsu.com>
Subject: Re: [Qemu-devel] [PATCH 1/4] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints
Date: Fri, 03 May 2013 14:12:14 +0200	[thread overview]
Message-ID: <5183A99E.1080801@suse.de> (raw)
In-Reply-To: <1367582485-15579-2-git-send-email-stefanha@redhat.com>

Am 03.05.2013 14:01, schrieb Stefan Hajnoczi:
> From: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
> 
> This patch adds tracepoints at ioctl to kvm. Tracing these ioctl is
> useful for clarification whether the cause of troubles is qemu or kvm.
> 
> Signed-off-by: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  kvm-all.c    | 4 ++++
>  trace-events | 5 +++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index f6c0f4a..4f73b98 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -33,6 +33,7 @@
>  #include "exec/memory.h"
>  #include "exec/address-spaces.h"
>  #include "qemu/event_notifier.h"
> +#include "trace.h"
>  
>  /* This check must be after config-host.h is included */
>  #ifdef CONFIG_EVENTFD
> @@ -1687,6 +1688,7 @@ int kvm_ioctl(KVMState *s, int type, ...)
>      arg = va_arg(ap, void *);
>      va_end(ap);
>  
> +    trace_kvm_ioctl(type, arg);
>      ret = ioctl(s->fd, type, arg);
>      if (ret == -1) {
>          ret = -errno;
> @@ -1704,6 +1706,7 @@ int kvm_vm_ioctl(KVMState *s, int type, ...)
>      arg = va_arg(ap, void *);
>      va_end(ap);
>  
> +    trace_kvm_vm_ioctl(type, arg);
>      ret = ioctl(s->vmfd, type, arg);
>      if (ret == -1) {
>          ret = -errno;
> @@ -1721,6 +1724,7 @@ int kvm_vcpu_ioctl(CPUState *cpu, int type, ...)
>      arg = va_arg(ap, void *);
>      va_end(ap);
>  
> +    trace_kvm_vcpu_ioctl(cpu->cpu_index, type, arg);
>      ret = ioctl(cpu->kvm_fd, type, arg);
>      if (ret == -1) {
>          ret = -errno;
> diff --git a/trace-events b/trace-events
> index 55e80be..d5bc7a5 100644
> --- a/trace-events
> +++ b/trace-events
> @@ -1153,3 +1153,8 @@ virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *dev
>  
>  # migration.c
>  migrate_set_state(int new_state) "new state %d"
> +
> +# kvm-all.c
> +kvm_ioctl(int type, void *arg) "type %d, arg %p"
> +kvm_vm_ioctl(int type, void *arg) "type %d, arg %p"
> +kvm_vcpu_ioctl(int cpu_index, int type, void *arg) "cpu_index %d, type %d, arg %p"

Sorry that I'm just seeing this patch now (wasn't CC'ed), but I wonder
whether cpu_index is the best thing to trace here? Can we still change
trace event API or would we have to nack/change now?

CC'ing Igor since he just introduced a cpu_get_arch_id() and there's
also a kvm_arch_vcpu_id() introduced earlier by Eduardo.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-05-03 12:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-03 12:01 [Qemu-devel] [PULL 0/4] Tracing patches Stefan Hajnoczi
2013-05-03 12:01 ` [Qemu-devel] [PATCH 1/4] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints Stefan Hajnoczi
2013-05-03 12:12   ` Andreas Färber [this message]
2013-05-03 13:31     ` Eduardo Habkost
2013-05-08  8:48     ` Stefan Hajnoczi
2013-05-03 12:01 ` [Qemu-devel] [PATCH 2/4] kvm-all: add kvm_run_exit tracepoint Stefan Hajnoczi
2013-05-03 12:01 ` [Qemu-devel] [PATCH 3/4] trace: Add ftrace tracing backend Stefan Hajnoczi
2013-05-03 12:01 ` [Qemu-devel] [PATCH 4/4] trace: document ftrace backend 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=5183A99E.1080801@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=saito.kazuya@jp.fujitsu.com \
    --cc=stefanha@redhat.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 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).