From patchwork Fri Mar 22 08:27:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kazuya Saito X-Patchwork-Id: 229907 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B431D2C00D2 for ; Fri, 22 Mar 2013 19:28:57 +1100 (EST) Received: from localhost ([::1]:47147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIxLL-0001MF-TU for incoming@patchwork.ozlabs.org; Fri, 22 Mar 2013 04:28:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIxKT-0000eU-17 for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:28:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIxKQ-0005la-Ab for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:28:00 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:45905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIxKP-0005lR-Ri for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:27:58 -0400 Received: from m3.gw.fujitsu.co.jp (unknown [10.0.50.73]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id 26D423EE0BB for ; Fri, 22 Mar 2013 17:27:57 +0900 (JST) Received: from smail (m3 [127.0.0.1]) by outgoing.m3.gw.fujitsu.co.jp (Postfix) with ESMTP id 0E66645DEBB for ; Fri, 22 Mar 2013 17:27:57 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (s3.gw.fujitsu.co.jp [10.0.50.93]) by m3.gw.fujitsu.co.jp (Postfix) with ESMTP id E8BF345DEBF for ; Fri, 22 Mar 2013 17:27:56 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id D78BF1DB803B for ; Fri, 22 Mar 2013 17:27:56 +0900 (JST) Received: from g01jpexchyt25.g01.fujitsu.local (g01jpexchyt25.g01.fujitsu.local [10.128.193.108]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 80ED4E1800A for ; Fri, 22 Mar 2013 17:27:56 +0900 (JST) Received: from [127.0.0.1] (10.33.110.106) by g01jpexchyt25.g01.fujitsu.local (10.128.193.108) with Microsoft SMTP Server id 14.2.309.2; Fri, 22 Mar 2013 17:27:51 +0900 Message-ID: <514C1601.4010900@jp.fujitsu.com> Date: Fri, 22 Mar 2013 17:27:45 +0900 From: Kazuya Saito User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: References: <514C1560.1020406@jp.fujitsu.com> In-Reply-To: <514C1560.1020406@jp.fujitsu.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 192.51.44.36 Subject: [Qemu-devel] [PATCH 2/5] kvm-all: add kvm_ioctl, kvm_vm_ioctl, kvm_vcpu_ioctl tracepoints X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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"