Debian Codegraph @

testsuite/semok/pretty.stp

raw
1 #! stap -p2
2
3
4 # NB: Most of these can't go beyond pass-2, because systemtap_session and
5 # task_struct are huge. It's still useful to test that the entire beast can
6 # be expanded though...
7
8
9 global i = 1
10
11
12 # pretty-printing with @cast
13 probe begin {
14 t = task_current()
15 log(@cast(t, "task_struct", "kernel")$)
16 log(@cast(t, "task_struct", "kernel")$$)
17 log(@cast(t, "task_struct", "kernel")->fs$)
18 log(@cast(t, "task_struct", "kernel")->fs$$)
19 log(@cast(t, "task_struct", "kernel")->comm$)
20 log(@cast(t, "task_struct", "kernel")->comm$$)
21 log(@cast(t, "task_struct", "kernel")->comm[0]$)
22 log(@cast(t, "task_struct", "kernel")->comm[0]$$)
23 log(@cast(t, "task_struct", "kernel")->comm[i]$)
24 log(@cast(t, "task_struct", "kernel")->comm[i]$$)
25 }
26
27 # pretty-printing in dwarf kernel context
28 probe kernel.function("schedule_tail")
29 %( CONFIG_TRACEPOINTS == "y" %?
30 # pretty-printing in tracepoints
31 , kernel.trace("sched_switch")
32 %)
33 {
34 log($$vars$)
35 log($$vars$$)
36 log($$parms$)
37 log($$parms$$)
38
39 log($prev$)
40 log($prev$$)
41 log($prev->fs$)
42 log($prev->fs$$)
43 log($prev->comm$)
44 log($prev->comm$$)
45 log($prev->comm[0]$)
46 log($prev->comm[0]$$)
47 log($prev->comm[i]$)
48 log($prev->comm[i]$$)
49 }