diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2021-12-14 15:30:34 +0300 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2021-12-14 15:30:34 +0300 |
| commit | 09eb3ad55fef8d62edb74d5fe3a6720b6b467463 (patch) | |
| tree | ea7effcf055b12be234d0992110e464aa307520d /tools/include/linux/stacktrace.h | |
| parent | 60bf9b33c82c0e040a98272d7ff4f5a52e7469d6 (diff) | |
| parent | 94185adbfad56815c2c8401e16d81bdb74a79201 (diff) | |
| download | linux-09eb3ad55fef8d62edb74d5fe3a6720b6b467463.tar.xz | |
Merge branch 'irq/urgent' into irq/msi
to pick up the PCI/MSI-x fixes.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'tools/include/linux/stacktrace.h')
| -rw-r--r-- | tools/include/linux/stacktrace.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tools/include/linux/stacktrace.h b/tools/include/linux/stacktrace.h deleted file mode 100644 index ae343ac35bfa..000000000000 --- a/tools/include/linux/stacktrace.h +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _LIBLOCKDEP_LINUX_STACKTRACE_H_ -#define _LIBLOCKDEP_LINUX_STACKTRACE_H_ - -#include <execinfo.h> - -struct stack_trace { - unsigned int nr_entries, max_entries; - unsigned long *entries; - int skip; -}; - -static inline void print_stack_trace(struct stack_trace *trace, int spaces) -{ - backtrace_symbols_fd((void **)trace->entries, trace->nr_entries, 1); -} - -#define save_stack_trace(trace) \ - ((trace)->nr_entries = \ - backtrace((void **)(trace)->entries, (trace)->max_entries)) - -static inline int dump_stack(void) -{ - void *array[64]; - size_t size; - - size = backtrace(array, 64); - backtrace_symbols_fd(array, size, 1); - - return 0; -} - -#endif |
