Lines Matching +full:clock +full:- +full:output +full:- +full:name

3 # SPDX-License-Identifier: GPL-2.0
8 local name=$2
10 local output=$4
25 if [ "${name}" != "${line_name}" ]; then
26 echo "FAILED: wrong name"
35 if [ "${output}" != "${line_output}" ]; then
36 echo "FAILED: wrong output"
54 local name=$2
57 local output=$5
77 if [ "${name}" != "${line_name}" ]; then
78 echo "FAILED: wrong name"
92 if [ "${output}" != "${line_output}" ]; then
93 echo "FAILED: wrong output"
118 line=`perf daemon --config ${config} -x: | head -1`
123 trap - SIGINT SIGTERM
126 perf daemon stop --config ${config}
129 tail --pid=${pid} -f /dev/null
137 perf daemon start --config ${config}
146 state=`perf daemon ping --config ${config} --session ${session} | awk '{ print $1 }'`
149 if [ ${retries} -ge 600 ]; then
164 base=$(mktemp -d /tmp/perf.daemon.base.XXX)
170 [session-size]
171 run = -e cpu-clock -m 1 sleep 10
173 [session-time]
174 run = -e task-clock -m 1 sleep 10
177 sed -i -e "s|BASE|${base}|" ${config}
183 # pid:daemon:base:base/output:base/lock
185 line=`perf daemon --config ${config} -x: | head -1`
186 check_line_first ${line} daemon ${base} ${base}/output ${base}/lock "0"
189 # pid:size:-e cpu-clock:base/size:base/size/output:base/size/control:base/size/ack:0
191 line=`perf daemon --config ${config} -x: | head -2 | tail -1`
192 check_line_other "${line}" size "-e cpu-clock -m 1 sleep 10" ${base}/session-size \
193 ${base}/session-size/output ${base}/session-size/control \
194 ${base}/session-size/ack "0"
197 # pid:time:-e task-clock:base/time:base/time/output:base/time/control:base/time/ack:0
199 line=`perf daemon --config ${config} -x: | head -3 | tail -1`
200 check_line_other "${line}" time "-e task-clock -m 1 sleep 10" ${base}/session-time \
201 ${base}/session-time/output ${base}/session-time/control \
202 ${base}/session-time/ack "0"
207 rm -rf ${base}
208 rm -f ${config}
218 base=$(mktemp -d /tmp/perf.daemon.base.XXX)
225 [session-size]
226 run = -e cpu-clock -m 1 sleep 10
228 [session-time]
229 run = -e task-clock -m 1 sleep 10
232 sed -i -e "s|BASE|${base}|" ${config}
238 # pid:time:-e task-clock:base/time:base/time/output:base/time/control:base/time/ack:0
240 line=`perf daemon --config ${config} -x: | head -3 | tail -1`
241 check_line_other "${line}" time "-e task-clock -m 1 sleep 10" ${base}/session-time \
242 ${base}/session-time/output ${base}/session-time/control ${base}/session-time/ack "0"
252 [session-size]
253 run = -e cpu-clock -m 1 sleep 10
255 [session-time]
256 run = -e cpu-clock -m 1 sleep 10
259 # TEST 1 - change config
261 sed -i -e "s|BASE|${base}|" ${config_new}
265 tail --pid=${pid} -f /dev/null
270 state=`perf daemon ping --config ${config} --session time | awk '{ print $1 }'`
274 # pid:time:-e task-clock:base/time:base/time/output:base/time/control:base/time/ack:0
276 line=`perf daemon --config ${config} -x: | head -3 | tail -1`
277 check_line_other "${line}" time "-e cpu-clock -m 1 sleep 10" ${base}/session-time \
278 ${base}/session-time/output ${base}/session-time/control ${base}/session-time/ack "0"
280 # TEST 2 - empty config
289 sed -i -e "s|BASE|${base}|" ${config_empty}
295 state=`perf daemon ping --config ${config} --session time | awk '{ print $1 }'`
300 state=`perf daemon ping --config ${config} --session size | awk '{ print $1 }'`
304 one=`perf daemon --config ${config} -x: | wc -l`
306 if [ ${one} -ne "1" ]; then
307 echo "FAILED: wrong list output"
311 # TEST 3 - config again
318 state=`perf daemon ping --config ${config} --session size | awk '{ print $1 }'`
324 state=`perf daemon ping --config ${config} --session time | awk '{ print $1 }'`
330 rm -rf ${base}
331 rm -f ${config}
332 rm -f ${config_new}
333 rm -f ${config_empty}
343 base=$(mktemp -d /tmp/perf.daemon.base.XXX)
350 [session-size]
351 run = -e cpu-clock -m 1 sleep 10
353 [session-time]
354 run = -e task-clock -m 1 sleep 10
357 sed -i -e "s|BASE|${base}|" ${config}
363 pid_size=`perf daemon --config ${config} -x: | head -2 | tail -1 |
366 pid_time=`perf daemon --config ${config} -x: | head -3 | tail -1 |
370 if [ ! -d "/proc/${pid_size}" ]; then
374 if [ ! -d "/proc/${pid_time}" ]; then
382 if [ -d "/proc/${pid_size}" ]; then
386 if [ -d "/proc/${pid_time}" ]; then
390 rm -rf ${base}
391 rm -f ${config}
401 base=$(mktemp -d /tmp/perf.daemon.base.XXX)
408 [session-test]
409 run = -e cpu-clock --switch-output -m 1 sleep 10
412 sed -i -e "s|BASE|${base}|" ${config}
423 while [ ${retries} -lt 600 ] && [ ${success} -eq 0 ]; do
425 files=`ls ${base}/session-test/*perf.data* 2> /dev/null | wc -l`
426 if [ ${signals} -eq 0 ]; then
427 perf daemon signal --config ${config} --session test
429 elif [ ${signals} -eq 1 ] && [ $files -ge 1 ]; then
430 perf daemon signal --config ${config}
432 elif [ ${signals} -eq 2 ] && [ $files -ge 2 ]; then
435 elif [ ${signals} -eq 3 ] && [ $files -ge 3 ]; then
440 if [ ${success} -eq 0 ]; then
445 rm -rf ${base}
446 rm -f ${config}
456 base=$(mktemp -d /tmp/perf.daemon.base.XXX)
463 [session-size]
464 run = -e cpu-clock -m 1 sleep 10
466 [session-time]
467 run = -e task-clock -m 1 sleep 10
470 sed -i -e "s|BASE|${base}|" ${config}
475 size=`perf daemon ping --config ${config} --session size | awk '{ print $1 }'`
476 type=`perf daemon ping --config ${config} --session time | awk '{ print $1 }'`
486 rm -rf ${base}
487 rm -f ${config}
497 base=$(mktemp -d /tmp/perf.daemon.base.XXX)
504 [session-size]
505 run = -e cpu-clock -m 1 sleep 10
508 sed -i -e "s|BASE|${base}|" ${config}
514 failed=`perf daemon start --config ${config} 2>&1 | awk '{ print $1 }'`
525 rm -rf ${base}
526 rm -f ${config}