diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-03-07 01:55:13 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-03-09 15:55:34 +0100 |
commit | 524a38682573b2e15ab6317ccfe50280441514be (patch) | |
tree | 3c720aa57454bd920aad5d94937a78e4c4a196f8 /lib | |
parent | ftrace: Fix en(dis)able graph caller when en(dis)abling record via sysctl (diff) | |
download | linux-524a38682573b2e15ab6317ccfe50280441514be.tar.xz linux-524a38682573b2e15ab6317ccfe50280441514be.zip |
ftrace: Fix ftrace enable ordering of sysctl ftrace_enabled
Some archs (specifically PowerPC), are sensitive with the ordering of
the enabling of the calls to function tracing and setting of the
function to use to be traced.
That is, update_ftrace_function() sets what function the ftrace_caller
trampoline should call. Some archs require this to be set before
calling ftrace_run_update_code().
Another bug was discovered, that ftrace_startup_sysctl() called
ftrace_run_update_code() directly. If the function the ftrace_caller
trampoline changes, then it will not be updated. Instead a call
to ftrace_startup_enable() should be called because it tests to see
if the callback changed since the code was disabled, and will
tell the arch to update appropriately. Most archs do not need this
notification, but PowerPC does.
The problem could be seen by the following commands:
# echo 0 > /proc/sys/kernel/ftrace_enabled
# echo function > /sys/kernel/debug/tracing/current_tracer
# echo 1 > /proc/sys/kernel/ftrace_enabled
# cat /sys/kernel/debug/tracing/trace
The trace will show that function tracing was not active.
Cc: stable@vger.kernel.org # 2.6.27+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions