Lines Matching +full:spe +full:- +full:pmu

2 # Check Arm SPE trace data recording and synthesized samples (exclusive)
4 # Uses the 'perf record' to record trace data of Arm SPE events;
5 # then verify if any SPE event samples are generated by SPE with
8 # SPDX-License-Identifier: GPL-2.0
12 perf list pmu | grep -E -q 'arm_spe_[0-9]+//' && return 0
25 rm -f ${perfdata}
26 rm -f ${perfdata}.old
46 # from arm-spe.c/arm_spe_synth_events()
47 …events="(ld1-miss|ld1-access|llc-miss|lld-access|tlb-miss|tlb-access|branch-miss|remote-access|mem…
50 …# dd 3048 [002] 1 l1d-access: ffffaa64999c __GI___libc_write+0x3c (/lib/aarch64-
51 …# dd 3048 [002] 1 tlb-access: ffffaa64999c __GI___libc_write+0x3c (/lib/aarch64-
52 … 1 memory: ffffaa64999c __GI___libc_write+0x3c (/lib/aarch64-linux-gnu/libc-2.27.so)
53 perf script -F,-time -i ${perfdata} 2>&1 | \
54 grep -E " +$1 +[0-9]+ .* +${events}:(.*:)? +" > /dev/null 2>&1
61 # 73.04% 73.04% dd libc-2.27.so [.] _dl_addr
62 # 7.71% 7.71% dd libc-2.27.so [.] getenv
63 # 2.59% 2.59% dd ld-2.27.so [.] strcmp
64 perf report --stdio -i ${perfdata} 2>&1 | \
65 grep -E " +[0-9]+\.[0-9]+% +[0-9]+\.[0-9]+% +$1 " > /dev/null 2>&1
70 perf record -o ${perfdata} -e arm_spe// -S \
71 -- dd if=/dev/zero of=/dev/null > /dev/null 2>&1 &
78 kill -USR2 $PERFPID
88 arm_spe_report "SPE snapshot testing" $err
92 echo "Recording trace with system-wide mode $perfdata"
94 perf record -o - -e dummy -a -B true > /dev/null 2>&1
96 arm_spe_report "SPE system-wide testing" 2
100 perf record -o ${perfdata} -e arm_spe// -a --no-bpf-event \
101 -- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1
107 arm_spe_report "SPE system-wide testing" $err
111 echo "SPE discard mode"
114 if [ -e "$f/format/discard" ]; then
115 cpu=$(cut -c -1 "$f/cpumask")
120 if [ -z $cpu ]; then
121 arm_spe_report "SPE discard mode not present" 2
125 # Test can use wildcard SPE instance and Perf will only open the event
129 perf record -o ${perfdata} -e arm_spe/discard/ -N -B --no-bpf-event \
130 -- taskset --cpu-list $cpu true
132 if perf report -i ${perfdata} --stats | grep 'AUX events\|AUXTRACE events'; then
133 arm_spe_report "SPE discard mode found unexpected data" 1
135 arm_spe_report "SPE discard mode" 0