Debian Codegraph @

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

raw
1 global active = 0
2
3 probe process.function("sub")
4 {
5 active = 1
6 }
7
8 probe timer.profile {
9 if (active && pid() == target()) {
10 printf("@var(\"foo\", @1)->bar: %d\n", @var("foo", @1)->bar);
11 printf("@var(\"foo@at_var_timer_profile.c\", @1)->bar: %d\n",
12 @var("foo@at_var_timer_profile.c", @1)->bar);
13 printf("@var(\"foo@at_var_timer_profile.c\", @2)->bar: %d\n",
14 @var("foo@at_var_timer_profile.c", @2)->bar);
15 printf("@var(\"foo\", @1)$: %s\n", @var("foo", @1)$);
16 printf("@var(\"foo\", @1)$$: %s\n", @var("foo", @1)$$);
17 printf("@defined(@var(\"foo\", \"badmodle\")): %s\n",
18 @defined(@var("foo", "badmodule")) ? "YES" : "NO")
19 printf("@defined(@var(\"foo\", @3)): %s\n",
20 @defined(@var("foo", @3)) ? "YES" : "NO")
21 exit()
22 }
23 }