diff options
| author | James Clark <james.clark@linaro.org> | 2026-06-09 15:40:22 +0100 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-10 18:55:49 -0300 |
| commit | 0f900110c7b49cae863c19960991033e55c0ad2e (patch) | |
| tree | cddb035fa3120267c4eb6a7126a71a1bfc4ed8d4 /tools | |
| parent | 3c84ec94a68ad73663b9c1ac7543b59453f64678 (diff) | |
| download | linux-next-0f900110c7b49cae863c19960991033e55c0ad2e.tar.gz linux-next-0f900110c7b49cae863c19960991033e55c0ad2e.zip | |
perf test cs-etm: Add all branch instructions to test
If we reduce the number of samples searched to speed up the test, then
there will be less chance of hitting one of these branches. Extend the
regex to cover all branches so the test will always pass.
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Cc: Amir Ayupov <aaupov@meta.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mike Leach <mike.leach@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paschalis Mpeis <Paschalis.Mpeis@arm.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/perf/tests/shell/test_arm_coresight_disasm.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/tests/shell/test_arm_coresight_disasm.sh b/tools/perf/tests/shell/test_arm_coresight_disasm.sh index 87797d239f76..f78dfb6bf73e 100755 --- a/tools/perf/tests/shell/test_arm_coresight_disasm.sh +++ b/tools/perf/tests/shell/test_arm_coresight_disasm.sh @@ -38,8 +38,7 @@ cleanup_files() trap cleanup_files EXIT TERM INT # Ranges start and end on branches, so check for some likely branch instructions -sep="\s\|\s" -branch_search="\sbl${sep}b${sep}b.ne${sep}b.eq${sep}cbz\s" +branch_search='[[:space:]](bl|b(\.(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al))?|br|blr|ret|cbz|cbnz|tbz|tbnz|svc|eret)([[:space:]]|$)' ## Test kernel ## if [ "$(id -u)" == 0 ] && [ -e /proc/kcore ]; then @@ -47,7 +46,7 @@ if [ "$(id -u)" == 0 ] && [ -e /proc/kcore ]; then perf record -o ${perfdata} -e cs_etm//k --kcore -- touch $file > /dev/null 2>&1 perf script -i ${perfdata} -s python:${script_path} -- \ -d --stop-sample=30 -k ${perfdata}/kcore_dir/kcore 2> /dev/null > ${file} - grep -q -e ${branch_search} ${file} + grep -q -E ${branch_search} ${file} echo "Found kernel branches" else # Root and kcore are required for correct kernel decode due to runtime code patching @@ -59,7 +58,7 @@ echo "Testing userspace disassembly" perf record -o ${perfdata} -e cs_etm//u -- touch $file > /dev/null 2>&1 perf script -i ${perfdata} -s python:${script_path} -- \ -d --stop-sample=30 2> /dev/null > ${file} -grep -q -e ${branch_search} ${file} +grep -q -E ${branch_search} ${file} echo "Found userspace branches" glb_err=0 |
