diff options
| author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-03-18 07:38:47 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-03-31 08:53:01 -0400 |
| commit | eedeeabdeeadb016b8c783e3620d06b98d0cb4e1 (patch) | |
| tree | f7353981f73c1db6a65ec403e04c4ddb4be48fc9 /kernel/lockdep.c | |
| parent | 7f1e2ca9f04b02794597f60e7b1d43f0a1317939 (diff) | |
lockdep: add stack dumps to asserts
Have a better idea about exactly which loc causes a lockdep
limit overflow. Often it's a bug or inefficiency in that
subsystem.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1237376327.5069.253.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/lockdep.c')
| -rw-r--r-- | kernel/lockdep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 981cd485428..a288ae107b5 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
| @@ -792,6 +792,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) | |||
| 792 | 792 | ||
| 793 | printk("BUG: MAX_LOCKDEP_KEYS too low!\n"); | 793 | printk("BUG: MAX_LOCKDEP_KEYS too low!\n"); |
| 794 | printk("turning off the locking correctness validator.\n"); | 794 | printk("turning off the locking correctness validator.\n"); |
| 795 | dump_stack(); | ||
| 795 | return NULL; | 796 | return NULL; |
| 796 | } | 797 | } |
| 797 | class = lock_classes + nr_lock_classes++; | 798 | class = lock_classes + nr_lock_classes++; |
| @@ -855,6 +856,7 @@ static struct lock_list *alloc_list_entry(void) | |||
| 855 | 856 | ||
| 856 | printk("BUG: MAX_LOCKDEP_ENTRIES too low!\n"); | 857 | printk("BUG: MAX_LOCKDEP_ENTRIES too low!\n"); |
| 857 | printk("turning off the locking correctness validator.\n"); | 858 | printk("turning off the locking correctness validator.\n"); |
| 859 | dump_stack(); | ||
| 858 | return NULL; | 860 | return NULL; |
| 859 | } | 861 | } |
| 860 | return list_entries + nr_list_entries++; | 862 | return list_entries + nr_list_entries++; |
| @@ -1681,6 +1683,7 @@ cache_hit: | |||
| 1681 | 1683 | ||
| 1682 | printk("BUG: MAX_LOCKDEP_CHAINS too low!\n"); | 1684 | printk("BUG: MAX_LOCKDEP_CHAINS too low!\n"); |
| 1683 | printk("turning off the locking correctness validator.\n"); | 1685 | printk("turning off the locking correctness validator.\n"); |
| 1686 | dump_stack(); | ||
| 1684 | return 0; | 1687 | return 0; |
| 1685 | } | 1688 | } |
| 1686 | chain = lock_chains + nr_lock_chains++; | 1689 | chain = lock_chains + nr_lock_chains++; |
| @@ -2540,6 +2543,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
| 2540 | debug_locks_off(); | 2543 | debug_locks_off(); |
| 2541 | printk("BUG: MAX_LOCKDEP_SUBCLASSES too low!\n"); | 2544 | printk("BUG: MAX_LOCKDEP_SUBCLASSES too low!\n"); |
| 2542 | printk("turning off the locking correctness validator.\n"); | 2545 | printk("turning off the locking correctness validator.\n"); |
| 2546 | dump_stack(); | ||
| 2543 | return 0; | 2547 | return 0; |
| 2544 | } | 2548 | } |
| 2545 | 2549 | ||
| @@ -2636,6 +2640,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
| 2636 | debug_locks_off(); | 2640 | debug_locks_off(); |
| 2637 | printk("BUG: MAX_LOCK_DEPTH too low!\n"); | 2641 | printk("BUG: MAX_LOCK_DEPTH too low!\n"); |
| 2638 | printk("turning off the locking correctness validator.\n"); | 2642 | printk("turning off the locking correctness validator.\n"); |
| 2643 | dump_stack(); | ||
| 2639 | return 0; | 2644 | return 0; |
| 2640 | } | 2645 | } |
| 2641 | 2646 | ||
