diff options
author | hiramatu <hiramatu> | 2007-09-12 16:48:00 +0000 |
---|---|---|
committer | hiramatu <hiramatu> | 2007-09-12 16:48:00 +0000 |
commit | cf9be511f05d0b310b2c4ce4c050d3707be9e65a (patch) | |
tree | 66ca48f389da6fd0ad2ce64341b8ca0d5a62fb09 /testsuite/systemtap.context/backtrace.stp | |
parent | 737f98f027f838e976afae7b3586e1806e4ed26e (diff) | |
download | systemtap-steved-cf9be511f05d0b310b2c4ce4c050d3707be9e65a.tar.gz systemtap-steved-cf9be511f05d0b310b2c4ce4c050d3707be9e65a.tar.xz systemtap-steved-cf9be511f05d0b310b2c4ce4c050d3707be9e65a.zip |
2007-09-12 Masami Hiramatsu <mhiramat@redhat.com>
PR 4633
* systemtap.context/backtrace.stp: Add testcases for the return
probe and the profile probe.
* systemtap.context/backtrace.tcl: Ditto.
* /systemtap.context/systemtap_test_module2.c: Ditto.
Diffstat (limited to 'testsuite/systemtap.context/backtrace.stp')
-rw-r--r-- | testsuite/systemtap.context/backtrace.stp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/testsuite/systemtap.context/backtrace.stp b/testsuite/systemtap.context/backtrace.stp index 8f02c174..73781371 100644 --- a/testsuite/systemtap.context/backtrace.stp +++ b/testsuite/systemtap.context/backtrace.stp @@ -1,9 +1,9 @@ -function print_all_trace_info() { +function print_all_trace_info(point:string) { printf("backtrace from %s:\n", pp()) print_backtrace() print("--------\n") bt = backtrace() - printf("the stack is %s\n", bt) + printf("the %s stack is %s\n", point, bt) print("--------\n") print_stack(bt); print("--------\n") @@ -17,8 +17,19 @@ probe end { print_backtrace() } -probe module("systemtap_test_module2").function("yyy_func3") { - print_all_trace_info() +global flag = 0 +probe module("systemtap_test_module2").function("yyy_func3").call { + print_all_trace_info("call") + flag ++ +} +probe module("systemtap_test_module2").function("yyy_func4").return { + print_all_trace_info("return") + flag ++ +} +probe timer.profile { + if (cpu() == 0 && flag == 2 && probemod() != "systemtap_test_module2") { + print_all_trace_info("profile") + flag ++ + } } - |