summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/cast.stp
blob: d30823cdef67f432ba553d06d442d878da33905f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! stap -p2

probe begin {
    // basic @cast test, with and without specifying kernel
    println(@cast(0, "task_struct")->tgid)
    println(@cast(0, "task_struct", "kernel")->tgid)

    // check module-search paths
    println(@cast(0, "task_struct", "foo:kernel:bar")->tgid)

    // would be nice to test usermode @cast too,
    // but who knows what debuginfo is installed...

    // check modules generated from headers
    println(@cast(0, "task_struct", "kmod<linux/sched.h>")->tgid)
    println(@cast(0, "timeval", "umod<sys/time.h>")->tv_sec)
}