diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-09-06 10:25:28 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-09-06 10:25:28 -0400 |
commit | cec7293bd301b4737da7abe8d1b70b9689fd3f00 (patch) | |
tree | cc94d4a15bd04357b17971d48b952b84286651f9 | |
parent | 1446b65dbd2d023a54675277f157ab661bc06474 (diff) | |
download | systemtap-steved-cec7293bd301b4737da7abe8d1b70b9689fd3f00.tar.gz systemtap-steved-cec7293bd301b4737da7abe8d1b70b9689fd3f00.tar.xz systemtap-steved-cec7293bd301b4737da7abe8d1b70b9689fd3f00.zip |
PR6445: documentation, mopping up
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 12 | ||||
-rw-r--r-- | runtime/ChangeLog | 7 | ||||
-rw-r--r-- | runtime/staprun/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/systemtap.base/cmd_parse.exp | 48 |
6 files changed, 54 insertions, 28 deletions
@@ -1,3 +1,8 @@ +2008-09-06 Frank Ch. Eigler <fche@elastic.org> + + * tapsets.cxx (utrace_derived_probe ctor): Handle + process.* probe point reverse engineering (pid- and path-less). + 2008-09-05 Stan Cox <scox@redhat.com> * elaborate.cxx (add_global_var_display): Handle scalar statistics. @@ -1,5 +1,17 @@ * What's new +- Target process mode (stap -c CMD or -x PID) now implicitly restricts all + "process.*" probes to the given child process. (It does not effect + kernel.* or other probe types.) The CMD string is now executed directly, + rather than via a /bin/sh -c subshell. + + % stap -e 'probe process.syscall, process.end { + printf("%s %d %s\n", execname(), pid(), pp())}'\ + -c ls + ls 2323 process.syscall + ls 2323 process.syscall + ls 2323 process.end + - Probe listing mode is improved: "-L" lists available script-level variables % stap -L 'syscall.*open*' diff --git a/runtime/ChangeLog b/runtime/ChangeLog index e02c5f0b..8f20ed11 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,10 @@ +2008-09-06 Frank Ch. Eigler <fche@elastic.org> + + PR 6445 + * task_finder.c (stap_start_task_finder): When _stp_target + is set (stap -c or -x mode), restrict initial utrace attach + iteration to target process only. + 2008-09-01 Frank Ch. Eigler <fche@elastic.org> * task_finder.c: Move CONFIG_UTRACE assertion here. diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog index 8b7a116d..21e02e47 100644 --- a/runtime/staprun/ChangeLog +++ b/runtime/staprun/ChangeLog @@ -1,3 +1,8 @@ +2008-09-06 Frank Ch. Eigler <fche@elastic.org> + + * mainloop.c (start_cmd): Rewrite to use wordexp/execvp/ptrace. + (stp_main_loop): Use ptrace detach to resume target process. + 2008-09-05 Frank Ch. Eigler <fche@elastic.org> * staprun.c (run_as): Teach it to exec too. Update callers. diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 82435044..045772a3 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-09-06 Frank Ch. Eigler <fche@elastic.org> + + * systemtap.base/cmd_parse.exp: Adapt to sh-c-less "stap -c" + execution. + 2008-09-05 Stan Cox <scox@redhat.com> * systemtap.base/global_end.stp: Also check scalar statistics. diff --git a/testsuite/systemtap.base/cmd_parse.exp b/testsuite/systemtap.base/cmd_parse.exp index c37d358f..733881a1 100644 --- a/testsuite/systemtap.base/cmd_parse.exp +++ b/testsuite/systemtap.base/cmd_parse.exp @@ -5,76 +5,68 @@ if {![installtest_p]} { return } -# stap -c 'echo "hello world"' -e 'probe begin {}' -spawn stap -c {echo "hello world"} -e {probe begin {}} +spawn stap -c {echo "hello world"} -we {probe begin {}} expect { -timeout 60 "hello world" {pass "cmd_parse1"} timeout {fail "cmd_parse1: unexpected timeout"} eof {fail "cmd_parse1: unexpected EOF"} } -wait +wait;close -# stap -c 'echo "hello "\"world\"' -e 'probe begin {}' -spawn stap -c {echo "hello "\"world\"} -e {probe begin {}} +spawn stap -c {echo "hello "\"world\"} -we {probe begin {}} expect { -timeout 60 "hello \"world\"" {pass "cmd_parse2"} timeout {fail "cmd_parse2: unexpected timeout"} eof {fail "cmd_parse2: unexpected EOF"} } -wait +wait;close -#stap -c '(a="hello world"; echo $a)' -e 'probe begin {}' -spawn stap -c {(a="hello world"; echo $a)} -e {probe begin {}} +spawn stap -c {sh -c '(a="hello world"; echo $a)'} -we {probe begin {}} expect { -timeout 60 "hello world" {pass "cmd_parse3"} timeout {fail "cmd_parse3: unexpected timeout"} eof {fail "cmd_parse3: unexpected EOF"} } -wait +wait;close -#stap -c '(a="hello "\"world\"; echo $a)' -e 'probe begin {}' -spawn stap -c {(a="hello "\"world\"; echo $a)} -e {probe begin {}} +spawn stap -c {sh -c '(a="hello "\"world\"; echo $a)'} -we {probe begin {}} expect { -timeout 60 "hello \"world\"" {pass "cmd_parse4"} timeout {fail "cmd_parse4: unexpected timeout"} eof {fail "cmd_parse4: unexpected EOF"} } -wait +wait;close -#stap -c '(a="hello "world; echo $a)' -e 'probe begin {}' -spawn stap -c {(a="hello "world; echo $a)} -e {probe begin {}} +spawn stap -c {sh -c '(a="hello "world; echo $a)'} -we {probe begin {}} expect { -timeout 60 "hello world" {pass "cmd_parse5"} timeout {fail "cmd_parse5: unexpected timeout"} eof {fail "cmd_parse5: unexpected EOF"} } -wait +wait;close -#stap -c '(((a=42+7)); echo "The answer is $a")' -e 'probe begin {}' -# NB: not ((a=42+7)) - must not assume bash -spawn stap -c {(a=49; echo "The answer is $a")} -e {probe begin {}} +spawn stap -c {bash -c '((a=42+7)); echo "The answer is $a"'} -we {probe begin {}} expect { -timeout 60 "The answer is 49" {pass "cmd_parse6"} timeout {fail "cmd_parse6: unexpected timeout"} eof {fail "cmd_parse6: unexpected EOF"} } -wait +wait;close -#stap -c '(echo "Hello World" 1>&2) > /dev/null' -e 'probe begin {}' -spawn stap -c {(echo "Hello World" 1>&2) > /dev/null} -e {probe begin {}} +spawn stap -c {sh -c '(echo "Hello World" 1>&2) > /dev/null'} -we {probe begin {}} expect { -timeout 60 "Hello World" {pass "cmd_parse7"} timeout {fail "cmd_parse7: unexpected timeout"} eof {fail "cmd_parse7: unexpected EOF"} } -wait +wait;close spawn stap -l {vm.*} expect { @@ -83,7 +75,7 @@ expect { timeout {fail "cmd_parse8: unexpected timeout"} eof {fail "cmd_parse8: unexpected EOF"} } -wait +wait;close spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 1 expect { @@ -92,7 +84,7 @@ expect { timeout { fail "cmd_parse9 timeout" } eof { fail "cmd_parse9 eof" } } -wait +wait;close spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 5 a b c d expect { @@ -101,7 +93,7 @@ expect { timeout { fail "cmd_parse10 timeout" } eof { fail "cmd_parse10 eof" } } -wait +wait;close spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 10 a b c d expect { @@ -110,7 +102,7 @@ expect { timeout { fail "cmd_parse11 timeout" } eof { fail "cmd_parse11 eof" } } -wait +wait;close spawn stap -e {probe begin { printf("%d %s\n", argc, argv[0]) exit() }} expect { @@ -119,7 +111,7 @@ expect { timeout { fail "cmd_parse12 timeout" } eof { fail "cmd_parse12 eof" } } -wait +wait;close spawn stap -L syscall.a* expect { @@ -128,4 +120,4 @@ expect { timeout {fail "cmd_parse13: unexpected timeout"} eof {fail "cmd_parse13: unexpected EOF"} } -wait +wait;close |