diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2016-09-21 19:43:48 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-09-21 19:56:55 +0200 |
commit | 951dbf500aa7df051d7cde15b9ac05608c0bb16f (patch) | |
tree | 36cefe0aa1b559a7a41ac1c19a418ef636324201 /drivers/scsi/eata_pio.c | |
parent | tracing: Have max_latency be defined for HWLAT_TRACER as well (diff) | |
download | linux-951dbf500aa7df051d7cde15b9ac05608c0bb16f.tar.xz linux-951dbf500aa7df051d7cde15b9ac05608c0bb16f.zip |
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 'drivers/scsi/eata_pio.c')
0 files changed, 0 insertions, 0 deletions