diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-09-13 22:22:05 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-09-13 22:22:05 +0200 |
commit | 1b504c3f7901ea851cd891b1fea2295736606884 (patch) | |
tree | 5611fbc48e44de5604e7c2599e073ad55e3476b0 /testsuite/systemtap.exelib/libmarkunamestack.stp | |
parent | 6b66b9f7f81a45d8ecce987dc4436efc1b94fad4 (diff) | |
download | systemtap-steved-1b504c3f7901ea851cd891b1fea2295736606884.tar.gz systemtap-steved-1b504c3f7901ea851cd891b1fea2295736606884.tar.xz systemtap-steved-1b504c3f7901ea851cd891b1fea2295736606884.zip |
Replace small exelib.exp testcases with one jumbo testcase.
Merge lib, mark, uname and ustack stp and tcl scripts into one large
libmarkunamestack stp and tcl script. But keep the individual tests
in case the large test fails and one wants to debug the individual steps.
Takes test time for exelib.exp down from 700 seconds to 200 seconds.
* testsuite/systemtap.exelib/libmarkunamestack.stp: New large stp script.
* testsuite/systemtap.exelib/libmarkunamestack.tcl: New large tcl script.
* testsuite/systemtap.exelib/exelib.exp: Use libmarkunamestack.
Diffstat (limited to 'testsuite/systemtap.exelib/libmarkunamestack.stp')
-rw-r--r-- | testsuite/systemtap.exelib/libmarkunamestack.stp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/testsuite/systemtap.exelib/libmarkunamestack.stp b/testsuite/systemtap.exelib/libmarkunamestack.stp new file mode 100644 index 00000000..0efbae0e --- /dev/null +++ b/testsuite/systemtap.exelib/libmarkunamestack.stp @@ -0,0 +1,72 @@ +// Jumbo stp script +// Arguments: @1 uprobes_exe, @2 libuprobes_lib.so + +# lib +probe process(@1).function("main") { + printf("main\n"); +} + +probe process(@1).function("main_func") { + printf("main_func\n"); +} + +probe process(@2).function("lib_main") { + printf("lib_main\n"); +} + +probe process(@2).function("lib_func") { + printf("lib_func\n"); +} + +#mark +probe process(@1).mark("main_count") { + printf("main_count: %d\n", $arg1); +} + +probe process(@2).mark("func_count") { + printf("func_count: %d\n", $arg1); +} + +#uname +probe process(@1).function("*") { + printf("exe: %s=%s\n",probefunc(), usymname(uaddr())); +} + +probe process(@2).function("*") { + printf("lib: %s=%s\n",probefunc(), usymname(uaddr())); +} + +# ustack +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++; + } +} |