mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
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 <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>
This commit is contained in:
parent
0f900110c7
commit
0e16b54416
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user