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>
32 lines
910 B
Bash
32 lines
910 B
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# description: ftrace - function profiler with function graph tracing
|
|
# requires: function_profile_enabled set_ftrace_filter function_graph:tracer
|
|
|
|
# The function graph tracer can now be run along side of the function
|
|
# profiler. But there was a bug that caused the combination of the two
|
|
# to crash. It also required the function graph tracer to be started
|
|
# first.
|
|
#
|
|
# This test triggers that bug
|
|
#
|
|
# We need both function_graph and profiling to run this test
|
|
|
|
fail() { # mesg
|
|
echo $1
|
|
exit_fail
|
|
}
|
|
|
|
echo "Enabling function graph tracer:"
|
|
echo function_graph > current_tracer
|
|
echo "enable profiler"
|
|
|
|
# Older kernels do not allow function_profile to be enabled with
|
|
# function graph tracer. If the below fails, mark it as unsupported
|
|
echo 1 > function_profile_enabled || exit_unsupported
|
|
|
|
# Let it run for a bit to make sure nothing explodes
|
|
sleep 1
|
|
|
|
exit 0
|