tracing/arm: Have max stack tracer handle the case of return address after data
This change is similar to the following patch, it also suitable for arm. [ Author: Steven Rostedt (VMware) Email: rostedt@goodmis.org Subject: tracing/arm64: Have max stack tracer handle the case of return address after data Date: Fri, 9 Aug 2019 02:15:05 +0000 Most archs (well at least x86) store the function call return address on the stack before storing the local variables for the function. The max stack tracer depends on this in its algorithm to display the stack size of each function it finds in the back trace. Some archs (arm64), may store the return address (from its link register) just before calling a nested function. There's no reason to save the link register on leaf functions, as it wont be updated. This breaks the algorithm of the max stack tracer. Add a new define ARCH_FTRACE_SHIFT_STACK_TRACER that an architecture may set if it stores the return address (link register) after it stores the function's local variables, and have the stack trace shift the values of the mapped stack size to the appropriate functions. Link: 20190802094103.163576-1-jiping.ma2@windriver.com Reported-by:Jiping Ma <jiping.ma2@windriver.com> Acked-by:
Will Deacon <will@kernel.org> Signed-off-by:
Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by:
Jiping Ma <jiping.ma2@windriver.com> ] Signed-off-by:
Zqiang <qiang.zhang@windriver.com> Signed-off-by:
Bruce Ashfield <bruce.ashfield@gmail.com>
Loading
Please register or sign in to comment