@@ -44,7 +44,7 @@ check() {
44
44
test_record ()
45
45
{
46
46
echo " Testing perf lock record and perf lock contention"
47
- perf lock record -o ${perfdata} -- perf bench sched messaging > /dev/null 2>&1
47
+ perf lock record -o ${perfdata} -- perf bench sched messaging -p > /dev/null 2>&1
48
48
# the output goes to the stderr and we expect only 1 output (-E 1)
49
49
perf lock contention -i ${perfdata} -E 1 -q 2> ${result}
50
50
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
@@ -64,7 +64,7 @@ test_bpf()
64
64
fi
65
65
66
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}
67
+ perf lock con -a -b -E 1 -q -- perf bench sched messaging -p > /dev/null 2> ${result}
68
68
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
69
69
echo " [Fail] BPF result count is not 1:" " $( cat " ${result} " | wc -l) "
70
70
err=1
@@ -75,7 +75,7 @@ test_bpf()
75
75
test_record_concurrent ()
76
76
{
77
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 | \
78
+ perf lock record -o- -- perf bench sched messaging -p 2> /dev/null | \
79
79
perf lock contention -i- -E 1 -q 2> ${result}
80
80
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
81
81
echo " [Fail] Recorded result count is not 1:" " $( cat " ${result} " | wc -l) "
@@ -99,7 +99,7 @@ test_aggr_task()
99
99
fi
100
100
101
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}
102
+ perf lock con -a -b -t -E 1 -q -- perf bench sched messaging -p > /dev/null 2> ${result}
103
103
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
104
104
echo " [Fail] BPF result count is not 1:" " $( cat " ${result} " | wc -l) "
105
105
err=1
@@ -122,7 +122,7 @@ test_aggr_addr()
122
122
fi
123
123
124
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}
125
+ perf lock con -a -b -l -E 1 -q -- perf bench sched messaging -p > /dev/null 2> ${result}
126
126
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
127
127
echo " [Fail] BPF result count is not 1:" " $( cat " ${result} " | wc -l) "
128
128
err=1
@@ -140,7 +140,7 @@ test_aggr_cgroup()
140
140
fi
141
141
142
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}
143
+ perf lock con -a -b -g -E 1 -q -- perf bench sched messaging -p > /dev/null 2> ${result}
144
144
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
145
145
echo " [Fail] BPF result count is not 1:" " $( cat " ${result} " | wc -l) "
146
146
err=1
@@ -162,7 +162,7 @@ test_type_filter()
162
162
return
163
163
fi
164
164
165
- perf lock con -a -b -Y spinlock -q -- perf bench sched messaging > /dev/null 2> ${result}
165
+ perf lock con -a -b -Y spinlock -q -- perf bench sched messaging -p > /dev/null 2> ${result}
166
166
if [ " $( grep -c -v spinlock " ${result} " ) " != " 0" ]; then
167
167
echo " [Fail] BPF result should not have non-spinlocks:" " $( cat " ${result} " ) "
168
168
err=1
@@ -194,7 +194,7 @@ test_lock_filter()
194
194
return
195
195
fi
196
196
197
- perf lock con -a -b -L tasklist_lock -q -- perf bench sched messaging > /dev/null 2> ${result}
197
+ perf lock con -a -b -L tasklist_lock -q -- perf bench sched messaging -p > /dev/null 2> ${result}
198
198
if [ " $( grep -c -v " ${test_lock_filter_type} " " ${result} " ) " != " 0" ]; then
199
199
echo " [Fail] BPF result should not have non-${test_lock_filter_type} locks:" " $( cat " ${result} " ) "
200
200
err=1
@@ -222,7 +222,7 @@ test_stack_filter()
222
222
return
223
223
fi
224
224
225
- perf lock con -a -b -S unix_stream -E 1 -q -- perf bench sched messaging > /dev/null 2> ${result}
225
+ perf lock con -a -b -S unix_stream -E 1 -q -- perf bench sched messaging -p > /dev/null 2> ${result}
226
226
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
227
227
echo " [Fail] BPF result should have a lock from unix_stream:" " $( cat " ${result} " ) "
228
228
err=1
@@ -250,7 +250,7 @@ test_aggr_task_stack_filter()
250
250
return
251
251
fi
252
252
253
- perf lock con -a -b -t -S unix_stream -E 1 -q -- perf bench sched messaging > /dev/null 2> ${result}
253
+ perf lock con -a -b -t -S unix_stream -E 1 -q -- perf bench sched messaging -p > /dev/null 2> ${result}
254
254
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
255
255
echo " [Fail] BPF result should have a task from unix_stream:" " $( cat " ${result} " ) "
256
256
err=1
@@ -266,15 +266,15 @@ test_cgroup_filter()
266
266
return
267
267
fi
268
268
269
- perf lock con -a -b -g -E 1 -F wait_total -q -- perf bench sched messaging > /dev/null 2> ${result}
269
+ perf lock con -a -b -g -E 1 -F wait_total -q -- perf bench sched messaging -p > /dev/null 2> ${result}
270
270
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
271
271
echo " [Fail] BPF result should have a cgroup result:" " $( cat " ${result} " ) "
272
272
err=1
273
273
exit
274
274
fi
275
275
276
276
cgroup=$( cat " ${result} " | awk ' { print $3 }' )
277
- perf lock con -a -b -g -E 1 -G " ${cgroup} " -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 -p > /dev/null 2> ${result}
278
278
if [ " $( cat " ${result} " | wc -l) " != " 1" ]; then
279
279
echo " [Fail] BPF result should have a result with cgroup filter:" " $( cat " ${cgroup} " ) "
280
280
err=1
@@ -309,7 +309,7 @@ test_csv_output()
309
309
fi
310
310
311
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
312
+ perf lock con -a -b -E 1 -x , --output ${result} -- perf bench sched messaging -p > /dev/null 2>&1
313
313
output=$( grep -v " ^#" ${result} | tr -d -c , | wc -c)
314
314
if [ " ${header} " != " ${output} " ]; then
315
315
echo " [Fail] BPF result does not match the number of commas: ${header} != ${output} "
0 commit comments