doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/at_var_tracepoint.stp
raw| 1 | # Test global vars are usable in the kernel tracepoint probes. |
| 2 | |
| 3 | global sys_tz_str |
| 4 | |
| 5 | probe begin |
| 6 | { |
| 7 | log("systemtap starting probe") |
| 8 | } |
| 9 | |
| 10 | probe kernel.trace("sched_switch") |
| 11 | { |
| 12 | sys_tz_str = @var("[email protected]", "kernel")$$ |
| 13 | exit() |
| 14 | } |
| 15 | |
| 16 | probe end |
| 17 | { |
| 18 | log("systemtap ending probe") |
| 19 | printf("sys_tz = %s\n", sys_tz_str) |
| 20 | } |