diff options
| author | Jiri Kosina <[email protected]> | 2022-01-10 09:55:44 +0100 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2022-01-10 09:55:44 +0100 |
| commit | c524559acd5d0903fa6e3b8e608bf5851de7217a (patch) | |
| tree | 91acebdb63e32973d08f93c21f44aae0f4c5ccc8 /tools/include/linux/stacktrace.h | |
| parent | fce0d275843712db6f9b611856f539da29ad5529 (diff) | |
| parent | 8590222e4b021054a7167a4dd35b152a8ed7018e (diff) | |
Merge branch 'for-5.17/hidraw' into for-linus
- locking performance improvement for hidraw code (André Almeida)
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 |