Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # SPDX-License-Identifier: GPL-2.0
0003 # description: event trigger - test multiple actions on hist trigger
0004 # requires: set_event synthetic_events events/sched/sched_process_fork/hist
0005 
0006 fail() { #msg
0007     echo $1
0008     exit_fail
0009 }
0010 
0011 echo "Test multiple actions on hist trigger"
0012 echo 'wakeup_latency u64 lat; pid_t pid' >> synthetic_events
0013 TRIGGER1=events/sched/sched_wakeup/trigger
0014 TRIGGER2=events/sched/sched_switch/trigger
0015 
0016 echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' > $TRIGGER1
0017 echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 if next_comm=="cyclictest"' >> $TRIGGER2
0018 echo 'hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,next_pid) if next_comm=="cyclictest"' >> $TRIGGER2
0019 echo 'hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,prev_pid) if next_comm=="cyclictest"' >> $TRIGGER2
0020 echo 'hist:keys=next_pid if next_comm=="cyclictest"' >> $TRIGGER2
0021 
0022 exit 0