From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Jiping Ma <jiping.ma2@windriver.com>,
catalin.marinas@arm.com, will.deacon@arm.com, mingo@redhat.com,
Joel Fernandes <joel@joelfernandes.org>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] tracing/arm: Fix the stack tracer when LR is saved after local storage
Date: Wed, 07 Aug 2019 12:34:01 -0400 [thread overview]
Message-ID: <20190807163401.570339297@goodmis.org> (raw)
As arm64 saves the link register after a function's local variables are
stored, it causes the max stack tracer to be off by one in its output
of which function has the bloated stack frame.
The first patch fixes this by creating a ARCH_RET_ADDR_BEFORE_LOCAL_VARS
define that an achitecture (arm64) may set in asm/ftrace.h, and this
will cause the stack tracer to make the shift.
As it has been proven that the stack tracer isn't the most trivial
algorithm to understand by staring at the code, the second patch adds
comments to the code to explain the algorithm with and without the
ARCH_RET_ADDR_BEFORE_LOCAL_VARS.
Hmm, should this be sent to stable (and for inclusion now?)
-- Steve
Steven Rostedt (VMware) (2):
tracing/arm64: Have max stack tracer handle the case of return address after data
tracing: Document the stack trace algorithm in the comments
----
arch/arm64/include/asm/ftrace.h | 1 +
kernel/trace/trace_stack.c | 112 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 113 insertions(+)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-08-07 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 16:34 Steven Rostedt [this message]
2019-08-07 16:34 ` [PATCH 1/2] tracing/arm64: Have max stack tracer handle the case of return address after data Steven Rostedt
2019-08-07 16:34 ` [PATCH 2/2] tracing: Document the stack trace algorithm in the comments Steven Rostedt
2019-08-07 16:40 ` Steven Rostedt
2019-08-07 17:08 ` [PATCH 0/2] tracing/arm: Fix the stack tracer when LR is saved after local storage Mark Rutland
2019-08-07 17:20 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190807163401.570339297@goodmis.org \
--to=rostedt@goodmis.org \
--cc=catalin.marinas@arm.com \
--cc=jiping.ma2@windriver.com \
--cc=joel@joelfernandes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).