]> sourceware.org Git - systemtap.git/commitdiff
PR6445: documentation, mopping up
authorFrank Ch. Eigler <fche@elastic.org>
Sat, 6 Sep 2008 14:25:28 +0000 (10:25 -0400)
committerFrank Ch. Eigler <fche@elastic.org>
Sat, 6 Sep 2008 14:25:28 +0000 (10:25 -0400)
ChangeLog
NEWS
runtime/ChangeLog
runtime/staprun/ChangeLog
testsuite/ChangeLog
testsuite/systemtap.base/cmd_parse.exp

index 10a72ceff3bcd03e80fab19e062f0687aa27923d..741c4ad0919af4ba0f867879f6f54023bf5062b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/NEWS b/NEWS
index 5036cebbb3b8b01a43801e7906b0b2af7dab5a1c..ab0355937112abe682018e138c951c7908702256 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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*'
index e02c5f0b81cfadd4ff4151d42e24a3c256c5fc1c..8f20ed11fb92b42e07ef53b511ec0201193f3100 100644 (file)
@@ -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.
index 8b7a116d5a78b74c3072960e7e9cbd38dd92c883..21e02e475e726f74a8d1c7c949646584e4499774 100644 (file)
@@ -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.
index 8243504430d3665116cfa271c81f34397d33ac63..045772a32fa5d817eae670d50354f7a922b826f6 100644 (file)
@@ -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.
index c37d358f7daea9bbd7aa309f9f7d7ba86ecedce1..733881a1e349635bb8b7e2193b6009318be1d6ad 100644 (file)
@@ -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
This page took 0.048026 seconds and 5 git commands to generate.