Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88ad0bf6890505cbd9ca1dbb79944a27b5c8697d
Commit:     88ad0bf6890505cbd9ca1dbb79944a27b5c8697d
Parent:     289f480af87e45f7a6de6ba9b4c061c2e259fe98
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 16 01:28:16 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Feb 16 08:13:59 2007 -0800

    [PATCH] Add SysRq-Q to print timer_list debug info
    
    Add SysRq-Q to print pending timers and other timer info.
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
    Cc: john stultz <[EMAIL PROTECTED]>
    Cc: Roman Zippel <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/sysrq.c    |   14 +++++++++++++-
 include/linux/hrtimer.h |    3 +++
 2 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index be73c80..1d8c4ae 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -36,6 +36,7 @@
 #include <linux/workqueue.h>
 #include <linux/kexec.h>
 #include <linux/irq.h>
+#include <linux/hrtimer.h>
 
 #include <asm/ptrace.h>
 #include <asm/irq_regs.h>
@@ -158,6 +159,17 @@ static struct sysrq_key_op sysrq_sync_op = {
        .enable_mask    = SYSRQ_ENABLE_SYNC,
 };
 
+static void sysrq_handle_show_timers(int key, struct tty_struct *tty)
+{
+       sysrq_timer_list_show();
+}
+
+static struct sysrq_key_op sysrq_show_timers_op = {
+       .handler        = sysrq_handle_show_timers,
+       .help_msg       = "show-all-timers(Q)",
+       .action_msg     = "Show Pending Timers",
+};
+
 static void sysrq_handle_mountro(int key, struct tty_struct *tty)
 {
        emergency_remount();
@@ -335,7 +347,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
        /* o: This will often be registered as 'Off' at init time */
        NULL,                           /* o */
        &sysrq_showregs_op,             /* p */
-       NULL,                           /* q */
+       &sysrq_show_timers_op,          /* q */
        &sysrq_unraw_op,                /* r */
        &sysrq_sync_op,                 /* s */
        &sysrq_showstate_op,            /* t */
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 93b8757..37f9279 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -316,6 +316,9 @@ extern unsigned long ktime_divns(const ktime_t kt, s64 div);
 # define ktime_divns(kt, div)          (unsigned long)((kt).tv64 / (div))
 #endif
 
+/* Show pending timers: */
+extern void sysrq_timer_list_show(void);
+
 /*
  * Timer-statistics info:
  */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to