diff options
author | William Cohen <wcohen@redhat.com> | 2008-07-02 14:11:37 -0400 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2008-07-02 14:11:37 -0400 |
commit | 92fa0578ee7cc6118487b386d9b85d8966e2771b (patch) | |
tree | 93b1105b880d1b8d43d2df5ff27e25211b724360 /testsuite/systemtap.examples/para-callgraph.stp | |
parent | b77e6d1fc44f553e8d3ee7ec3b7e6076ad86fed6 (diff) | |
download | systemtap-steved-92fa0578ee7cc6118487b386d9b85d8966e2771b.tar.gz systemtap-steved-92fa0578ee7cc6118487b386d9b85d8966e2771b.tar.xz systemtap-steved-92fa0578ee7cc6118487b386d9b85d8966e2771b.zip |
Add para-callgraph.stp and para-callgraph.meta.
Diffstat (limited to 'testsuite/systemtap.examples/para-callgraph.stp')
-rw-r--r-- | testsuite/systemtap.examples/para-callgraph.stp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/systemtap.examples/para-callgraph.stp b/testsuite/systemtap.examples/para-callgraph.stp new file mode 100644 index 00000000..1afb8837 --- /dev/null +++ b/testsuite/systemtap.examples/para-callgraph.stp @@ -0,0 +1,20 @@ +function trace(entry_p) { + if(tid() in trace) + printf("%s%s%s\n",thread_indent(entry_p), + (entry_p>0?"->":"<-"), + probefunc()) +} + +global trace +probe kernel.function(@1).call { + if (execname() == "stapio") next # skip our own helper process + trace[tid()] = 1 + trace(1) +} +probe kernel.function(@1).return { + trace(-1) + delete trace[tid()] +} + +probe kernel.function(@2).call { trace(1) } +probe kernel.function(@2).return { trace(-1) } |