summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok/context_test.stp
diff options
context:
space:
mode:
authorfche <fche>2005-09-05 22:00:43 +0000
committerfche <fche>2005-09-05 22:00:43 +0000
commitcc9ee6059e4d3fb51c0695a8a57f75eb988a1786 (patch)
tree7ab8cf3bede7e9200c3290a9def709f9ae16b4bd /testsuite/buildok/context_test.stp
parentf86db5a776ed429e0df0e3d871c5692f86b0f4be (diff)
downloadsystemtap-steved-cc9ee6059e4d3fb51c0695a8a57f75eb988a1786.tar.gz
systemtap-steved-cc9ee6059e4d3fb51c0695a8a57f75eb988a1786.tar.xz
systemtap-steved-cc9ee6059e4d3fb51c0695a8a57f75eb988a1786.zip
2005-09-05 Frank Ch. Eigler <fche@elastic.org>
PR 1172. * staptree.h, staptree.cxx: Make all ::print*(), operator<< functions take const staptree objects. (literal_string::print): \-prefix double-quotes. * translate.cxx (emit_common_header): Add context probe_point field. Switch to atomic_t busy flags. (emit_module_exit): Use atomic operations for busy flag. (visit_*): Use lex_cast_qstring for last_stmt strings. * tapsets.cxx (lex_cast_quoted): \-prefix double-quotes too. (*::emit_probe_entries): Populate probe_point. Use atomic operations for busy flag. * tapset/context.stp (pp): New function. * stapfuncs.5.in: Document it. * testsuite/buildok/context_test.stp: Test it.
Diffstat (limited to 'testsuite/buildok/context_test.stp')
-rwxr-xr-xtestsuite/buildok/context_test.stp30
1 files changed, 11 insertions, 19 deletions
diff --git a/testsuite/buildok/context_test.stp b/testsuite/buildok/context_test.stp
index 9059c04c..c85bce67 100755
--- a/testsuite/buildok/context_test.stp
+++ b/testsuite/buildok/context_test.stp
@@ -1,7 +1,6 @@
#! stap -p4
-probe kernel.function("uptime_read_proc") {
- print("NOW IN UPTIME\n")
+function print_stuff () {
print_regs()
print_backtrace()
bt = backtrace()
@@ -9,33 +8,26 @@ probe kernel.function("uptime_read_proc") {
print("\n\n")
print_stack(bt)
print("\n\n")
- log("name is " . execname())
+ log("execname is \"" . execname() . "\"")
log("pid is " . string(pid()))
- log("parentname is " . pexecname())
+ log("pexecname is \"" . pexecname() . "\"")
log("ppid is " . string(ppid()))
log("uid is " . string(uid()))
log("euid is " . string(euid()))
log("gid is " . string(gid()))
log("egid is " . string(egid()))
+ log("pp is '" . pp() . "'")
+}
+
+probe kernel.function("uptime_read_proc") {
+ print("NOW IN UPTIME\n")
+ print_stuff ()
}
probe kernel.function("uptime_read_proc").return {
print("DONE WITH UPTIME\n")
- print_regs()
- print_backtrace()
- bt = backtrace()
- print("the stack is " . bt)
- print("\n\n")
- print_stack(bt)
- print("\n\n")
- log("name is " . execname())
- log("pid is " . string(pid()))
- log("parentname is " . pexecname())
- log("ppid is " . string(ppid()))
- log("uid is " . string(uid()))
- log("euid is " . string(euid()))
- log("gid is " . string(gid()))
- log("egid is " . string(egid()))
+ print_stuff ()
+ exit ()
}
probe begin {