aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-02-16 04:28:16 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-16 11:13:59 -0500
commit88ad0bf6890505cbd9ca1dbb79944a27b5c8697d (patch)
treee78711c47de9da92c8e4db8029f43542cecdf268
parent289f480af87e45f7a6de6ba9b4c061c2e259fe98 (diff)
[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 <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: john stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/char/sysrq.c14
-rw-r--r--include/linux/hrtimer.h3
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index be73c80d699d..1d8c4ae61551 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -36,6 +36,7 @@
36#include <linux/workqueue.h> 36#include <linux/workqueue.h>
37#include <linux/kexec.h> 37#include <linux/kexec.h>
38#include <linux/irq.h> 38#include <linux/irq.h>
39#include <linux/hrtimer.h>
39 40
40#include <asm/ptrace.h> 41#include <asm/ptrace.h>
41#include <asm/irq_regs.h> 42#include <asm/irq_regs.h>
@@ -158,6 +159,17 @@ static struct sysrq_key_op sysrq_sync_op = {
158 .enable_mask = SYSRQ_ENABLE_SYNC, 159 .enable_mask = SYSRQ_ENABLE_SYNC,
159}; 160};
160 161
162static void sysrq_handle_show_timers(int key, struct tty_struct *tty)
163{
164 sysrq_timer_list_show();
165}
166
167static struct sysrq_key_op sysrq_show_timers_op = {
168 .handler = sysrq_handle_show_timers,
169 .help_msg = "show-all-timers(Q)",
170 .action_msg = "Show Pending Timers",
171};
172
161static void sysrq_handle_mountro(int key, struct tty_struct *tty) 173static void sysrq_handle_mountro(int key, struct tty_struct *tty)
162{ 174{
163 emergency_remount(); 175 emergency_remount();
@@ -335,7 +347,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
335 /* o: This will often be registered as 'Off' at init time */ 347 /* o: This will often be registered as 'Off' at init time */
336 NULL, /* o */ 348 NULL, /* o */
337 &sysrq_showregs_op, /* p */ 349 &sysrq_showregs_op, /* p */
338 NULL, /* q */ 350 &sysrq_show_timers_op, /* q */
339 &sysrq_unraw_op, /* r */ 351 &sysrq_unraw_op, /* r */
340 &sysrq_sync_op, /* s */ 352 &sysrq_sync_op, /* s */
341 &sysrq_showstate_op, /* t */ 353 &sysrq_showstate_op, /* t */
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 93b8757c1ea2..37f9279192a9 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);
316# define ktime_divns(kt, div) (unsigned long)((kt).tv64 / (div)) 316# define ktime_divns(kt, div) (unsigned long)((kt).tv64 / (div))
317#endif 317#endif
318 318
319/* Show pending timers: */
320extern void sysrq_timer_list_show(void);
321
319/* 322/*
320 * Timer-statistics info: 323 * Timer-statistics info:
321 */ 324 */