[DTrace-devel] [PATCH v2 8/9] Support aggregations of non-void actions

eugene.loh at oracle.com eugene.loh at oracle.com
Sat Jan 27 20:12:29 UTC 2024


From: Eugene Loh <eugene.loh at oracle.com>

Some actions -- such as stack() and func() -- have non-void actions.
D allows one to use such actions as aggregation keys.  Add such support.

We allow these actions to be keys to aggregations, but not
to associative arrays in order to conform to legacy behavior.
However, lifting this limitation should be easy.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 libdtrace/dt_cg.c                             | 150 ++++++++++++++++--
 test/demo/fbt/delay.d                         |  10 +-
 test/unittest/aggs/tst.signature.d            |   5 +-
 test/unittest/aggs/tst.stack.d                |  19 +++
 test/unittest/aggs/tst.stack.r                |   1 +
 test/unittest/aggs/tst.stack.r.p              |  37 +++++
 test/unittest/aggs/tst.ustack.d               |  20 +++
 test/unittest/aggs/tst.ustack.r               |  18 +++
 test/unittest/noresolve/tst.uaddr.sh          |   1 -
 test/unittest/noresolve/tst.usym.sh           |   1 -
 .../printa/err.D_PRINTF_ARG_TYPE.stack.d      |   2 +-
 .../printa/err.D_PRINTF_ARG_TYPE.ustack.d     |   2 +-
 test/unittest/printa/tst.jstack.d             |  18 +++
 test/unittest/printa/tst.stack.d              |   7 +-
 test/unittest/printa/tst.stack.r              |   7 +
 test/unittest/printa/tst.ustack.d             |  19 +++
 test/unittest/profile-n/tst.func.sh           |   1 -
 test/unittest/profile-n/tst.mod.sh            |   1 -
 test/unittest/profile-n/tst.sym.sh            |   1 -
 test/unittest/profile-n/tst.ufunc.sh          |   1 -
 test/unittest/profile-n/tst.umod.sh           |   1 -
 test/unittest/profile-n/tst.usym.sh           |   2 +-
 test/unittest/ustack/tst.mtspin.sh            |   2 +-
 test/unittest/ustack/tst.spin.sh              |   1 -
 24 files changed, 288 insertions(+), 39 deletions(-)
 create mode 100644 test/unittest/aggs/tst.stack.d
 create mode 100644 test/unittest/aggs/tst.stack.r
 create mode 100755 test/unittest/aggs/tst.stack.r.p
 create mode 100644 test/unittest/aggs/tst.ustack.d
 create mode 100644 test/unittest/aggs/tst.ustack.r
 create mode 100644 test/unittest/printa/tst.jstack.d
 create mode 100644 test/unittest/printa/tst.stack.r
 create mode 100644 test/unittest/printa/tst.ustack.d

diff --git a/libdtrace/dt_cg.c b/libdtrace/dt_cg.c
index 6d3aed13..a2259aaa 100644
--- a/libdtrace/dt_cg.c
+++ b/libdtrace/dt_cg.c
@@ -3683,12 +3683,47 @@ dt_cg_arglist(dt_ident_t *idp, dt_node_t *args, dt_irlist_t *dlp,
 	if (dt_node_is_void(args))
 		goto empty_args;
 
+	/*
+	 * There is only one tuple assembly area, and computing a tuple member
+	 * might itself require the tuple assembly area.  So, first compute
+	 * tuple members (other than call stacks, which can take up a lot of
+	 * space and can be computed at any time), saving them on the BPF stack.
+	 */
 	for (dnp = args; dnp != NULL; dnp = dnp->dn_list, i++) {
 		/* Bail early if we run out of tuple slots. */
 		if (i > dtp->dt_conf.dtc_diftupregs)
 			longjmp(yypcb->pcb_jmpbuf, EDT_NOTUPREG);
 
-		/* Push the component (pointer or value) onto the stack. */
+		/*
+		 * Handle actions that can be used as agg keys.
+		 * If we are not an aggregation, dt_cg_node(dnp, ...)
+		 * will alert us there is a problem.
+		 */
+		if (idp->di_kind == DT_IDENT_AGG &&
+		    dnp->dn_kind == DT_NODE_FUNC &&
+		    dnp->dn_ident != NULL)
+			switch (dnp->dn_ident->di_id) {
+			case DT_ACT_STACK:
+			case DT_ACT_USTACK:
+				/* If this is a stack()-like function, we can handle it later. */
+				dt_cg_push_stack(BPF_REG_10, dlp, drp);
+				continue;
+			case DT_ACT_JSTACK:
+				dnerror(dnp, D_UNKNOWN, "jstack() is not implemented (yet)\n");
+				/* FIXME: Needs implementation */
+			case DT_ACT_SYM:
+			case DT_ACT_MOD:
+			case DT_ACT_UADDR:
+			case DT_ACT_UMOD:
+			case DT_ACT_USYM:
+				/* Otherwise, use the action's arg, not its "return value". */
+				dt_cg_node(dnp->dn_args, dlp, drp);
+				dt_cg_push_stack(dnp->dn_args->dn_reg, dlp, drp);
+				dt_regset_free(drp, dnp->dn_args->dn_reg);
+				continue;
+			}
+
+		/* Push the component (pointer or value) onto the tuple stack. */
 		dt_cg_node(dnp, dlp, drp);
 		dt_cg_push_stack(dnp->dn_reg, dlp, drp);
 		dt_regset_free(drp, dnp->dn_reg);
@@ -3738,23 +3773,71 @@ empty_args:
 		dtrace_diftype_t	t;
 		size_t			size;
 		uint_t			nextoff;
+		int			is_symmod = 0;
+
+		if (dnp->dn_kind == DT_NODE_FUNC &&
+		    dnp->dn_ident != NULL)
+			switch (dnp->dn_ident->di_id) {
+			case DT_ACT_STACK:
+				tuplesize = dt_cg_act_stack_sub(yypcb, dnp, treg, tuplesize, 0);
+				continue;
+			case DT_ACT_USTACK:
+				tuplesize = dt_cg_act_stack_sub(yypcb, dnp, treg, tuplesize, 1);
+				continue;
+			case DT_ACT_UADDR:
+			case DT_ACT_USYM:
+			case DT_ACT_UMOD:
+				nextoff = (tuplesize + (8 - 1)) & ~(8 - 1);
+				if (tuplesize < nextoff)
+					emit(dlp,  BPF_ALU64_IMM(BPF_ADD, treg, nextoff - tuplesize));
+
+				/* Preface the value with the user process tgid. */
+				if (dt_regset_xalloc_args(drp) == -1)
+					longjmp(yypcb->pcb_jmpbuf, EDT_NOREG);
+				dt_regset_xalloc(drp, BPF_REG_0);
+				emit(dlp, BPF_CALL_HELPER(BPF_FUNC_get_current_pid_tgid));
+				dt_regset_free_args(drp);
+				emit(dlp, BPF_ALU64_IMM(BPF_AND, BPF_REG_0, 0xffffffff));
+				emit(dlp, BPF_STORE(BPF_DW, treg, 0, BPF_REG_0));
+				dt_regset_free(drp, BPF_REG_0);
+
+				/* Then store the value. */
+				dt_regset_xalloc(drp, BPF_REG_0);
+				emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_0, areg, -i * DT_STK_SLOT_SZ));
+				emit(dlp,  BPF_STORE(BPF_DW, treg, 8, BPF_REG_0));
+				dt_regset_free(drp, BPF_REG_0);
+
+				emit(dlp,  BPF_ALU64_IMM(BPF_ADD, treg, 16));
+				tuplesize = nextoff + 16;
+
+				continue;
+			case DT_ACT_SYM:
+			case DT_ACT_MOD:
+				is_symmod = 1;
+				size = 8;
+				dt_regset_xalloc(drp, BPF_REG_0);
+				emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_0, areg, -i * DT_STK_SLOT_SZ));
+				break;
+			}
 
-		dt_node_diftype(dtp, dnp, &t);
-		size = t.dtdt_size;
-		if (size == 0)
-			continue;
+		if (!is_symmod) {
+			dt_node_diftype(dtp, dnp, &t);
+			size = t.dtdt_size;
+			if (size == 0)
+				continue;
 
-		dt_regset_xalloc(drp, BPF_REG_0);
-		emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_0, areg, -i * DT_STK_SLOT_SZ));
+			dt_regset_xalloc(drp, BPF_REG_0);
+			emit(dlp, BPF_LOAD(BPF_DW, BPF_REG_0, areg, -i * DT_STK_SLOT_SZ));
 
-		dnp->dn_reg = isp->dis_args[i].dn_reg = BPF_REG_0;
-		dt_cg_typecast(dnp, &isp->dis_args[i], dlp, drp);
-		isp->dis_args[i].dn_reg = -1;
+			dnp->dn_reg = isp->dis_args[i].dn_reg = BPF_REG_0;
+			dt_cg_typecast(dnp, &isp->dis_args[i], dlp, drp);
+			isp->dis_args[i].dn_reg = -1;
 
-		/* The typecast may have changed the size. */
-		size = dt_node_sizeof(&isp->dis_args[i]);
+			/* The typecast may have changed the size. */
+			size = dt_node_sizeof(&isp->dis_args[i]);
+		}
 
-		if (dt_node_is_scalar(dnp) || dt_node_is_float(dnp)) {
+		if (dt_node_is_scalar(dnp) || dt_node_is_float(dnp) || is_symmod) {
 			nextoff = (tuplesize + (size - 1)) & ~(size - 1);
 			if (tuplesize < nextoff)
 				emit(dlp,  BPF_ALU64_IMM(BPF_ADD, treg, nextoff - tuplesize));
@@ -8339,8 +8422,45 @@ dt_cg_agg(dt_pcb_t *pcb, dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp)
 			int16_t	alignment;
 			dtrace_actkind_t kind = DTRACEACT_DIFEXPR;
 			uint64_t arg = 0;
-
-			if (dt_node_is_string(knp)) {
+			dt_ident_t *idp = knp->dn_ident;
+
+			if (knp->dn_kind == DT_NODE_FUNC && idp != NULL &&
+			    idp->di_kind == DT_IDENT_ACTFUNC) {
+				size = 16;
+				alignment = 8;
+				switch (idp->di_id) {
+				case DT_ACT_USTACK:
+					arg = dt_cg_stack_arg(dtp, knp, 1);
+					kind = DTRACEACT_USTACK;
+					size = 8 + 8 * DTRACE_USTACK_NFRAMES(arg);
+					break;
+				case DT_ACT_JSTACK:
+					kind = DTRACEACT_JSTACK;
+					break;
+				case DT_ACT_USYM:
+					kind = DTRACEACT_USYM;
+					break;
+				case DT_ACT_UMOD:
+					kind = DTRACEACT_UMOD;
+					break;
+				case DT_ACT_UADDR:
+					kind = DTRACEACT_UADDR;
+					break;
+				case DT_ACT_STACK:
+					arg = dt_cg_stack_arg(dtp, knp, 0);
+					kind = DTRACEACT_STACK;
+					size = 8 * arg;
+					break;
+				case DT_ACT_SYM:
+					kind = DTRACEACT_SYM;
+					size = 8;
+					break;
+				case DT_ACT_MOD:
+					kind = DTRACEACT_MOD;
+					size = 8;
+					break;
+				}
+			} else if (dt_node_is_string(knp)) {
 				size = dtp->dt_options[DTRACEOPT_STRSIZE] + 1;
 				alignment = 1;
 			} else {
diff --git a/test/demo/fbt/delay.d b/test/demo/fbt/delay.d
index 38791f77..8d56806d 100644
--- a/test/demo/fbt/delay.d
+++ b/test/demo/fbt/delay.d
@@ -1,20 +1,16 @@
 /*
  * Oracle Linux DTrace.
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2023, 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.
  */
 
-/* @@xfail: not yet ported */
-
-fbt::delay:entry,
-fbt::drv_usecwait:entry
+fbt::do_nanosleep:entry
 {
 	self->in = timestamp
 }
 
-fbt::delay:return,
-fbt::drv_usecwait:return
+fbt::do_nanosleep:return
 /self->in/
 {
 	@snoozers[stack()] = quantize(timestamp - self->in);
diff --git a/test/unittest/aggs/tst.signature.d b/test/unittest/aggs/tst.signature.d
index 97bc1172..1f9c58f2 100644
--- a/test/unittest/aggs/tst.signature.d
+++ b/test/unittest/aggs/tst.signature.d
@@ -4,12 +4,15 @@
  * Licensed under the Universal Permissive License v 1.0 as shown at
  * http://oss.oracle.com/licenses/upl.
  */
-/* @@xfail: dtv2 */
 
 /*
  * This is a simple test to make sure that signature checking works properly
  * for the fake-o types.
  */
+
+/* @@nosort */
+#pragma D option quiet
+#pragma D option maxframes=10
 BEGIN
 {
 	@stk[ustack()] = count();
diff --git a/test/unittest/aggs/tst.stack.d b/test/unittest/aggs/tst.stack.d
new file mode 100644
index 00000000..6c3c530e
--- /dev/null
+++ b/test/unittest/aggs/tst.stack.d
@@ -0,0 +1,19 @@
+/*
+ * Oracle Linux DTrace.
+ * Copyright (c) 2023, 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); }
diff --git a/test/unittest/aggs/tst.stack.r b/test/unittest/aggs/tst.stack.r
new file mode 100644
index 00000000..2e9ba477
--- /dev/null
+++ b/test/unittest/aggs/tst.stack.r
@@ -0,0 +1 @@
+success
diff --git a/test/unittest/aggs/tst.stack.r.p b/test/unittest/aggs/tst.stack.r.p
new file mode 100755
index 00000000..193916d7
--- /dev/null
+++ b/test/unittest/aggs/tst.stack.r.p
@@ -0,0 +1,37 @@
+#!/usr/bin/gawk -f
+
+{
+    # read the first lines (func, mod, sym)
+    myfunc = $1; getline;
+    mymod  = $1; getline;
+    mysym  = $1; getline; getline;
+
+    # read the stack frames
+    n = 0;
+    while (NF != 0) {
+        n++;
+        stack[n] = $1;
+        getline;
+    }
+    getline;
+
+    # read the first keys of the agg output
+    nerr = 0;
+    if ($1 != "97") { nerr++; printf("key #1: expect 97 got %s\n", $1); }
+    if ($2 != myfunc) { nerr++; printf("key #2: expect %s got %s\n", myfunc, $2); }
+    if ($3 != mymod ) { nerr++; printf("key #3: expect %s got %s\n", mymod , $3); }
+    if ($4 != mysym ) { nerr++; printf("key #4: expect %s got %s\n", mysym , $4); }
+
+    # read the stack frames in the agg output
+    for (i = 1; i <= n; i++) {
+        getline;
+        if ($1 != stack[i]) { nerr++; printf("stack frame #%d: expect %s got %s\n", i, stack[i], $1); }
+    }
+
+    # read the last key and the value of the agg output
+    getline;
+    if ($1 != "4") { nerr++; printf("last key: expect 4 got %s\n", $1); }
+    if ($2 != "1234") { nerr++; printf("value: expect 1234 got %s\n", $2); }
+    if (nerr == 0) { printf("success\n"); exit(0); }
+    else           { printf("FAILURE\n"); exit(1); }
+}
diff --git a/test/unittest/aggs/tst.ustack.d b/test/unittest/aggs/tst.ustack.d
new file mode 100644
index 00000000..e0d90924
--- /dev/null
+++ b/test/unittest/aggs/tst.ustack.d
@@ -0,0 +1,20 @@
+/*
+ * Oracle Linux DTrace.
+ * Copyright (c) 2023, 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: ustack-tst-basic */
+/* @@nosort */
+
+#pragma D option quiet
+
+profile-1 /pid == $target/ { uaddr(ucaller); printf("\n"); }
+profile-1 /pid == $target/ { ufunc(ucaller); printf("\n"); }
+profile-1 /pid == $target/ {  umod(ucaller); printf("\n"); }
+profile-1 /pid == $target/ {  usym(ucaller); printf("\n"); }
+profile-1 /pid == $target/ { ustack(5); }
+profile-1 /pid == $target/ { @['a', uaddr(ucaller), ufunc(ucaller), umod(ucaller), usym(ucaller), ustack(5), 4] = sum(  34); }
+profile-1 /pid == $target/ { @['a', uaddr(ucaller), ufunc(ucaller), umod(ucaller), usym(ucaller), ustack(5), 4] = sum(1200); }
+profile-1 /pid == $target/ { exit(0); }
diff --git a/test/unittest/aggs/tst.ustack.r b/test/unittest/aggs/tst.ustack.r
new file mode 100644
index 00000000..ed26cc5f
--- /dev/null
+++ b/test/unittest/aggs/tst.ustack.r
@@ -0,0 +1,18 @@
+  ustack-tst-basic`myfunc_y+{ptr}                     
+  ustack-tst-basic`myfunc_y                         
+  ustack-tst-basic                                  
+  ustack-tst-basic`myfunc_y                         
+
+              ustack-tst-basic`myfunc_z+{ptr}
+              ustack-tst-basic`myfunc_y+{ptr}
+              ustack-tst-basic`myfunc_x+{ptr}
+              ustack-tst-basic`myfunc_w+{ptr}
+              ustack-tst-basic`myfunc_v+{ptr}
+
+       97  ustack-tst-basic`myfunc_y+{ptr}                       ustack-tst-basic`myfunc_y                           ustack-tst-basic                                    ustack-tst-basic`myfunc_y                         
+              ustack-tst-basic`myfunc_z+{ptr}
+              ustack-tst-basic`myfunc_y+{ptr}
+              ustack-tst-basic`myfunc_x+{ptr}
+              ustack-tst-basic`myfunc_w+{ptr}
+              ustack-tst-basic`myfunc_v+{ptr}
+        4             1234
diff --git a/test/unittest/noresolve/tst.uaddr.sh b/test/unittest/noresolve/tst.uaddr.sh
index c7c634f0..253844ec 100755
--- a/test/unittest/noresolve/tst.uaddr.sh
+++ b/test/unittest/noresolve/tst.uaddr.sh
@@ -6,7 +6,6 @@
 # http://oss.oracle.com/licenses/upl.
 #
 #  @@runtest-opts: -x noresolve 
-# @@xfail: dtv2
 
 script()
 {
diff --git a/test/unittest/noresolve/tst.usym.sh b/test/unittest/noresolve/tst.usym.sh
index 438f600a..ecf333d9 100755
--- a/test/unittest/noresolve/tst.usym.sh
+++ b/test/unittest/noresolve/tst.usym.sh
@@ -6,7 +6,6 @@
 # http://oss.oracle.com/licenses/upl.
 #
 #  @@runtest-opts: -x noresolve 
-# @@xfail: dtv2
 
 script()
 {
diff --git a/test/unittest/printa/err.D_PRINTF_ARG_TYPE.stack.d b/test/unittest/printa/err.D_PRINTF_ARG_TYPE.stack.d
index aa6dc9f2..863cd346 100644
--- a/test/unittest/printa/err.D_PRINTF_ARG_TYPE.stack.d
+++ b/test/unittest/printa/err.D_PRINTF_ARG_TYPE.stack.d
@@ -4,7 +4,7 @@
  * Licensed under the Universal Permissive License v 1.0 as shown at
  * http://oss.oracle.com/licenses/upl.
  */
-/* @@xfail: dtv2 */
+
 BEGIN
 {
 	@[stack()] = count();
diff --git a/test/unittest/printa/err.D_PRINTF_ARG_TYPE.ustack.d b/test/unittest/printa/err.D_PRINTF_ARG_TYPE.ustack.d
index fdc71344..4fb3a5b8 100644
--- a/test/unittest/printa/err.D_PRINTF_ARG_TYPE.ustack.d
+++ b/test/unittest/printa/err.D_PRINTF_ARG_TYPE.ustack.d
@@ -4,7 +4,7 @@
  * Licensed under the Universal Permissive License v 1.0 as shown at
  * http://oss.oracle.com/licenses/upl.
  */
-/* @@xfail: dtv2 */
+
 BEGIN
 {
 	@[ustack()] = count();
diff --git a/test/unittest/printa/tst.jstack.d b/test/unittest/printa/tst.jstack.d
new file mode 100644
index 00000000..4ef1ed58
--- /dev/null
+++ b/test/unittest/printa/tst.jstack.d
@@ -0,0 +1,18 @@
+/*
+ * Oracle Linux DTrace.
+ * Copyright (c) 2006, 2023, 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.
+ */
+/* @@xfail: dtv2 */
+
+BEGIN
+{
+	@[jstack()] = count();
+
+	printa("%k\n", @);
+	printa("%-20k\n", @);
+	printa("%60k\n", @);
+
+	exit(0);
+}
diff --git a/test/unittest/printa/tst.stack.d b/test/unittest/printa/tst.stack.d
index 7e0f14b3..b3d2b966 100644
--- a/test/unittest/printa/tst.stack.d
+++ b/test/unittest/printa/tst.stack.d
@@ -1,16 +1,15 @@
 /*
  * Oracle Linux DTrace.
- * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2023, 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.
  */
-/* @@xfail: dtv2 */
+
+#pragma D option quiet
 
 BEGIN
 {
 	@[stack()] = count();
-	@[ustack()] = count();
-	@[jstack()] = count();
 
 	printa("%k\n", @);
 	printa("%-20k\n", @);
diff --git a/test/unittest/printa/tst.stack.r b/test/unittest/printa/tst.stack.r
new file mode 100644
index 00000000..9e5f5f8a
--- /dev/null
+++ b/test/unittest/printa/tst.stack.r
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/test/unittest/printa/tst.ustack.d b/test/unittest/printa/tst.ustack.d
new file mode 100644
index 00000000..639b79fc
--- /dev/null
+++ b/test/unittest/printa/tst.ustack.d
@@ -0,0 +1,19 @@
+/*
+ * Oracle Linux DTrace.
+ * Copyright (c) 2006, 2023, 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.
+ */
+
+#pragma D option maxframes=10
+
+BEGIN
+{
+	@[ustack()] = count();
+
+	printa("%k\n", @);
+	printa("%-20k\n", @);
+	printa("%60k\n", @);
+
+	exit(0);
+}
diff --git a/test/unittest/profile-n/tst.func.sh b/test/unittest/profile-n/tst.func.sh
index 76c62bbf..cfb6e852 100755
--- a/test/unittest/profile-n/tst.func.sh
+++ b/test/unittest/profile-n/tst.func.sh
@@ -5,7 +5,6 @@
 # Licensed under the Universal Permissive License v 1.0 as shown at
 # http://oss.oracle.com/licenses/upl.
 #
-# @@xfail: dtv2
 
 script()
 {
diff --git a/test/unittest/profile-n/tst.mod.sh b/test/unittest/profile-n/tst.mod.sh
index 09aeb740..92cb1eb2 100755
--- a/test/unittest/profile-n/tst.mod.sh
+++ b/test/unittest/profile-n/tst.mod.sh
@@ -5,7 +5,6 @@
 # Licensed under the Universal Permissive License v 1.0 as shown at
 # http://oss.oracle.com/licenses/upl.
 #
-# @@xfail: dtv2
 
 script()
 {
diff --git a/test/unittest/profile-n/tst.sym.sh b/test/unittest/profile-n/tst.sym.sh
index 446568ce..650b026f 100755
--- a/test/unittest/profile-n/tst.sym.sh
+++ b/test/unittest/profile-n/tst.sym.sh
@@ -5,7 +5,6 @@
 # Licensed under the Universal Permissive License v 1.0 as shown at
 # http://oss.oracle.com/licenses/upl.
 #
-# @@xfail: dtv2
 
 script()
 {
diff --git a/test/unittest/profile-n/tst.ufunc.sh b/test/unittest/profile-n/tst.ufunc.sh
index 0fb16ca3..7457ae6d 100755
--- a/test/unittest/profile-n/tst.ufunc.sh
+++ b/test/unittest/profile-n/tst.ufunc.sh
@@ -5,7 +5,6 @@
 # Licensed under the Universal Permissive License v 1.0 as shown at
 # http://oss.oracle.com/licenses/upl.
 #
-# @@xfail: dtv2
 
 script()
 {
diff --git a/test/unittest/profile-n/tst.umod.sh b/test/unittest/profile-n/tst.umod.sh
index 75568af2..995749ee 100755
--- a/test/unittest/profile-n/tst.umod.sh
+++ b/test/unittest/profile-n/tst.umod.sh
@@ -5,7 +5,6 @@
 # Licensed under the Universal Permissive License v 1.0 as shown at
 # http://oss.oracle.com/licenses/upl.
 #
-# @@xfail: dtv2
 
 script()
 {
diff --git a/test/unittest/profile-n/tst.usym.sh b/test/unittest/profile-n/tst.usym.sh
index f59061d7..61043261 100755
--- a/test/unittest/profile-n/tst.usym.sh
+++ b/test/unittest/profile-n/tst.usym.sh
@@ -5,7 +5,7 @@
 # Licensed under the Universal Permissive License v 1.0 as shown at
 # http://oss.oracle.com/licenses/upl.
 #
-# @@xfail: dtv2
+
 script()
 {
 	$dtrace $dt_flags -qs /dev/stdin <<EOF
diff --git a/test/unittest/ustack/tst.mtspin.sh b/test/unittest/ustack/tst.mtspin.sh
index d99f4f25..e3a60735 100755
--- a/test/unittest/ustack/tst.mtspin.sh
+++ b/test/unittest/ustack/tst.mtspin.sh
@@ -4,7 +4,6 @@
 # Copyright (c) 2006, 2020, 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.
-# @@xfail: dtv2
 
 # @@tags: unstable
 
@@ -23,6 +22,7 @@ $dtrace $dt_flags -o $file -c test/triggers/ustack-tst-mtspin -s /dev/stdin <<EO
 	#pragma D option quiet
 	#pragma D option destructive
 	#pragma D option evaltime=main
+	#pragma D option maxframes=10
 
 	/*
 	 * Toss out the first 100 samples to wait for the program to enter
diff --git a/test/unittest/ustack/tst.spin.sh b/test/unittest/ustack/tst.spin.sh
index 9bff6ff7..856ac08f 100755
--- a/test/unittest/ustack/tst.spin.sh
+++ b/test/unittest/ustack/tst.spin.sh
@@ -4,7 +4,6 @@
 # Copyright (c) 2006, 2020, 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.
-# @@xfail: dtv2
 
 # @@tags: unstable
 
-- 
2.18.4




More information about the DTrace-devel mailing list