diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2016-09-21 20:43:48 +0300 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-09-21 20:56:55 +0300 |
commit | 951dbf500aa7df051d7cde15b9ac05608c0bb16f (patch) | |
tree | 36cefe0aa1b559a7a41ac1c19a418ef636324201 /scripts/gdb | |
parent | f971cc9aabc287120bbe7f3f1abe70c13e61ee94 (diff) | |
download | linux-951dbf500aa7df051d7cde15b9ac05608c0bb16f.tar.xz |
ftrace/scripts: Add helper script to bisect function tracing problem functions
Every so often, with a special config or a architecture change, running
function or function_graph tracing can cause the machien to hard reboot,
crash, or simply hard lockup. There's some functions in the function graph
tracer that can not be traced otherwise it causes the function tracer to
recurse before the recursion protection mechanisms are in place.
When this occurs, using the dynamic ftrace featuer that allows limiting what
actually gets traced can be used to bisect down to the problem function.
This adds a script that helps with this process in the scripts/tracing
directory, called ftrace-bisect.sh
The set up is to read all the functions that can be traced from
available_filter_functions into a file (full_file). Then run this script
passing it the full_file and a "test_file" and "non_test_file", where the
test_file will be add to set_ftrace_filter. What ftarce_bisect.sh does, is
to copy half of the functions in full_file into the test_file and the other
half into the non_test_file. This way, one can cat the test_file into the
set_ftrace_filter functions and only test the functions that are in that
file. If it works, then we run the process again after copying non_test_file
to full_file and repeating the process. If the system crashed, then the bad
function is in the test_file and after a reboot, the test_file becomes the
new full_file in the next iteration.
When we get down to a single function in the full_file, then
ftrace_bisect.sh will report that as the bad function.
Full documentation of how to use this simple script is within the script
file itself.
Link: http://lkml.kernel.org/r/20160920100716.131d3647@gandalf.local.home
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions