2 # description: ftrace - function graph filters
4 # Make sure that function graph filtering works
6 if ! grep -q function_graph available_tracers; then
7 echo "no function graph tracer configured"
26 # filter something, schedule is always good
27 if ! echo "schedule" > set_ftrace_filter; then
29 if ! echo ".schedule" > set_ftrace_filter; then
30 fail "can not enable schedule filter"
34 echo function_graph > current_tracer
37 # search for functions (has "()" on the line), and make sure
38 # that only the schedule function was found
39 count=`cat trace | grep '()' | grep -v schedule | wc -l`
40 if [ $count -ne 0 ]; then
41 fail "Graph filtering not working by itself?"
44 # Make sure we did find something
45 count=`cat trace | grep 'schedule()' | wc -l`
46 if [ $count -eq 0 ]; then
47 fail "No schedule traces found?"