Debian Codegraph @

testsuite/systemtap.exelib/ustack.stp

raw
1 // Prints backtrace from lib through exe twice using diffent ustack functions.
2 // Arguments: @1 uprobes_exe, @2 libuprobes_lib.so
3
4 global hits = 0;
5
6 probe process(@1).function("main_func")
7 {
8 if (hits == 0)
9 {
10 log("print_ubacktrace exe 0");
11 print_ubacktrace();
12 hits++;
13 }
14 else if (hits == 1)
15 {
16 log("print_usyms exe 1");
17 print_usyms(ubacktrace());
18 hits++;
19 }
20 }
21
22 probe process(@2).function("lib_func")
23 {
24 if (hits == 2)
25 {
26 log("print_ubacktrace lib 2");
27 print_ubacktrace();
28 hits++;
29 }
30 else if (hits == 3)
31 {
32 log("print_usyms lib 3");
33 print_usyms(ubacktrace());
34 hits++;
35 }
36 }