diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-06-12 22:37:11 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-06-12 22:45:48 +0200 |
commit | 6a7dc7d9c3df7d5d722f0702a0a0c8d55591006e (patch) | |
tree | af60884dfc31a84e4dc32b7379f2e5c72ed43656 /testsuite/systemtap.exelib/ustack.stp | |
parent | 8fb430a7eeb394d759fe792198d28aeab348f048 (diff) | |
download | systemtap-steved-6a7dc7d9c3df7d5d722f0702a0a0c8d55591006e.tar.gz systemtap-steved-6a7dc7d9c3df7d5d722f0702a0a0c8d55591006e.tar.xz systemtap-steved-6a7dc7d9c3df7d5d722f0702a0a0c8d55591006e.zip |
Add exelib uprobes test framework.
Tests uprobes placed in executables and shared libraries on different
arches (32-on-64 currently disabled), gcc/g++, optimizations (currently
disabled), prelinked libs (currently disabled), seperate libs/exe debuginfo
and pie executables.
* testsuite/systemtap.base/uprobes_exe.c: Moved to...
* testsuite/systemtap.exelib/uprobes_exe.c: From systemtap.base.
* testsuite/systemtap.base/uprobes_lib.c: Moved to...
* testsuite/systemtap.exelib/uprobes_lib.c: From systemtap.base.
* testsuite/systemtap.base/uprobes_lib.exp: Rewritten as...
* testsuite/systemtap.exelib/lib.tcl: From uprobes_lib.exp.
* testsuite/systemtap.base/uprobes_lib.stp: Rewritten as...
* testsuite/systemtap.exelib/lib.stp: From uprobes_lib.stp.
* testsuite/systemtap.base/uprobes_uname.exp: Rewritten as...
* testsuite/systemtap.exelib/uname.tcl: From uprobes_uname.exp.
* testsuite/systemtap.base/uprobes_uname.stp: Rewritten as...
* testsuite/systemtap.exelib/uname.stp: From uprobes_uname.stp.
* testsuite/systemtap.base/uprobes_ustack.exp: Rewritten as...
* testsuite/systemtap.exelib/ustack.tcl: From uprobes_ustack.exp.
* testsuite/systemtap.base/uprobes_ustack.stp: Rewritten as...
* testsuite/systemtap.exelib/ustack.stp: From uprobes_ustack.stp.
* testsuite/systemtap.exelib/exelib.exp: New exelib uprobes framework.
* testsuite/systemtap.exelib/cleanup.tcl: New file.
Diffstat (limited to 'testsuite/systemtap.exelib/ustack.stp')
-rw-r--r-- | testsuite/systemtap.exelib/ustack.stp | 36 |
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++; + } +} |