[DTrace-devel] [PATCH] test: use better condidate probe
Kris Van Hees
kris.van.hees at oracle.com
Wed May 1 05:06:49 UTC 2024
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
test/unittest/aggs/tst.stack.d | 17 ++++++++---------
test/unittest/stack/tst.stack.d | 2 +-
test/unittest/stack/tst.stack.r.p | 12 ++++++------
3 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/test/unittest/aggs/tst.stack.d b/test/unittest/aggs/tst.stack.d
index 6c3c530e..c270f5ac 100644
--- a/test/unittest/aggs/tst.stack.d
+++ b/test/unittest/aggs/tst.stack.d
@@ -1,19 +1,18 @@
/*
* Oracle Linux DTrace.
- * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
-/* @@trigger: periodic_output */
/* @@nosort */
#pragma D option quiet
-fbt:vmlinux:hrtimer_nanosleep:entry /pid == $target/ { func(caller); printf("\n"); }
-fbt:vmlinux:hrtimer_nanosleep:entry /pid == $target/ { mod(caller); printf("\n"); }
-fbt:vmlinux:hrtimer_nanosleep:entry /pid == $target/ { sym(caller); printf("\n"); }
-fbt:vmlinux:hrtimer_nanosleep:entry /pid == $target/ { stack(5); }
-fbt:vmlinux:hrtimer_nanosleep:entry /pid == $target/ { @['a', func(caller), mod(caller), sym(caller), stack(5), 4] = sum( 34); }
-fbt:vmlinux:hrtimer_nanosleep:entry /pid == $target/ { @['a', func(caller), mod(caller), sym(caller), stack(5), 4] = sum(1200); }
-fbt:vmlinux:hrtimer_nanosleep:entry /pid == $target/ { exit(0); }
+fbt:vmlinux:schedule:entry { func(caller); printf("\n"); }
+fbt:vmlinux:schedule:entry { mod(caller); printf("\n"); }
+fbt:vmlinux:schedule:entry { sym(caller); printf("\n"); }
+fbt:vmlinux:schedule:entry { stack(5); }
+fbt:vmlinux:schedule:entry { @['a', func(caller), mod(caller), sym(caller), stack(5), 4] = sum( 34); }
+fbt:vmlinux:schedule:entry { @['a', func(caller), mod(caller), sym(caller), stack(5), 4] = sum(1200); }
+fbt:vmlinux:schedule:entry { exit(0); }
diff --git a/test/unittest/stack/tst.stack.d b/test/unittest/stack/tst.stack.d
index 05c2644b..10ee1270 100644
--- a/test/unittest/stack/tst.stack.d
+++ b/test/unittest/stack/tst.stack.d
@@ -18,7 +18,7 @@ BEGIN
system("echo write something > /dev/null");
}
-fbt::ksys_write:entry
+fbt::schedule:entry
{
stack(1);
stack(2);
diff --git a/test/unittest/stack/tst.stack.r.p b/test/unittest/stack/tst.stack.r.p
index 895f96f5..5ce889ac 100755
--- a/test/unittest/stack/tst.stack.r.p
+++ b/test/unittest/stack/tst.stack.r.p
@@ -1,17 +1,17 @@
#!/usr/bin/gawk -f
-/ksys_write/ {
+/schedule/ {
# check probe
- if ( $1 != "ksys_write:entry" ) {
- print "ERROR: expected fun:prb = ksys_write:entry";
+ if ( $1 != "schedule:entry" ) {
+ print "ERROR: expected fun:prb = schedule:entry";
exit 1;
}
# check stack(1)
getline;
- if (index($1, "`ksys_write+0x") == 0 &&
- match($1, "`ksys_write$") == 0) {
- print "ERROR: expected leaf frame to be ksys_write";
+ if (index($1, "`schedule+0x") == 0 &&
+ match($1, "`schedule$") == 0) {
+ print "ERROR: expected leaf frame to be schedule";
exit 1;
}
FRAME1 = $1;
--
2.39.3
More information about the DTrace-devel
mailing list