When we increase the default timestamp interval in a later commit, less trace will be recorded. At the moment the amount of trace overflows the 64K buffer, so the exit snapshot trace is what happened at the end of the process rather than the beginning. With the new default interval, the entire execution will be contained in one buffer and the first few samples are always various instruction and data faults. These go to the kernel so don't result in ranges that can be disassembled.
Increase the window to 6 samples to ensure something with a branch can be disassembled even with the fault samples.
Signed-off-by: James Clark james.clark@linaro.org --- tools/perf/tests/shell/coresight/test_arm_coresight_disasm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/tests/shell/coresight/test_arm_coresight_disasm.sh b/tools/perf/tests/shell/coresight/test_arm_coresight_disasm.sh index d298b18154b2..236c4160e480 100755 --- a/tools/perf/tests/shell/coresight/test_arm_coresight_disasm.sh +++ b/tools/perf/tests/shell/coresight/test_arm_coresight_disasm.sh @@ -50,7 +50,7 @@ if [ "$(id -u)" == 0 ] && [ -e /proc/kcore ]; then echo "Testing kernel disassembly" perf record -o ${perfdata} -e cs_etm//k --kcore -Se -m,64K -- touch $file > /dev/null 2>&1 perf script -i ${perfdata} arm-cs-trace-disasm -- \ - -d --stop-sample=2 -k ${perfdata}/kcore_dir/kcore 2> /dev/null > ${file} + -d --stop-sample=6 -k ${perfdata}/kcore_dir/kcore 2> /dev/null > ${file} grep -q -E ${branch_search} ${file} echo "Found kernel branches" else @@ -62,7 +62,7 @@ fi echo "Testing userspace disassembly" perf record -o ${perfdata} -e cs_etm//u -Se -m,64K -- touch $file > /dev/null 2>&1 perf script -i ${perfdata} arm-cs-trace-disasm -- \ - -d --stop-sample=2 2> /dev/null > ${file} + -d --stop-sample=6 2> /dev/null > ${file} grep -q -E ${branch_search} ${file} echo "Found userspace branches"