[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/5] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_v
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/5] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints |
Date: |
Fri, 22 Mar 2013 12:12:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 22/03/2013 09:27, Kazuya Saito ha scritto:
> 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 <address@hidden>
> ---
> kvm-all.c | 4 ++++
> trace-events | 5 +++++
> 2 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 4decfdc..da15623 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
> @@ -1636,6 +1637,7 @@ int kvm_ioctl(KVMState *s, int type, ...)
> arg = va_arg(ap, void *);
> va_end(ap);
>
> + trace_kvm_ioctl(type);
> ret = ioctl(s->fd, type, arg);
> if (ret == -1) {
> ret = -errno;
> @@ -1653,6 +1655,7 @@ int kvm_vm_ioctl(KVMState *s, int type, ...)
> arg = va_arg(ap, void *);
> va_end(ap);
>
> + trace_kvm_vm_ioctl(type);
> ret = ioctl(s->vmfd, type, arg);
> if (ret == -1) {
> ret = -errno;
> @@ -1670,6 +1673,7 @@ int kvm_vcpu_ioctl(CPUState *cpu, int type, ...)
> arg = va_arg(ap, void *);
> va_end(ap);
>
> + trace_kvm_vcpu_ioctl(type);
> ret = ioctl(cpu->kvm_fd, type, arg);
> if (ret == -1) {
> ret = -errno;
> diff --git a/trace-events b/trace-events
> index 1e352a7..1af7060 100644
> --- a/trace-events
> +++ b/trace-events
> @@ -1096,3 +1096,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) "type %d"
> +kvm_vm_ioctl(int type) "type %d"
> +kvm_vcpu_ioctl(int type) "type %d"
>
Please add arg as well and, for kvm_vcpu_ioctl, the CPU number too.
Thanks!
Paolo
- [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
- Re: [Qemu-devel] [PATCH 2/5] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints,
Paolo Bonzini <=
- [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, 2013/03/22
- [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