diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-09-15 18:29:45 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-09-15 18:29:45 -0400 |
commit | da23eceb71cc70668ab9dfd80d318b3837703d9d (patch) | |
tree | dcfb85f50cf035213bde1836d2167ceca00c8205 /testsuite/systemtap.exelib/libmarkunamestack.stp | |
parent | 2260f4e32eb4c0b4cc95e4bef8ccdc5dc66261af (diff) | |
parent | 24fcff20ed7a4a9f2b772c572db28ee8df49161f (diff) | |
download | systemtap-steved-da23eceb71cc70668ab9dfd80d318b3837703d9d.tar.gz systemtap-steved-da23eceb71cc70668ab9dfd80d318b3837703d9d.tar.xz systemtap-steved-da23eceb71cc70668ab9dfd80d318b3837703d9d.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
* 'master' of ssh://sources.redhat.com/git/systemtap: (34 commits)
Update the langref copyright notice
Fix some probe examples in the language reference
Remove automatic authorization of servers started by root as trusted signers.
docs: add abnormal termination section to PROCESSING
Remove unneeded header file
Get the module to sign from -p4's stdout
Move --unprivileged support news to the top.
Firther updates to NEWS regarding signing and unprivileged users.
Authorize new certificates created for servers started by root as authorized signers.
2009-09-14 Dave Brolley <brolley@redhat.com>
Allow remaining process.* probes for unprivileged users.
Use the sched_switch tracepoint if available.
PR10608: mark test cases untested once compilation failed
Make check.exp not sleep so much in test_installcheck.
Make tracepoints.exp test more efficient by running as one giant script.
Only test highest optimization for exelib.exp test.
Replace small exelib.exp testcases with one jumbo testcase.
Remove duplicate uprobe_derived_probe code
Add semaphores for use with the forthcoming sdt marker checks.
Add actual pc address to semantic error about inaccessible variables.
...
Conflicts:
tapsets.cxx
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++; + } +} |