]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf test cs-etm: Remove duplicate branch tests
authorJames Clark <james.clark@linaro.org>
Tue, 9 Jun 2026 14:40:16 +0000 (15:40 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 10 Jun 2026 21:55:49 +0000 (18:55 -0300)
We already test branch output in perf script mode, but then retest it in
Perf report mode. This is more of a test of Perf itself than Coresight
because Perf uses the same samples to generate both outputs. Also we're
already testing instruction output in Perf report mode.

Remove this test for a speedup. On the systemwide test also remove the
Perf report test because systemwide mode records a lot more data so
running multiple tests on it has a big runtime impact.

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>
tools/perf/tests/shell/test_arm_coresight.sh

index bbf89e944e7b1a2168d46724f41a0102408271b9..39553702c1f31e8dc54622019963635221f81749 100755 (executable)
@@ -52,17 +52,6 @@ perf_script_branch_samples() {
                grep -E " +$1 +[0-9]+ .* +branches:(.*:)? +" > /dev/null 2>&1
 }
 
-perf_report_branch_samples() {
-       echo "Looking at perf.data file for reporting branch samples:"
-
-       # Below is an example of the branch samples reporting:
-       #   73.04%    73.04%  touch    libc-2.27.so      [.] _dl_addr
-       #    7.71%     7.71%  touch    libc-2.27.so      [.] getenv
-       #    2.59%     2.59%  touch    ld-2.27.so        [.] strcmp
-       perf report --stdio -i ${perfdata} 2>&1 | \
-               grep -E " +[0-9]+\.[0-9]+% +[0-9]+\.[0-9]+% +$1 " > /dev/null 2>&1
-}
-
 perf_report_instruction_samples() {
        echo "Looking at perf.data file for instruction samples:"
 
@@ -123,7 +112,6 @@ arm_cs_iterate_devices() {
 
                        record_touch_file $device_name $2 &&
                        perf_script_branch_samples touch &&
-                       perf_report_branch_samples touch &&
                        perf_report_instruction_samples touch
 
                        err=$?
@@ -154,9 +142,7 @@ arm_cs_etm_system_wide_test() {
 
        # System-wide mode should include perf samples so test for that
        # instead of ls
-       perf_script_branch_samples perf &&
-       perf_report_branch_samples perf &&
-       perf_report_instruction_samples perf
+       perf_script_branch_samples perf
 
        err=$?
        arm_cs_report "CoreSight system wide testing" $err
@@ -179,7 +165,6 @@ arm_cs_etm_snapshot_test() {
        wait $PERFPID
 
        perf_script_branch_samples dd &&
-       perf_report_branch_samples dd &&
        perf_report_instruction_samples dd
 
        err=$?
@@ -191,7 +176,6 @@ arm_cs_etm_basic_test() {
        perf record -o ${perfdata} "$@" -m,8M -- ls > /dev/null 2>&1
 
        perf_script_branch_samples ls &&
-       perf_report_branch_samples ls &&
        perf_report_instruction_samples ls
 
        err=$?