summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/uprobes_ustack.stp
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-04-21 19:44:55 +0200
committerMark Wielaard <mjw@redhat.com>2009-04-21 19:44:55 +0200
commit2f2fa6c0b102537d92a1148d8b00431077d5eb7a (patch)
tree455ed3f7e4a635b6449e6864dcdc1d4126fc955c /testsuite/systemtap.base/uprobes_ustack.stp
parentc45319065d6e3ae91ae833f7afbf0edba6c87d89 (diff)
downloadsystemtap-steved-2f2fa6c0b102537d92a1148d8b00431077d5eb7a.tar.gz
systemtap-steved-2f2fa6c0b102537d92a1148d8b00431077d5eb7a.tar.xz
systemtap-steved-2f2fa6c0b102537d92a1148d8b00431077d5eb7a.zip
Add uprobes_ustack testcase and bug fixlet.
* runtime/stack.c (_stp_stack_print): Use _stp_usymbol_print when tsk given. * testsuite/systemtap.base/uprobes_ustack.exp: New test file. * testsuite/systemtap.base/uprobes_ustack.stp: Likewise.
Diffstat (limited to 'testsuite/systemtap.base/uprobes_ustack.stp')
-rw-r--r--testsuite/systemtap.base/uprobes_ustack.stp35
1 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/uprobes_ustack.stp b/testsuite/systemtap.base/uprobes_ustack.stp
new file mode 100644
index 00000000..6de03b42
--- /dev/null
+++ b/testsuite/systemtap.base/uprobes_ustack.stp
@@ -0,0 +1,35 @@
+// Prints backtrace from lib through exe twice using diffent ustack functions.
+
+global hits = 0;
+
+probe process("uprobes_exe").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("libuprobes_lib.so").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++;
+ }
+}