From: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
"aliguori@us.ibm.com" <aliguori@us.ibm.com>,
"stefanha@linux.vnet.ibm.com" <stefanha@linux.vnet.ibm.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: [PATCH uq/master v2 1/2] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints
Date: Fri, 29 Mar 2013 13:27:05 +0900 [thread overview]
Message-ID: <51551819.7050800@jp.fujitsu.com> (raw)
In-Reply-To: <51551779.9060403@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>
---
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 9b433d3..fdb099c 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
@@ -1634,6 +1635,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;
@@ -1651,6 +1653,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;
@@ -1668,6 +1671,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 7f34112..3023744 100644
--- a/trace-events
+++ b/trace-events
@@ -1101,3 +1101,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"
--
1.7.1
WARNING: multiple messages have this Message-ID (diff)
From: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
"aliguori@us.ibm.com" <aliguori@us.ibm.com>,
"stefanha@linux.vnet.ibm.com" <stefanha@linux.vnet.ibm.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: [Qemu-devel] [PATCH uq/master v2 1/2] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints
Date: Fri, 29 Mar 2013 13:27:05 +0900 [thread overview]
Message-ID: <51551819.7050800@jp.fujitsu.com> (raw)
In-Reply-To: <51551779.9060403@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>
---
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 9b433d3..fdb099c 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
@@ -1634,6 +1635,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;
@@ -1651,6 +1653,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;
@@ -1668,6 +1671,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 7f34112..3023744 100644
--- a/trace-events
+++ b/trace-events
@@ -1101,3 +1101,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"
--
1.7.1
next prev parent reply other threads:[~2013-03-29 4:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 4:24 [PATCH uq/master v2 0/2] Add some tracepoints for clarification of the cause of troubles Kazuya Saito
2013-03-29 4:24 ` [Qemu-devel] " Kazuya Saito
2013-03-29 4:27 ` Kazuya Saito [this message]
2013-03-29 4:27 ` [Qemu-devel] [PATCH uq/master v2 1/2] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints Kazuya Saito
2013-03-29 4:27 ` [PATCH uq/master v2 2/2] kvm-all: add kvm_run_exit tracepoint Kazuya Saito
2013-03-29 4:27 ` [Qemu-devel] " Kazuya Saito
2013-03-29 8:09 ` [PATCH uq/master v2 0/2] Add some tracepoints for clarification of the cause of troubles Paolo Bonzini
2013-03-29 8:09 ` [Qemu-devel] " Paolo Bonzini
2013-04-08 15:48 ` Stefan Hajnoczi
2013-04-08 15:48 ` 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=51551819.7050800@jp.fujitsu.com \
--to=saito.kazuya@jp.fujitsu.com \
--cc=aliguori@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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.