From: Julien Thierry <julien.thierry@arm.com>
To: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Cc: rostedt@goodmis.org, AKASHI Takahiro <takahiro.akashi@linaro.org>
Subject: arm64: ftrace: function_graph tracer not working without dynamic instrumentation
Date: Thu, 26 Oct 2017 09:50:13 +0100 [thread overview]
Message-ID: <c243a20f-e2b5-5d1c-0ace-c956eb11684c@arm.com> (raw)
Hi,
On arm64, I noticed that when CONFIG_DYNAMIC_FTRACE is not enabled,
using the function_graph tracer in ftrace alway gives empty traces.
The issues seems to be that the ftrace_trace_function is set to a
function different than ftrace_stub when running mcount. If I allow
mcount to continue beyond that check, I get the graph traces.
Guidelines given in Documentation/trace/ftrace-design.txt suggest that
ftrace_trace_function != ftrace_stub should be checked before any
function_graph related values and if the check is true then we shouldn't
try to call ftrace_trace_function.
Investigating a bit more, ftrace_trace_function gets set
ftrace_ops_no_ops in update_ftrace_function called when setting up the
function_graph tracer.
The issue does not occur when dynamic ftrace is supported because we
just replace some nops at known locations and replace them with branches.
It seemed to me that the arm64 side of things is following the
guidelines in ftrace-design, so I am unsure whether it is intended that
the ftrace_trace_function is not set to ftrace_stub when using the
function_graph tracer.
Cheers,
--
Julien Thierry
next reply other threads:[~2017-10-26 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 8:50 Julien Thierry [this message]
2017-10-26 10:51 ` arm64: ftrace: function_graph tracer not working without dynamic instrumentation 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=c243a20f-e2b5-5d1c-0ace-c956eb11684c@arm.com \
--to=julien.thierry@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=takahiro.akashi@linaro.org \
/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