blob: bf4e0af36e0d1e230aed316aa389458161adf583 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#! stap -p4
/*
* equal.stp
*
* Check the systemtap make sure that equality tests work
* install it, and get some output.
*/
global count
global count2
probe begin
{
log("systemtap starting probe")
}
probe kernel.function("schedule")
{
++count;
++count2;
}
probe end
{
log("systemtap ending probe")
log("count = " . string(count));
log("count2 = " . string(count));
if ( count == count2) {
if ( (count-1) == count2 ) {
log("systemtap test failure");
} else {
log("systemtap test success");
}
} else {
log("systemtap test failure");
}
}
|