summaryrefslogtreecommitdiffstats
path: root/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched')
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/Makefile.kup0
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.enqueue.d48
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.oncpu.d54
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.stackdepth.d41
4 files changed, 143 insertions, 0 deletions
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/Makefile.kup
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.enqueue.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.enqueue.d
new file mode 100644
index 00000000..77105c1e
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.enqueue.d
@@ -0,0 +1,48 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#pragma D option switchrate=100hz
+#pragma D option destructive
+
+sched:::enqueue
+/pid == 0 && args[1]->pr_pid == $pid/
+{
+ self->one = 1;
+}
+
+sched:::enqueue
+/self->one && args[2]->cpu_id >= 0 && args[2]->cpu_id <= `max_cpuid/
+{
+ self->two = 1;
+}
+
+sched:::enqueue
+/self->two && args[0]->pr_lwpid > 0/
+{
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.oncpu.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.oncpu.d
new file mode 100644
index 00000000..25717671
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.oncpu.d
@@ -0,0 +1,54 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#pragma D option switchrate=100hz
+#pragma D option destructive
+
+sched:::on-cpu
+/pid == $pid/
+{
+ self->on++;
+}
+
+sched:::off-cpu
+/pid == $pid && self->on/
+{
+ self->off++;
+}
+
+sched:::off-cpu
+/self->on > 50 && self->off > 50/
+{
+ exit(0);
+}
+
+profile:::tick-1sec
+/n++ > 10/
+{
+ exit(1);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.stackdepth.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.stackdepth.d
new file mode 100644
index 00000000..b4251270
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.stackdepth.d
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#pragma D option switchrate=100hz
+
+sched:::on-cpu
+/stackdepth > 0/
+{
+ exit(0);
+}
+
+tick-1s
+/i++ == 3/
+{
+ exit(1);
+}