Lines Matching +full:2 +full:- +full:way
2 # SPDX-License-Identifier: GPL-2.0
25 # The old (slow) way, for kernels before v5.1.
27 # [old-way] # cat available_filter_functions > ~/full-file
29 # [old-way] *** Note *** this process will take several minutes to update the
30 # [old-way] filters. Setting multiple functions is an O(n^2) operation, and we
31 # [old-way] are dealing with thousands of functions. So go have coffee, talk
32 # [old-way] with your coworkers, read facebook. And eventually, this operation
33 # [old-way] will end.
35 # The new way (using numbers) is an O(n) operation, and usually takes less than a second.
37 # seq `wc -l available_filter_functions | cut -d' ' -f1` > ~/full-file
45 # For either the new or old way, the rest of the operations remain the same.
47 # # ftrace-bisect ~/full-file ~/test-file ~/non-test-file
48 # # cat ~/test-file > set_ftrace_filter
52 # If it crashes, we know that ~/test-file has a bad function.
57 # # mv ~/test-file ~/full-file
62 # # mv ~/non-test-file ~/full-file
65 # # rm -f ~/test-file ~/non-test-file
69 # # ftrace-bisect ~/full-file ~/test-file ~/non-test-file
71 # The good thing is, because this cuts the number of functions in ~/test-file
78 # The way to figure out if the problem function is bad, just do:
80 # # echo <problem-function> > set_ftrace_notrace
93 if [ $# -ne 3 ]; then
94 echo 'usage: ftrace-bisect full-file test-file non-test-file'
99 test=$2
102 x=`cat $full | wc -l`
103 if [ $x -eq 1 ]; then
109 let x=$x/2
112 if [ ! -f $full ]; then
117 if [ -f $test ]; then
118 echo -n "$test exists, delete it? [y/N]"
120 if [ "$a" != "y" -a "$a" != "Y" ]; then
125 if [ -f $nontest ]; then
126 echo -n "$nontest exists, delete it? [y/N]"
128 if [ "$a" != "y" -a "$a" != "Y" ]; then
133 sed -ne "1,${x}p" $full > $test
134 sed -ne "$y,\$p" $full > $nontest