summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.exelib/ustack.stp
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-06-16 12:22:32 -0500
committerDavid Smith <dsmith@redhat.com>2009-06-16 12:22:32 -0500
commitbdbb4549b459294ed9bddb819e5602fb894313f7 (patch)
tree9d242348f8e2776c0d4841d0586d3b9b8d34ef7c /testsuite/systemtap.exelib/ustack.stp
parentd05b7a1c363c30c7fcd9d163f457c1ed80d28f19 (diff)
parent96b190d404d24eb7349adae6e2d57eb5c9f6c26a (diff)
downloadsystemtap-steved-bdbb4549b459294ed9bddb819e5602fb894313f7.tar.gz
systemtap-steved-bdbb4549b459294ed9bddb819e5602fb894313f7.tar.xz
systemtap-steved-bdbb4549b459294ed9bddb819e5602fb894313f7.zip
Merge commit 'origin/master' into pr7043
Conflicts: runtime/transport/transport.c
Diffstat (limited to 'testsuite/systemtap.exelib/ustack.stp')
-rw-r--r--testsuite/systemtap.exelib/ustack.stp36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/systemtap.exelib/ustack.stp b/testsuite/systemtap.exelib/ustack.stp
new file mode 100644
index 00000000..314620d8
--- /dev/null
+++ b/testsuite/systemtap.exelib/ustack.stp
@@ -0,0 +1,36 @@
+// Prints backtrace from lib through exe twice using diffent ustack functions.
+// Arguments: @1 uprobes_exe, @2 libuprobes_lib.so
+
+global hits = 0;
+
+probe process(@1).function("main_func")
+{
+ if (hits == 0)
+ {
+ log("print_ubacktrace exe 0");
+ print_ubacktrace();
+ hits++;
+ }
+ else if (hits == 1)
+ {
+ log("print_ustack exe 1");
+ print_ustack(ubacktrace());
+ hits++;
+ }
+}
+
+probe process(@2).function("lib_func")
+{
+ if (hits == 2)
+ {
+ log("print_ubacktrace lib 2");
+ print_ubacktrace();
+ hits++;
+ }
+ else if (hits == 3)
+ {
+ log("print_ustack lib 3");
+ print_ustack(ubacktrace());
+ hits++;
+ }
+}