blob: 769335f24fe086bb25e7f6ef2d4d52c8b61ca541 (
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", "kernel<linux/sched.h>")->tgid)
println(@cast(0, "timeval", "<sys/time.h>")->tv_sec)
}
|