aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/keyhandler.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-10-14 09:07:51 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-10-14 09:07:51 +0100
commit0482af4d96d0a48c0e7eb9f9033408c014de9a4d (patch)
treecd5f29e8439383e5ed3ca6b6a3aa8a10c2ca06b6 /xen/common/keyhandler.c
parentc637aa4f78d48ffcd39b8352a7fd325add0f89f9 (diff)
downloadxen-0482af4d96d0a48c0e7eb9f9033408c014de9a4d.tar.gz
xen-0482af4d96d0a48c0e7eb9f9033408c014de9a4d.tar.bz2
xen-0482af4d96d0a48c0e7eb9f9033408c014de9a4d.zip
Spinlock profiling (enable in build with lock_profile=y)
Adds new tool xenlockprof to run from dom0. From: Juergen Gross <juergen.gross@ts.fujitsu.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/keyhandler.c')
-rw-r--r--xen/common/keyhandler.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index d8122ca096..844d890df7 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -347,6 +347,20 @@ static struct keyhandler perfc_reset_keyhandler = {
};
#endif
+#ifdef LOCK_PROFILE
+extern void spinlock_profile_printall(unsigned char key);
+static struct keyhandler spinlock_printall_keyhandler = {
+ .diagnostic = 1,
+ .u.fn = spinlock_profile_printall,
+ .desc = "print lock profile info"
+};
+extern void spinlock_profile_reset(unsigned char key);
+static struct keyhandler spinlock_reset_keyhandler = {
+ .u.fn = spinlock_profile_reset,
+ .desc = "reset lock profile info"
+};
+#endif
+
static void run_all_nonirq_keyhandlers(unsigned long unused)
{
/* Fire all the non-IRQ-context diagnostic keyhandlers */
@@ -428,6 +442,12 @@ void __init initialize_keytable(void)
register_keyhandler('p', &perfc_printall_keyhandler);
register_keyhandler('P', &perfc_reset_keyhandler);
#endif
+
+#ifdef LOCK_PROFILE
+ register_keyhandler('l', &spinlock_printall_keyhandler);
+ register_keyhandler('L', &spinlock_reset_keyhandler);
+#endif
+
}
/*