summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/tracepoints.stp
blob: bdb4d7303e079da553537e4fedd4205f147fff3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// This checks that we can compile and register every tracepoint
// we can find, along with all of their context variables.
global hits
probe all_tracepoints = kernel.trace("*")
{
    if ($$name . $$vars . $$parms == "")
        next

    // Allow it to quit once we hit our hundredth tracepoint
    if (++hits < 100)
        next
}

// If there aren't any tracepoints in the kernel,
// we use "begin" instead to quit right away.
probe all_tracepoints!, begin {
    println("tracepoints OK")
    exit()
}

// give hits a use so there's no warning
// when we don't have tracepoints
probe never { hits++ }