doc/SystemTap_Beginners_Guide/testsuite/systemtap.bpf/bpf_tests/context_vars3.stp
raw| 1 | probe begin { |
| 2 | printf("BEGIN\n") |
| 3 | } |
| 4 | |
| 5 | probe kernel.function("vfs_read") { |
| 6 | if ($file != 0 && $file->f_cred->usage->counter > 0 && $buf != 0) { |
| 7 | filename = kernel_string($file->f_path->dentry->d_name->name) |
| 8 | printf("found %s\n", filename) |
| 9 | exit() |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | probe end { |
| 14 | printf("END PASS\n") |
| 15 | } |