Debian Codegraph @

testsuite/semok/target_addr.stp

raw
1 #! stap -p2
2
3 // read the address of various task_struct members.
4 // all should roughly be $p + offsetof(foo)
5 probe kernel.function("release_task") {
6 // Linux 5.14 and new changes state to __state
7 if (@defined($p->state))
8 println(& $p->state) // long
9 else
10 println(& $p->__state) // long
11 println(& $p->usage) // atomic_t
12 println(& $p->comm) // comm[TASK_COMM_LEN]
13 println(& $p->comm[1])
14 println(& $p->parent) // task_struct*
15 }