doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/sdt_buildid.stp
raw| 1 | global count |
| 2 | |
| 3 | function trace () { |
| 4 | printf ("Count %d [%d] %s %s\n", count++, pid(), $$name, pp()) |
| 5 | } |
| 6 | |
| 7 | probe process(@1).mark("test_probe_0") { trace() } |
| 8 | %( $# > 1 %? probe process(@2).mark("test_probe_0") { trace() } %) |
| 9 | |
| 10 | probe begin |
| 11 | { |
| 12 | printf ("Count %d\n", count++) |
| 13 | } |
| 14 | |
| 15 | probe timer.s(1) // exit quickly after enough marks fire |
| 16 | { |
| 17 | if (count > 10) exit() |
| 18 | } |
| 19 |