Lines Matching +full:system +full:- +full:wide
3 # SPDX-License-Identifier: GPL-2.0
5 set -e
20 testprog="perf test -w thloop"
26 default_fd_limit=$(ulimit -Sn)
27 # With option --threads=cpu the number of open file descriptors should be
36 rm -rf "${perfdata}"
37 rm -rf "${perfdata}".old
39 trap - EXIT TERM INT
49 echo "Basic --per-thread mode test"
50 if ! perf record -o /dev/null --quiet ${testprog} 2> /dev/null
52 echo "Per-thread record [Skipped event not supported]"
55 if ! perf record --per-thread -o "${perfdata}" ${testprog} 2> /dev/null
57 echo "Per-thread record [Failed record]"
61 if ! perf report -i "${perfdata}" -q | grep -q "${testsym}"
63 echo "Per-thread record [Failed missing output]"
72 rm -f "${perfdata}"
75 perf record -p "${TESTPID}" --per-thread -o "${perfdata}" sleep 1 2> /dev/null
78 if [ ! -e "${perfdata}" ]
80 echo "Per-thread record [Failed record -p]"
84 if ! perf report -i "${perfdata}" -q | grep -q "${testsym}"
86 echo "Per-thread record [Failed -p missing output]"
91 echo "Basic --per-thread mode test [Success]"
96 if ! perf list | grep -q 'br_inst_retired.near_call'
101 …if ! perf record --intr-regs=\? 2>&1 | grep -q 'available registers: AX BX CX DX SI DI BP SP IP FL…
106 if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call \
107 -c 1000 --per-thread ${testprog} 2> /dev/null \
108 | perf script -F ip,sym,iregs -i - 2> /dev/null \
109 | grep -q "DI:"
119 echo "Basic --system-wide mode test"
120 if ! perf record -aB --synth=no -o "${perfdata}" ${testprog} 2> /dev/null
122 echo "System-wide record [Skipped not supported]"
125 if ! perf report -i "${perfdata}" -q | grep -q "${testsym}"
127 echo "System-wide record [Failed missing output]"
131 if ! perf record -aB --synth=no -e cpu-clock,cs --threads=cpu \
132 -o "${perfdata}" ${testprog} 2> /dev/null
134 echo "System-wide record [Failed record --threads option]"
138 if ! perf report -i "${perfdata}" -q | grep -q "${testsym}"
140 echo "System-wide record [Failed --threads missing output]"
144 echo "Basic --system-wide mode test [Success]"
149 if ! perf record -o "${perfdata}" ${testprog} 2> /dev/null
155 if ! perf report -i "${perfdata}" -q | grep -q "${testsym}"
161 if ! perf record -e cpu-clock,cs --threads=package \
162 -o "${perfdata}" ${testprog} 2> /dev/null
164 echo "Workload record [Failed record --threads option]"
168 if ! perf report -i "${perfdata}" -q | grep -q "${testsym}"
170 echo "Workload record [Failed --threads missing output]"
182 if [ ! -e "$dir$br_cntr_file" ]
188 …if ! perf record -o "${perfdata}" -e "{branches:p,instructions}" -j any,counter ${testprog} 2> /de…
194 if ! perf report -i "${perfdata}" -D -q | grep -q "$br_cntr_output"
200 if ! perf script -i "${perfdata}" -F +brstackinsn,+brcntr | grep -q "$br_cntr_script_output"
211 if ! perf record -aB --synth=cgroup --all-cgroups -o "${perfdata}" ${testprog} 2> /dev/null
216 if ! perf report -i "${perfdata}" -D | grep -q "CGROUP"
222 if ! perf script -i "${perfdata}" -F cgroup | grep -q -v "unknown"
232 if [[ $default_fd_limit -lt $min_fd_limit ]]; then
233 ulimit -Sn $min_fd_limit
244 ulimit -Sn $default_fd_limit