File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
tools/testing/selftests/ftrace/test.d/trigger/inter-event Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # description: event trigger - test multiple actions on hist trigger
3
+
4
+
5
+ do_reset () {
6
+ reset_trigger
7
+ echo > set_event
8
+ clear_trace
9
+ }
10
+
11
+ fail () { # msg
12
+ do_reset
13
+ echo $1
14
+ exit_fail
15
+ }
16
+
17
+ if [ ! -f set_event ]; then
18
+ echo " event tracing is not supported"
19
+ exit_unsupported
20
+ fi
21
+
22
+ if [ ! -f synthetic_events ]; then
23
+ echo " synthetic event is not supported"
24
+ exit_unsupported
25
+ fi
26
+
27
+ clear_synthetic_events
28
+ reset_tracer
29
+ do_reset
30
+
31
+ echo " Test multiple actions on hist trigger"
32
+ echo ' wakeup_latency u64 lat; pid_t pid' >> synthetic_events
33
+ TRIGGER1=events/sched/sched_wakeup/trigger
34
+ TRIGGER2=events/sched/sched_switch/trigger
35
+
36
+ echo ' hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' > $TRIGGER1
37
+ echo ' hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 if next_comm=="cyclictest"' >> $TRIGGER2
38
+ echo ' hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,next_pid) if next_comm=="cyclictest"' >> $TRIGGER2
39
+ echo ' hist:keys=next_pid:onmatch(sched.sched_wakeup).wakeup_latency(sched.sched_switch.$wakeup_lat,prev_pid) if next_comm=="cyclictest"' >> $TRIGGER2
40
+ echo ' hist:keys=next_pid if next_comm=="cyclictest"' >> $TRIGGER2
41
+
42
+ do_reset
43
+
44
+ exit 0
You can’t perform that action at this time.
0 commit comments