doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/wakeup.stp
raw| 1 | global count; |
| 2 | global testing = 1 |
| 3 | probe kernel.function("__wake_up_common") if (testing) |
| 4 | { |
| 5 | count++ |
| 6 | if (count <= 8) |
| 7 | { system("echo sleeping") } /* NB: these are enqueued */ |
| 8 | else if (count <= 16) |
| 9 | { warn("") } // using empty strings to avoid interjection of other strings in middle |
| 10 | else if (count <= 24) |
| 11 | { error("") } // ditto |
| 12 | else // 25 |
| 13 | { |
| 14 | printf("count: %d\n", count) |
| 15 | testing = 0 |
| 16 | } |
| 17 | } |