Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
45 lines
786 B
Bash
Executable File
45 lines
786 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ -e /sys/kernel/tracing/trace ]]; then
|
|
TR=/sys/kernel/tracing/
|
|
else
|
|
TR=/sys/kernel/debug/tracing/
|
|
fi
|
|
|
|
clear_trace() { # reset trace output
|
|
echo > $TR/trace
|
|
}
|
|
|
|
disable_tracing() { # stop trace recording
|
|
echo 0 > $TR/tracing_on
|
|
}
|
|
|
|
enable_tracing() { # start trace recording
|
|
echo 1 > $TR/tracing_on
|
|
}
|
|
|
|
reset_tracer() { # reset the current tracer
|
|
echo nop > $TR/current_tracer
|
|
}
|
|
|
|
disable_tracing
|
|
clear_trace
|
|
|
|
echo "" > $TR/set_ftrace_filter
|
|
echo '*printk* *console* *wake* *serial* *lock*' > $TR/set_ftrace_notrace
|
|
|
|
echo "bpf_prog_test*" > $TR/set_graph_function
|
|
echo "" > $TR/set_graph_notrace
|
|
|
|
echo function_graph > $TR/current_tracer
|
|
|
|
enable_tracing
|
|
./test_progs -t fentry
|
|
./test_progs -t fexit
|
|
disable_tracing
|
|
clear_trace
|
|
|
|
reset_tracer
|
|
|
|
exit 0
|