Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Provide a default dump_stack() function for architectures |
| 3 | * which don't implement their own. |
| 4 | */ |
| 5 | |
| 6 | #include <linux/kernel.h> |
Paul Gortmaker | 8bc3bcc | 2011-11-16 21:29:17 -0500 | [diff] [blame] | 7 | #include <linux/export.h> |
Tejun Heo | 196779b | 2013-04-30 15:27:12 -0700 | [diff] [blame] | 8 | #include <linux/sched.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
Tejun Heo | 196779b | 2013-04-30 15:27:12 -0700 | [diff] [blame] | 10 | /** |
| 11 | * dump_stack - dump the current task information and its stack trace |
| 12 | * |
| 13 | * Architectures can override this implementation by implementing its own. |
| 14 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | void dump_stack(void) |
| 16 | { |
Tejun Heo | 196779b | 2013-04-30 15:27:12 -0700 | [diff] [blame] | 17 | dump_stack_print_info(KERN_DEFAULT); |
| 18 | show_stack(NULL, NULL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | EXPORT_SYMBOL(dump_stack); |