| .. | .. |
|---|
| 3 | 3 | # description: ftrace - test for function traceon/off triggers |
|---|
| 4 | 4 | # flags: instance |
|---|
| 5 | 5 | # |
|---|
| 6 | +# The triggers are set within the set_ftrace_filter file |
|---|
| 7 | +# requires: set_ftrace_filter |
|---|
| 8 | +# |
|---|
| 6 | 9 | # Ftrace allows to add triggers to functions, such as enabling or disabling |
|---|
| 7 | 10 | # tracing, enabling or disabling trace events, or recording a stack trace |
|---|
| 8 | 11 | # within the ring buffer. |
|---|
| .. | .. |
|---|
| 10 | 13 | # This test is designed to test enabling and disabling tracing triggers |
|---|
| 11 | 14 | # |
|---|
| 12 | 15 | |
|---|
| 13 | | -# The triggers are set within the set_ftrace_filter file |
|---|
| 14 | | -if [ ! -f set_ftrace_filter ]; then |
|---|
| 15 | | - echo "set_ftrace_filter not found? Is dynamic ftrace not set?" |
|---|
| 16 | | - exit_unsupported |
|---|
| 17 | | -fi |
|---|
| 18 | | - |
|---|
| 19 | | -do_reset() { |
|---|
| 20 | | - reset_ftrace_filter |
|---|
| 21 | | - reset_tracer |
|---|
| 22 | | - disable_events |
|---|
| 23 | | - clear_trace |
|---|
| 24 | | - enable_tracing |
|---|
| 25 | | -} |
|---|
| 26 | | - |
|---|
| 27 | 16 | fail() { # mesg |
|---|
| 28 | | - do_reset |
|---|
| 29 | 17 | echo $1 |
|---|
| 30 | 18 | exit_fail |
|---|
| 31 | 19 | } |
|---|
| 32 | 20 | |
|---|
| 33 | 21 | SLEEP_TIME=".1" |
|---|
| 34 | | - |
|---|
| 35 | | -do_reset |
|---|
| 36 | 22 | |
|---|
| 37 | 23 | echo "Testing function probes with enabling disabling tracing:" |
|---|
| 38 | 24 | |
|---|
| .. | .. |
|---|
| 52 | 38 | |
|---|
| 53 | 39 | echo '** ENABLE EVENTS' |
|---|
| 54 | 40 | |
|---|
| 55 | | -echo 1 > events/enable |
|---|
| 41 | +echo 1 > events/sched/enable |
|---|
| 56 | 42 | |
|---|
| 57 | 43 | echo '** ENABLE TRACING' |
|---|
| 58 | 44 | enable_tracing |
|---|