Re: [PATCH 2/2] perf test: Skip test_arm_callgraph_fp.sh if unwinding isn't built in

From: Ian Rogers
Date: Tue Jan 23 2024 - 12:41:39 EST


On Tue, Jan 23, 2024 at 8:39 AM James Clark <james.clark@xxxxxxx> wrote:
>
> Even though this is a frame pointer unwind test, it's testing that a
> frame pointer stack can be augmented correctly with a partial
> Dwarf unwind. So add a feature check so that this test skips instead of
> fails if Dwarf unwinding isn't present.

Hi James,

Is there value in testing without the partial Dwarf unwind? Presumably
that is covered by the existing dwarf unwind test?
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/dwarf-unwind.c?h=perf-tools-next
If the issue is inlined functions I'm surprised addr2line isn't doing
the job properly. Is there an addr2line perf script issue here?

Thanks,
Ian

> Signed-off-by: James Clark <james.clark@xxxxxxx>
> ---
> tools/perf/tests/shell/test_arm_callgraph_fp.sh | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> index e342e6c8aa50..83b53591b1ea 100755
> --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
> @@ -8,6 +8,12 @@ shelldir=$(dirname "$0")
>
> lscpu | grep -q "aarch64" || exit 2
>
> +if perf version --build-options | grep HAVE_DWARF_UNWIND_SUPPORT | grep -q OFF
> +then
> + echo "Skipping, no dwarf unwind support"
> + exit 2
> +fi
> +
> skip_test_missing_symbol leafloop
>
> PERF_DATA=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
> --
> 2.34.1
>