Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/pp.stp

raw
1 /*
2 * pp.stp
3 *
4 * Test that pp() and pn() output the right thing
5 */
6
7 global hits
8
9 probe begin { println("systemtap starting probe") }
10
11 probe syscall.open, syscall.openat { hits[$1()] <<< 1 }
12
13 probe end
14 {
15 println("systemtap ending probe")
16 foreach (s in hits) {
17 ++count
18 println(s)
19 }
20 if (count)
21 println("systemtap test success");
22 else
23 println("systemtap test failure");
24 }