doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/procfs_bpf.stp
raw| 1 | global saved_value |
| 2 | |
| 3 | probe procfs.read { |
| 4 | $value = saved_value |
| 5 | } |
| 6 | |
| 7 | probe procfs("other").write { |
| 8 | saved_value = $value |
| 9 | } |
| 10 | |
| 11 | probe begin { |
| 12 | saved_value = "100\n" |
| 13 | printf("systemtap starting probe\n") |
| 14 | } |
| 15 | |
| 16 | probe end { |
| 17 | printf("systemtap ending probe\n") |
| 18 | printf("final value = %s", saved_value) |
| 19 | } |