From: ehrhardt@linux.vnet.ibm.com
To: kvm-ppc@vger.kernel.org
Subject: [kvm-ppc-devel] [PATCH] [3/3] kvmppc: make tlb tracing configurable
Date: Mon, 14 Apr 2008 12:23:58 +0000 [thread overview]
Message-ID: <12081758441736-git-send-email-ehrhardt@linux.vnet.ibm.com> (raw)
From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
This patch adds a config option to allow users to enable/disable the relayfs
base tracing of tlb activities added by Hollis in the patch kvmppc_relay.diff.
This patch aligns the behavior of this debug tracing with the two instruction
tracings I added, all would then be configurable via .config as needed.
This patch is intended to be fold into kvmppc_relay.diff and re-adds the select
RELAY which should be ok now, because this is a separate config symbol.
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---
[diffstat]
44x_tlb.c | 2 ++
Kconfig | 8 ++++++++
powerpc.c | 4 +++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c
--- a/arch/powerpc/kvm/44x_tlb.c
+++ b/arch/powerpc/kvm/44x_tlb.c
@@ -45,6 +45,7 @@ struct tlb_record {
void kvmppc_44x_tlb_trace(int action, int index, struct tlbe *tlbe, int ref)
{
+#ifdef CONFIG_KVM_POWERPC_440_TRACE_TLB
struct tlb_record record = {
.action = action,
.tlb_index = index,
@@ -56,6 +57,7 @@ void kvmppc_44x_tlb_trace(int action, in
};
relay_write(kvmppc_44x_tlb_chan, &record, sizeof(record));
+#endif
}
static u32 kvmppc_44x_tlb_shadow_attrib(u32 attrib, int usermode)
diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
--- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig
@@ -58,6 +58,14 @@ config KVM_POWERPC_440_TRACE_INSTRUCTION
channel.
If unsure, say N.
+config KVM_POWERPC_440_TRACE_TLB
+ bool "ppc440 guest tlb activity tracing"
+ depends on KVM && 44x && KVM_POWERPC_440
+ select RELAY
+ ---help---
+ Adds the complete tracing of the tlb activities via a relayfs channel.
+ If unsure, say N.
+
config KVM_PPC_VIRTIO
bool "Virtio Support"
select VIRTIO
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -1129,10 +1129,12 @@ static struct sysrq_key_op sysrq_kvm_op
int kvm_arch_init(void *opaque)
{
+#ifdef CONFIG_KVM_POWERPC_440_TRACE_TLB
kvmppc_44x_tlb_chan = relay_open("44x_tlb", kvm_debugfs_dir, 64, 64,
&relay_callbacks, NULL);
if (!kvmppc_44x_tlb_chan)
- printk("relay_open failed\n");
+ printk(KERN_ERR"relay_open failed\n");
+#endif
#ifdef CONFIG_KVM_POWERPC_440_TRACE_INSTRUCTIONS
kvmppc_44x_instr_chan = relay_open("44x_instr", kvm_debugfs_dir, 64,
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
reply other threads:[~2008-04-14 12:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=12081758441736-git-send-email-ehrhardt@linux.vnet.ibm.com \
--to=ehrhardt@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
/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.