summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.context/backtrace.stp
diff options
context:
space:
mode:
authorhiramatu <hiramatu>2007-09-12 16:48:00 +0000
committerhiramatu <hiramatu>2007-09-12 16:48:00 +0000
commitcf9be511f05d0b310b2c4ce4c050d3707be9e65a (patch)
tree66ca48f389da6fd0ad2ce64341b8ca0d5a62fb09 /testsuite/systemtap.context/backtrace.stp
parent737f98f027f838e976afae7b3586e1806e4ed26e (diff)
downloadsystemtap-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.stp21
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 ++
+ }
}
-