linux-mips
[Top] [All Lists]

Re: [PATCH v2 09/18] KVM/MIPS32: COP0 accesses profiling.

To: Sanjay Lal <sanjayl@kymasys.com>
Subject: Re: [PATCH v2 09/18] KVM/MIPS32: COP0 accesses profiling.
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Thu, 22 Nov 2012 15:45:41 +0400
Cc: kvm@vger.kernel.org, linux-mips@linux-mips.org
In-reply-to: <1353551656-23579-10-git-send-email-sanjayl@kymasys.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1353551656-23579-1-git-send-email-sanjayl@kymasys.com> <1353551656-23579-10-git-send-email-sanjayl@kymasys.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0
Hello.

On 22-11-2012 6:34, Sanjay Lal wrote:

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
---
  arch/mips/kvm/kvm_mips_stats.c | 81 ++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 81 insertions(+)
  create mode 100644 arch/mips/kvm/kvm_mips_stats.c

diff --git a/arch/mips/kvm/kvm_mips_stats.c b/arch/mips/kvm/kvm_mips_stats.c
new file mode 100644
index 0000000..e442a26
--- /dev/null
+++ b/arch/mips/kvm/kvm_mips_stats.c
@@ -0,0 +1,81 @@
+/*
+* This file is subject to the terms and conditions of the GNU General Public
+* License.  See the file "COPYING" in the main directory of this archive
+* for more details.
+*
+* KVM/MIPS: COP0 access histogram
+*
+* Copyright (C) 2012  MIPS Technologies, Inc.  All rights reserved.
+* Authors: Sanjay Lal <sanjayl@kymasys.com>
+*/
+
+#include <linux/kvm_host.h>
+
+char *kvm_mips_exit_types_str[MAX_KVM_MIPS_EXIT_TYPES] = {
+       "WAIT",
+       "CACHE",
+       "Signal",
+       "Interrupt",
+       "COP0/1 Unusable",
+       "TLB Mod",
+       "TLB Miss (LD)",
+       "TLB Miss (ST)",
+       "Address Err (ST)",
+       "Address Error (LD)",

   I guess it should be "Error" in both cases.

+       "System Call",
+       "Reserved Inst",
+       "Break Inst",
+       "D-Cache Flushes",
+};
+
+char *kvm_cop0_str[N_MIPS_COPROC_REGS] = {
+       "Index",
+       "Random",
+       "EntryLo0",
+       "EntryLo1",
+       "Context",
+       "PG Mask",
+       "Wired",
+       "HWREna",
+       "BadVAddr",
+       "Count",
+       "EntryHI",

   EntryHi.

+int kvm_mips_dump_stats(struct kvm_vcpu *vcpu)
+{
+       int i, j __unused;

   Empty line after declarations wouldn't hurt.

+#ifdef CONFIG_KVM_MIPS_DEBUG_COP0_COUNTERS

WBR, Sergei



<Prev in Thread] Current Thread [Next in Thread>