[PATCH] lockdep: print irq-trace info on asserts
When we print an assert due to scheduling-in-atomic bugs, and if lockdep is enabled, then the IRQ tracing information of lockdep can be printed to pinpoint the code location that disabled interrupts. This saved me quite a bit of debugging time in cases where the backtrace did not identify the irq-disabling site well enough. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
27c3b23226
commit
3117df0453
@ -281,15 +281,25 @@ struct lock_class_key { };
|
||||
#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS)
|
||||
extern void early_init_irq_lock_class(void);
|
||||
#else
|
||||
# define early_init_irq_lock_class() do { } while (0)
|
||||
static inline void early_init_irq_lock_class(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
extern void early_boot_irqs_off(void);
|
||||
extern void early_boot_irqs_on(void);
|
||||
extern void print_irqtrace_events(struct task_struct *curr);
|
||||
#else
|
||||
# define early_boot_irqs_off() do { } while (0)
|
||||
# define early_boot_irqs_on() do { } while (0)
|
||||
static inline void early_boot_irqs_off(void)
|
||||
{
|
||||
}
|
||||
static inline void early_boot_irqs_on(void)
|
||||
{
|
||||
}
|
||||
static inline void print_irqtrace_events(struct task_struct *curr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user