diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2015-10-30 01:25:39 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-11-03 14:31:06 -0500 |
commit | bb99d8ccec7f83a2730a29d1ae7eee5ffa446a9e (patch) | |
tree | 489004dcbfaefbf93282a12d241e5551f4ab133f /include/linux/ftrace.h | |
parent | 2ee8a74f2a5da913637f75a19a0da0e7a08c0f86 (diff) |
tracing: Allow arch-specific stack tracer
A stack frame may be used in a different way depending on cpu architecture.
Thus it is not always appropriate to slurp the stack contents, as current
check_stack() does, in order to calcurate a stack index (height) at a given
function call. At least not on arm64.
In addition, there is a possibility that we will mistakenly detect a stale
stack frame which has not been overwritten.
This patch makes check_stack() a weak function so as to later implement
arch-specific version.
Link: http://lkml.kernel.org/r/1446182741-31019-5-git-send-email-takahiro.akashi@linaro.org
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 6cd8c0ee4b6f..b4c92ab9e08b 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -263,7 +263,18 @@ static inline void ftrace_kill(void) { } | |||
263 | #endif /* CONFIG_FUNCTION_TRACER */ | 263 | #endif /* CONFIG_FUNCTION_TRACER */ |
264 | 264 | ||
265 | #ifdef CONFIG_STACK_TRACER | 265 | #ifdef CONFIG_STACK_TRACER |
266 | |||
267 | #define STACK_TRACE_ENTRIES 500 | ||
268 | |||
269 | struct stack_trace; | ||
270 | |||
271 | extern unsigned stack_trace_index[]; | ||
272 | extern struct stack_trace stack_trace_max; | ||
273 | extern unsigned long stack_trace_max_size; | ||
274 | extern arch_spinlock_t max_stack_lock; | ||
275 | |||
266 | extern int stack_tracer_enabled; | 276 | extern int stack_tracer_enabled; |
277 | void stack_trace_print(void); | ||
267 | int | 278 | int |
268 | stack_trace_sysctl(struct ctl_table *table, int write, | 279 | stack_trace_sysctl(struct ctl_table *table, int write, |
269 | void __user *buffer, size_t *lenp, | 280 | void __user *buffer, size_t *lenp, |