Lines Matching refs:lock

2 # kernel lock contention analysis test
30 if ! perf list | grep -q lock:contention_begin; then
31 echo "[Skip] No lock contention tracepoints"
38 echo "[Skip] Low number of CPUs (`nproc`), lock event cannot be triggered certainly"
46 echo "Testing perf lock record and perf lock contention"
47 perf lock record -o ${perfdata} -- perf bench sched messaging > /dev/null 2>&1
49 perf lock contention -i ${perfdata} -E 1 -q 2> ${result}
59 echo "Testing perf lock contention --use-bpf"
61 if ! perf lock con -b true > /dev/null 2>&1 ; then
66 # the perf lock contention output goes to the stderr
67 perf lock con -a -b -E 1 -q -- perf bench sched messaging > /dev/null 2> ${result}
77 echo "Testing perf lock record and perf lock contention at the same time"
78 perf lock record -o- -- perf bench sched messaging 2> /dev/null | \
79 perf lock contention -i- -E 1 -q 2> ${result}
89 echo "Testing perf lock contention --threads"
90 perf lock contention -i ${perfdata} -t -E 1 -q 2> ${result}
97 if ! perf lock con -b true > /dev/null 2>&1 ; then
101 # the perf lock contention output goes to the stderr
102 perf lock con -a -b -t -E 1 -q -- perf bench sched messaging > /dev/null 2> ${result}
112 echo "Testing perf lock contention --lock-addr"
113 perf lock contention -i ${perfdata} -l -E 1 -q 2> ${result}
120 if ! perf lock con -b true > /dev/null 2>&1 ; then
124 # the perf lock contention output goes to the stderr
125 perf lock con -a -b -l -E 1 -q -- perf bench sched messaging > /dev/null 2> ${result}
135 echo "Testing perf lock contention --lock-cgroup"
137 if ! perf lock con -b true > /dev/null 2>&1 ; then
142 # the perf lock contention output goes to the stderr
143 perf lock con -a -b -g -E 1 -q -- perf bench sched messaging > /dev/null 2> ${result}
153 echo "Testing perf lock contention --type-filter (w/ spinlock)"
154 perf lock contention -i ${perfdata} -Y spinlock -q 2> ${result}
161 if ! perf lock con -b true > /dev/null 2>&1 ; then
165 perf lock con -a -b -Y spinlock -q -- perf bench sched messaging > /dev/null 2> ${result}
175 echo "Testing perf lock contention --lock-filter (w/ tasklist_lock)"
176 perf lock contention -i ${perfdata} -l -q 2> ${result}
182 perf lock contention -i ${perfdata} -L tasklist_lock -q 2> ${result}
193 if ! perf lock con -b true > /dev/null 2>&1 ; then
197 perf lock con -a -b -L tasklist_lock -q -- perf bench sched messaging > /dev/null 2> ${result}
207 echo "Testing perf lock contention --callstack-filter (w/ unix_stream)"
208 perf lock contention -i ${perfdata} -v -q 2> ${result}
214 perf lock contention -i ${perfdata} -E 1 -S unix_stream -q 2> ${result}
216 echo "[Fail] Recorded result should have a lock from unix_stream:" "$(cat "${result}")"
221 if ! perf lock con -b true > /dev/null 2>&1 ; then
225 perf lock con -a -b -S unix_stream -E 1 -q -- perf bench sched messaging > /dev/null 2> ${result}
227 echo "[Fail] BPF result should have a lock from unix_stream:" "$(cat "${result}")"
235 echo "Testing perf lock contention --callstack-filter with task aggregation"
236 perf lock contention -i ${perfdata} -v -q 2> ${result}
242 perf lock contention -i ${perfdata} -t -E 1 -S unix_stream -q 2> ${result}
249 if ! perf lock con -b true > /dev/null 2>&1 ; then
253 perf lock con -a -b -t -S unix_stream -E 1 -q -- perf bench sched messaging > /dev/null 2> ${result}
262 echo "Testing perf lock contention --cgroup-filter"
264 if ! perf lock con -b true > /dev/null 2>&1 ; then
269 perf lock con -a -b -g -E 1 -F wait_total -q -- perf bench sched messaging > /dev/null 2> ${result}
277 perf lock con -a -b -g -E 1 -G "${cgroup}" -q -- perf bench sched messaging > /dev/null 2> ${result}
288 echo "Testing perf lock contention CSV output"
289 perf lock contention -i ${perfdata} -E 1 -x , --output ${result}
306 if ! perf lock con -b true > /dev/null 2>&1 ; then
311 # the perf lock contention output goes to the stderr
312 perf lock con -a -b -E 1 -x , --output ${result} -- perf bench sched messaging > /dev/null 2>&1