Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88ad0bf6 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds
Browse files

[PATCH] Add SysRq-Q to print timer_list debug info



Add SysRq-Q to print pending timers and other timer info.

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 289f480a
Loading
Loading
Loading
Loading
+13 −1
Original line number Original line Diff line number Diff line
@@ -36,6 +36,7 @@
#include <linux/workqueue.h>
#include <linux/workqueue.h>
#include <linux/kexec.h>
#include <linux/kexec.h>
#include <linux/irq.h>
#include <linux/irq.h>
#include <linux/hrtimer.h>


#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/irq_regs.h>
#include <asm/irq_regs.h>
@@ -158,6 +159,17 @@ static struct sysrq_key_op sysrq_sync_op = {
	.enable_mask	= SYSRQ_ENABLE_SYNC,
	.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)
static void sysrq_handle_mountro(int key, struct tty_struct *tty)
{
{
	emergency_remount();
	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 */
	/* o: This will often be registered as 'Off' at init time */
	NULL,				/* o */
	NULL,				/* o */
	&sysrq_showregs_op,		/* p */
	&sysrq_showregs_op,		/* p */
	NULL,				/* q */
	&sysrq_show_timers_op,		/* q */
	&sysrq_unraw_op,		/* r */
	&sysrq_unraw_op,		/* r */
	&sysrq_sync_op,			/* s */
	&sysrq_sync_op,			/* s */
	&sysrq_showstate_op,		/* t */
	&sysrq_showstate_op,		/* t */
+3 −0
Original line number Original line Diff line number Diff line
@@ -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))
# define ktime_divns(kt, div)		(unsigned long)((kt).tv64 / (div))
#endif
#endif


/* Show pending timers: */
extern void sysrq_timer_list_show(void);

/*
/*
 * Timer-statistics info:
 * Timer-statistics info:
 */
 */