From: James Clark Date: Tue, 9 Jun 2026 14:40:23 +0000 (+0100) Subject: perf test cs-etm: Speed up disassembly test X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=0e16b544165822cd1452d446308fa3ec9311d05e;p=thirdparty%2Fkernel%2Flinux.git perf test cs-etm: Speed up disassembly test We can use exit snapshot to limit the amount of trace to decode here too. Also each call to objdump is quite expensive on kcore so limit it to 2 samples instead of 30. We only want to see if there is no data at all. Reviewed-by: Leo Yan Signed-off-by: James Clark Cc: Amir Ayupov Cc: Ian Rogers Cc: Jiri Olsa Cc: Jonathan Corbet Cc: Mike Leach Cc: Namhyung Kim Cc: Paschalis Mpeis Cc: Shuah Khan Cc: Suzuki Poulouse Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/tests/shell/test_arm_coresight_disasm.sh b/tools/perf/tests/shell/test_arm_coresight_disasm.sh index f78dfb6bf73e3..f2fb1aa92252a 100755 --- a/tools/perf/tests/shell/test_arm_coresight_disasm.sh +++ b/tools/perf/tests/shell/test_arm_coresight_disasm.sh @@ -43,9 +43,9 @@ branch_search='[[:space:]](bl|b(\.(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al) ## Test kernel ## if [ "$(id -u)" == 0 ] && [ -e /proc/kcore ]; then echo "Testing kernel disassembly" - perf record -o ${perfdata} -e cs_etm//k --kcore -- touch $file > /dev/null 2>&1 + perf record -o ${perfdata} -e cs_etm//k --kcore -Se -m,64K -- 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} + -d --stop-sample=2 -k ${perfdata}/kcore_dir/kcore 2> /dev/null > ${file} grep -q -E ${branch_search} ${file} echo "Found kernel branches" else @@ -55,9 +55,9 @@ fi ## Test user ## echo "Testing userspace disassembly" -perf record -o ${perfdata} -e cs_etm//u -- touch $file > /dev/null 2>&1 +perf record -o ${perfdata} -e cs_etm//u -Se -m,64K -- touch $file > /dev/null 2>&1 perf script -i ${perfdata} -s python:${script_path} -- \ - -d --stop-sample=30 2> /dev/null > ${file} + -d --stop-sample=2 2> /dev/null > ${file} grep -q -E ${branch_search} ${file} echo "Found userspace branches"