tracing: Allow arch-specific stack tracer
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 30 Oct 2015 05:25:39 +0000 (14:25 +0900)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 3 Nov 2015 19:31:06 +0000 (14:31 -0500)
commitbb99d8ccec7f83a2730a29d1ae7eee5ffa446a9e
tree489004dcbfaefbf93282a12d241e5551f4ab133f
parent2ee8a74f2a5da913637f75a19a0da0e7a08c0f86
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>
include/linux/ftrace.h
kernel/trace/trace_stack.c