mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 20:06:35 +00:00
perf test -vv Symbols is used to indentify symbols within the perf binary. Add the -F flag so that the test command doesn't fork the test before running. This removes a little overhead. Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Cc: James Clark <[email protected]> Cc: Justin Stitt <[email protected]> Cc: Bill Wendling <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Yang Jihong <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Kan Liang <[email protected]> Cc: Athira Jajeev <[email protected]> Cc: [email protected] Signed-off-by: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected]
22 lines
372 B
Bash
22 lines
372 B
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
perf_has_symbol()
|
|
{
|
|
if perf test -vv -F "Symbols" 2>&1 | grep "[[:space:]]$1$"; then
|
|
echo "perf does have symbol '$1'"
|
|
return 0
|
|
fi
|
|
echo "perf does not have symbol '$1'"
|
|
return 1
|
|
}
|
|
|
|
skip_test_missing_symbol()
|
|
{
|
|
if ! perf_has_symbol "$1" ; then
|
|
echo "perf is missing symbols - skipping test"
|
|
exit 2
|
|
fi
|
|
return 0
|
|
}
|