doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/kfunct.stp
raw| 1 | /* |
| 2 | * kfunct.stp |
| 3 | * |
| 4 | * Very simple function to test that systemtap can generate a kernel module, |
| 5 | * install it, and get some output. |
| 6 | */ |
| 7 | |
| 8 | global count |
| 9 | |
| 10 | probe begin |
| 11 | { |
| 12 | println("systemtap starting probe") |
| 13 | } |
| 14 | |
| 15 | probe kernel.function("schedule") |
| 16 | { |
| 17 | ++count; |
| 18 | } |
| 19 | |
| 20 | probe end |
| 21 | { |
| 22 | println("systemtap ending probe") |
| 23 | printf("count = %d\n", count) |
| 24 | } |