blob: b2435b477b8a367cd114e2b39b4f5ab2c54d6634 (
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
|
// 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 {
// Only print once (after enough hits, or at the begin probe). PR10427
if (hits == 0 || hits == 100)
println("tracepoints OK")
exit()
}
// give hits a use so there's no warning
// when we don't have tracepoints
probe never { hits++ }
|