From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: [PULL v4 34/57] kvm-all: add trace events for kvm irqchip ops Date: Thu, 21 Jul 2016 19:28:52 +0300 Message-ID: <1469118288-4776-35-git-send-email-mst@redhat.com> References: <1469118288-4776-1-git-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Peter Maydell , Peter Xu , Paolo Bonzini , kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52816 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753301AbcGUQ24 (ORCPT ); Thu, 21 Jul 2016 12:28:56 -0400 Content-Disposition: inline In-Reply-To: <1469118288-4776-1-git-send-email-mst@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: From: Peter Xu These will help us monitoring irqchip route activities more easily. Signed-off-by: Peter Xu Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- kvm-all.c | 5 +++++ trace-events | 3 +++ 2 files changed, 8 insertions(+) diff --git a/kvm-all.c b/kvm-all.c index 3764ba9..ef81ca5 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1048,6 +1048,7 @@ void kvm_irqchip_commit_routes(KVMState *s) int ret; s->irq_routes->flags = 0; + trace_kvm_irqchip_commit_routes(); ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes); assert(ret == 0); } @@ -1271,6 +1272,8 @@ int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev) return -EINVAL; } + trace_kvm_irqchip_add_msi_route(virq); + kvm_add_routing_entry(s, &kroute); kvm_arch_add_msi_route_post(&kroute, vector, dev); kvm_irqchip_commit_routes(s); @@ -1301,6 +1304,8 @@ int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg, return -EINVAL; } + trace_kvm_irqchip_update_msi_route(virq); + return kvm_update_routing_entry(s, &kroute); } diff --git a/trace-events b/trace-events index 4767059..52c6a6c 100644 --- a/trace-events +++ b/trace-events @@ -118,6 +118,9 @@ kvm_run_exit(int cpu_index, uint32_t reason) "cpu_index %d, reason %d" kvm_device_ioctl(int fd, int type, void *arg) "dev fd %d, type 0x%x, arg %p" kvm_failed_reg_get(uint64_t id, const char *msg) "Warning: Unable to retrieve ONEREG %" PRIu64 " from KVM: %s" kvm_failed_reg_set(uint64_t id, const char *msg) "Warning: Unable to set ONEREG %" PRIu64 " to KVM: %s" +kvm_irqchip_commit_routes(void) "" +kvm_irqchip_add_msi_route(int virq) "Adding MSI route virq=%d" +kvm_irqchip_update_msi_route(int virq) "Updating MSI route virq=%d" # TCG related tracing (mostly disabled by default) # cpu-exec.c -- MST From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQGqH-0003G3-PS for qemu-devel@nongnu.org; Thu, 21 Jul 2016 12:29:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQGqG-0008Oj-RI for qemu-devel@nongnu.org; Thu, 21 Jul 2016 12:28:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQGqG-0008Oc-Lc for qemu-devel@nongnu.org; Thu, 21 Jul 2016 12:28:56 -0400 Date: Thu, 21 Jul 2016 19:28:52 +0300 From: "Michael S. Tsirkin" Message-ID: <1469118288-4776-35-git-send-email-mst@redhat.com> References: <1469118288-4776-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1469118288-4776-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL v4 34/57] kvm-all: add trace events for kvm irqchip ops List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Peter Xu , Paolo Bonzini , kvm@vger.kernel.org From: Peter Xu These will help us monitoring irqchip route activities more easily. Signed-off-by: Peter Xu Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- kvm-all.c | 5 +++++ trace-events | 3 +++ 2 files changed, 8 insertions(+) diff --git a/kvm-all.c b/kvm-all.c index 3764ba9..ef81ca5 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1048,6 +1048,7 @@ void kvm_irqchip_commit_routes(KVMState *s) int ret; s->irq_routes->flags = 0; + trace_kvm_irqchip_commit_routes(); ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes); assert(ret == 0); } @@ -1271,6 +1272,8 @@ int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev) return -EINVAL; } + trace_kvm_irqchip_add_msi_route(virq); + kvm_add_routing_entry(s, &kroute); kvm_arch_add_msi_route_post(&kroute, vector, dev); kvm_irqchip_commit_routes(s); @@ -1301,6 +1304,8 @@ int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg, return -EINVAL; } + trace_kvm_irqchip_update_msi_route(virq); + return kvm_update_routing_entry(s, &kroute); } diff --git a/trace-events b/trace-events index 4767059..52c6a6c 100644 --- a/trace-events +++ b/trace-events @@ -118,6 +118,9 @@ kvm_run_exit(int cpu_index, uint32_t reason) "cpu_index %d, reason %d" kvm_device_ioctl(int fd, int type, void *arg) "dev fd %d, type 0x%x, arg %p" kvm_failed_reg_get(uint64_t id, const char *msg) "Warning: Unable to retrieve ONEREG %" PRIu64 " from KVM: %s" kvm_failed_reg_set(uint64_t id, const char *msg) "Warning: Unable to set ONEREG %" PRIu64 " to KVM: %s" +kvm_irqchip_commit_routes(void) "" +kvm_irqchip_add_msi_route(int virq) "Adding MSI route virq=%d" +kvm_irqchip_update_msi_route(int virq) "Updating MSI route virq=%d" # TCG related tracing (mostly disabled by default) # cpu-exec.c -- MST