Debian Codegraph @

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

raw
1 global more_addr = 0;
2
3 function foo(name)
4 {
5 if (more_addr == 0)
6 {
7 log("systemtap starting probe");
8 more_addr = @var("[email protected]", @1);
9 }
10 else
11 {
12 log("systemtap ending probe");
13 name = substr(name, 0, 4);
14 correct = @defined(@var("no_such_var_really_not", @1)) ? "no" : "yes";
15 diff = more_addr - @var("[email protected]", @1);
16 printf("%s:%s:%d\n", name, correct, diff);
17 exit();
18 }
19 }
20
21 probe process.mark("pass*")
22 {
23 foo($$name)
24 }