summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok/fourteen.stp
blob: 2a7b60010d97fce5d5ed36405a61c75be6a300ca (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
#! stap -p4

# NB: beyond just checking for timer compilability, this test also plays
# with duplicate probe elimination logic.  See also fourteen+.stp

global i, j
probe timer.jiffies(100) { i++ }
probe timer.jiffies(100).randomize(100) { j++ }
probe timer.s(100) { i++ }
probe timer.s(100).randomize(100) { j++ }
probe timer.sec(100) { i++ }
probe timer.sec(100).randomize(100) { j++ }
probe timer.ms(100) { i++ }
probe timer.ms(100).randomize(100) { j++ }
probe timer.msec(100) { i++ }
probe timer.msec(100).randomize(100) { j++ }
probe timer.us(100) { i++ }
probe timer.us(100).randomize(100) { j++ }
probe timer.usec(100) { i++ }
probe timer.usec(100).randomize(100) { j++ }
probe timer.ns(100000) { i++ }
probe timer.ns(100000).randomize(100) { j++ }
probe timer.nsec(100000) { i++ }
probe timer.nsec(100000).randomize(100) { j++ }
probe timer.hz(100) { i++ }
probe timer.profile { i++ }
probe end { printf("i=%d j=%d\n", i, j) }