Re: [PATCH v1 2/2] perf test: Add set of perf record LBR tests
From: Arnaldo Carvalho de Melo
Date: Thu Aug 08 2024 - 10:34:56 EST
On Wed, Aug 07, 2024 at 10:46:44PM -0700, Ian Rogers wrote:
> Adds coverage for LBR operations and LBR callgraph.
>
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> ---
> tools/perf/tests/shell/record_lbr.sh | 161 +++++++++++++++++++++++++++
> 1 file changed, 161 insertions(+)
> create mode 100755 tools/perf/tests/shell/record_lbr.sh
>
> diff --git a/tools/perf/tests/shell/record_lbr.sh b/tools/perf/tests/shell/record_lbr.sh
> new file mode 100755
> index 000000000000..baf168d0ddbb
> --- /dev/null
> +++ b/tools/perf/tests/shell/record_lbr.sh
> @@ -0,0 +1,161 @@
> +#!/bin/bash
> +# perf record LBR tests
> +# SPDX-License-Identifier: GPL-2.0
> +
> +set -e
> +
> +if [ ! -f /sys/devices/cpu/caps/branches ]
> +then
> + echo "Skip: only x86 CPUs support LBR"
> + exit 2
> +fi
root@x1:~# ls -la /sys/devices/cpu*/caps/branches
-r--r--r--. 1 root root 4096 Jun 4 16:07 /sys/devices/cpu_atom/caps/branches
-r--r--r--. 1 root root 4096 Aug 8 11:21 /sys/devices/cpu_core/caps/branches
root@x1:~#
I'm getting:
root@x1:~# perf test -vvvv LBR
97: perf record LBR tests:
--- start ---
test child forked, pid 2033388
Skip: only x86 CPUs support LBR
---- end(-2) ----
97: perf record LBR tests : Skip
root@x1:~#
So I added the following follow-up patch, ack?
- Arnaldo