0001
0002
0003
0004
0005 rmmod ftrace-direct ||:
0006 if ! modprobe ftrace-direct ; then
0007 echo "No ftrace-direct sample module - please make CONFIG_SAMPLE_FTRACE_DIRECT=m"
0008 exit_unresolved;
0009 fi
0010
0011 echo "Let the module run a little"
0012 sleep 1
0013
0014 grep -q "my_direct_func: waking up" trace
0015
0016 rmmod ftrace-direct
0017
0018 test_tracer() {
0019 tracer=$1
0020
0021
0022 echo $tracer > current_tracer
0023 modprobe ftrace-direct
0024 rmmod ftrace-direct
0025 echo nop > current_tracer
0026
0027
0028 echo $tracer > current_tracer
0029 modprobe ftrace-direct
0030 echo nop > current_tracer
0031 rmmod ftrace-direct
0032
0033
0034 modprobe ftrace-direct
0035 echo $tracer > current_tracer
0036 echo nop > current_tracer
0037 rmmod ftrace-direct
0038
0039
0040 modprobe ftrace-direct
0041 echo $tracer > current_tracer
0042 rmmod ftrace-direct
0043 echo nop > current_tracer
0044 }
0045
0046 for t in `cat available_tracers`; do
0047 if [ "$t" != "nop" ]; then
0048 test_tracer $t
0049 fi
0050 done
0051
0052 echo nop > current_tracer
0053 rmmod ftrace-direct ||:
0054
0055
0056 echo "Running with another ftrace direct function"
0057
0058 rmmod ftrace-direct-too ||:
0059 modprobe ftrace-direct-too
0060
0061 for t in `cat available_tracers`; do
0062 if [ "$t" != "nop" ]; then
0063 test_tracer $t
0064 fi
0065 done
0066
0067 echo nop > current_tracer
0068 rmmod ftrace-direct ||:
0069 rmmod ftrace-direct-too ||: