summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.exelib/ustack.stp
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-06-15 11:57:03 -0400
committerDave Brolley <brolley@redhat.com>2009-06-15 11:57:03 -0400
commit148b5d924e05124eae22a27ef670c480de76553a (patch)
tree894d71a8cc22f2c37cc1313154db9a8d1abb8b15 /testsuite/systemtap.exelib/ustack.stp
parentc3a47b9b2c204849646eda60e6fff9ea7625f122 (diff)
parentd438dd9bc070216016e02f4958fe9dea571712c9 (diff)
downloadsystemtap-steved-148b5d924e05124eae22a27ef670c480de76553a.tar.gz
systemtap-steved-148b5d924e05124eae22a27ef670c480de76553a.tar.xz
systemtap-steved-148b5d924e05124eae22a27ef670c480de76553a.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
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++;
+ }
+}