| 1 |
#! stap -p4 |
| 2 |
|
| 3 |
# this tests access to members of a target global variable |
| 4 |
# (PR 1191) |
| 5 |
|
| 6 |
probe kernel.function("pipe_write") |
| 7 |
{ |
| 8 |
%( kernel_v > "3.9" %? |
| 9 |
printf("0x%x\n", $pipefifo_fops->llseek) |
| 10 |
%: |
| 11 |
%( kernel_v >= "2.6.27" %? |
| 12 |
printf("0x%x\n", $write_pipefifo_fops->llseek) |
| 13 |
%: |
| 14 |
printf("0x%x\n", $write_fifo_fops->llseek) |
| 15 |
%) |
| 16 |
%) |
| 17 |
} |
| 18 |
|
| 19 |
# PR10000: We're looking for *some* module function that has a nearby global variable in scope |
| 20 |
# XXX: See PR4096 |
| 21 |
probe module("nfs").function("nfs_create_client") !, |
| 22 |
kernel.function("nfs_create_client") !, |
| 23 |
module("nfs").function("nfs_init_client") !, |
| 24 |
kernel.function("nfs_init_client") !, |
| 25 |
kernel.function("nfs_fsync_dir") |
| 26 |
{ |
| 27 |
println(kernel_string($nfs_program->name)) |
| 28 |
} |
| 29 |
|
| 30 |
probe timer.s(5) { exit() } |