[DTrace-devel] [PATCH v2 13/23] Revert "test: Have manyprobes clean up uprobes"
Nick Alcock
nick.alcock at oracle.com
Mon Nov 27 16:47:19 UTC 2023
This reverts commit 8dedee6fc6ef58c3818a32d84d2acc4bf87b1dce, and
also drops the pre-existing ugly echo kludge.
We have proper cleanup now.
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>
---
test/unittest/usdt/tst.manyprobes.sh | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/test/unittest/usdt/tst.manyprobes.sh b/test/unittest/usdt/tst.manyprobes.sh
index 9acf251f707e..dd97250e5d8a 100755
--- a/test/unittest/usdt/tst.manyprobes.sh
+++ b/test/unittest/usdt/tst.manyprobes.sh
@@ -60,12 +60,7 @@ fi
script()
{
- $dtrace -o D.output -c ./test -qs /dev/stdin <<EOF
- BEGIN
- {
- /* Dump pid for the clean-up hack we use. */
- printf("pid is %d\n", \$target);
- }
+ $dtrace -c ./test -qs /dev/stdin <<EOF
manyprobes\$target:::test1, manyprobes\$target:::test750, manyprobes\$target:::test1999
{
printf("%s:%s:%s\n", probemod, probefunc, probename);
@@ -76,17 +71,4 @@ EOF
script
status=$?
-# D.output has the pid we need for the clean-up hack. Display the output minus
-# that pid information for checking with the .r results file. Once uprobe cleanup
-# has been automated, the pid info and D.output will not be needed.
-grep -v "pid is " D.output
-
-# Here is the clean-up hack for uprobe_events until dtprobed does clean up.
-# Find the events for the specified pid and eliminate them.
-pid=`awk '/pid is / {print $3}' D.output`
-uprobes=/sys/kernel/debug/tracing/uprobe_events
-for x in `awk '/^p:dt_pid\/.* \/proc\/'$pid'\/map_files\// { sub("^p:", "-:"); print $1 }' $uprobes`; do
- echo $x >> $uprobes
-done
-
exit $status
--
2.42.0.271.g85384428f1
More information about the DTrace-devel
mailing list