WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / bpf / test_ftrace.sh
blob20de7bb873bc7ea56afbb3a7adee2acb58415105
1 #!/bin/bash
3 TR=/sys/kernel/debug/tracing/
4 clear_trace() { # reset trace output
5 echo > $TR/trace
8 disable_tracing() { # stop trace recording
9 echo 0 > $TR/tracing_on
12 enable_tracing() { # start trace recording
13 echo 1 > $TR/tracing_on
16 reset_tracer() { # reset the current tracer
17 echo nop > $TR/current_tracer
20 disable_tracing
21 clear_trace
23 echo "" > $TR/set_ftrace_filter
24 echo '*printk* *console* *wake* *serial* *lock*' > $TR/set_ftrace_notrace
26 echo "bpf_prog_test*" > $TR/set_graph_function
27 echo "" > $TR/set_graph_notrace
29 echo function_graph > $TR/current_tracer
31 enable_tracing
32 ./test_progs -t fentry
33 ./test_progs -t fexit
34 disable_tracing
35 clear_trace
37 reset_tracer
39 exit 0