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

global foo, bar, baz

probe begin
{
	x = 10
	foo["hello"] = 25
	foo["hello"]++
	foo["hello"] = 0;
	++foo["hello"]
	x = foo["hello"]
	foo["yo"] *= bar[x, foo["hello"], "goodbye"]++;
	bar[0, 0, ""] = 0

	foreach ([m, o, p] in bar) baz[m] = p

	# empty string treatment
	baz[10] = ""
	q = baz[223] 

	print("hello from systemtap\n")
	print(q)
}