summaryrefslogtreecommitdiffstats
path: root/testsuite/transok/eight.stp
blob: 9198536e12587916c110fd5391e4cfa68d1da2c1 (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
#! stap -p3

global foo
global baz
global zoo

function bar()
{
	return foo["hello"]+(zoo++)
}

probe begin
{
	foo["hello"] = 10
	foreach (a in foo) 
	{
		bar()
	}

	baz[1,"hello",a] = "chicken"
	baz[1,"goodbye",a] = "supreme"

	foreach ([x,y,z] in baz)
	{
		log(baz[x,y,z] . y)
	}

	log("hello from systemtap")
}