| 1 |
/* |
| 2 |
* equal.stp |
| 3 |
* |
| 4 |
* Simple function to test that equal operation works |
| 5 |
*/ |
| 6 |
|
| 7 |
global count |
| 8 |
global count2 |
| 9 |
|
| 10 |
probe begin { println("systemtap starting probe") } |
| 11 |
|
| 12 |
probe kernel.function("schedule") { ++count; ++count2; } |
| 13 |
|
| 14 |
probe end |
| 15 |
{ |
| 16 |
println("systemtap ending probe") |
| 17 |
printf("count = %d\n", count) |
| 18 |
printf("count2 = %d\n", count) |
| 19 |
if ( count == count2) { |
| 20 |
if ( (count-1) == count2 ) { |
| 21 |
println("systemtap test failure"); |
| 22 |
} else { |
| 23 |
println("systemtap test success"); |
| 24 |
} |
| 25 |
} else { |
| 26 |
println("systemtap test failure"); |
| 27 |
} |
| 28 |
} |