Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Aug 2012 09:20:23 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r239385 - in vendor/illumos/dist: cmd/dtrace cmd/dtrace/test/cmd/scripts cmd/dtrace/test/tst/common/aggs cmd/dtrace/test/tst/common/arithmetic cmd/dtrace/test/tst/common/buffering cmd/d...
Message-ID:  <201208190920.q7J9KNff056718@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Sun Aug 19 09:20:22 2012
New Revision: 239385
URL: http://svn.freebsd.org/changeset/base/239385

Log:
  Update vendor/illumos to illumos-gate 13758:23432da34147 (dtrace changes)
  
  References:
    https://www.illumos.org/issues/3021
    https://www.illumos.org/issues/3022
    https://www.illumos.org/issues/3023
    https://www.illumos.org/issues/3024
    https://www.illumos.org/issues/3025
    https://www.illumos.org/issues/3026
  
  Obtained from:	ssh://anonhg@hg.illumos.org/illumos-gate

Added:
  vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/cg/
  vendor/illumos/dist/cmd/dtrace/test/tst/common/cg/err.D_NOREG.noreg.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/cg/err.baddif.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.setfromscript.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.unsetfromscript.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh.out   (contents, props changed)
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.dyn.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/trace/tst.dyn.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out
  vendor/illumos/dist/lib/libdtrace/common/dt_pq.c
Deleted:
  vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/predicates/tst.predcache.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/trace/err.D_TRACE_DYN.bad.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/tracemem/err.D_PROTO_LEN.toomany.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/man.TestTransStability.d
Modified:
  vendor/illumos/dist/cmd/dtrace/dtrace.c
  vendor/illumos/dist/cmd/dtrace/test/cmd/scripts/dtest.pl
  vendor/illumos/dist/cmd/dtrace/test/tst/common/buffering/tst.fill1.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/buffering/tst.ring3.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh
  vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.ints.d.out
  vendor/illumos/dist/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d
  vendor/illumos/dist/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d
  vendor/illumos/dist/lib/libdtrace/common/dt_aggregate.c
  vendor/illumos/dist/lib/libdtrace/common/dt_cc.c
  vendor/illumos/dist/lib/libdtrace/common/dt_cg.c
  vendor/illumos/dist/lib/libdtrace/common/dt_consume.c
  vendor/illumos/dist/lib/libdtrace/common/dt_dis.c
  vendor/illumos/dist/lib/libdtrace/common/dt_error.c
  vendor/illumos/dist/lib/libdtrace/common/dt_errtags.h
  vendor/illumos/dist/lib/libdtrace/common/dt_impl.h
  vendor/illumos/dist/lib/libdtrace/common/dt_open.c
  vendor/illumos/dist/lib/libdtrace/common/dt_options.c
  vendor/illumos/dist/lib/libdtrace/common/dt_parser.c
  vendor/illumos/dist/lib/libdtrace/common/dt_printf.c
  vendor/illumos/dist/lib/libdtrace/common/dt_proc.c
  vendor/illumos/dist/lib/libdtrace/common/dt_proc.h
  vendor/illumos/dist/lib/libdtrace/common/dt_regset.c
  vendor/illumos/dist/lib/libdtrace/common/dt_regset.h
  vendor/illumos/dist/lib/libdtrace/common/dt_subr.c
  vendor/illumos/dist/lib/libdtrace/i386/dt_isadep.c

Modified: vendor/illumos/dist/cmd/dtrace/dtrace.c
==============================================================================
--- vendor/illumos/dist/cmd/dtrace/dtrace.c	Sun Aug 19 09:17:21 2012	(r239384)
+++ vendor/illumos/dist/cmd/dtrace/dtrace.c	Sun Aug 19 09:20:22 2012	(r239385)
@@ -23,8 +23,9 @@
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1339,6 +1340,7 @@ main(int argc, char *argv[])
 
 	(void) dtrace_setopt(g_dtp, "bufsize", "4m");
 	(void) dtrace_setopt(g_dtp, "aggsize", "4m");
+	(void) dtrace_setopt(g_dtp, "temporal", "yes");
 
 	/*
 	 * If -G is specified, enable -xlink=dynamic and -xunodefs to permit

Modified: vendor/illumos/dist/cmd/dtrace/test/cmd/scripts/dtest.pl
==============================================================================
--- vendor/illumos/dist/cmd/dtrace/test/cmd/scripts/dtest.pl	Sun Aug 19 09:17:21 2012	(r239384)
+++ vendor/illumos/dist/cmd/dtrace/test/cmd/scripts/dtest.pl	Sun Aug 19 09:20:22 2012	(r239385)
@@ -27,6 +27,7 @@
 
 #
 # Copyright (c) 2011, Joyent, Inc. All rights reserved.
+# Copyright (c) 2012 by Delphix. All rights reserved.
 #
 require 5.8.4;
 
@@ -612,6 +613,8 @@ if ($opt_x) {
 die "$PNAME: failed to open $PNAME.$$.log: $!\n"
     unless (!$opt_l || open(LOG, ">$PNAME.$$.log"));
 
+$ENV{'DTRACE_DEBUG_REGSET'} = 'true';
+
 if ($opt_g) {
 	$ENV{'UMEM_DEBUG'} = 'default,verbose';
 	$ENV{'UMEM_LOGGING'} = 'fail,contents';

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,35 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+#pragma D option quiet
+
+/*
+ * Make sure the sizes of compatible keys doesn't affect the sort order.
+ */
+
+BEGIN
+{
+	@[(int)1, 0] = sum(10);
+	@[(uint64_t)2, 0] = sum(20);
+	@[(int)3, 0] = sum(30);
+	@[(uint64_t)4, 0] = sum(40);
+	printa(@);
+
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,6 @@
+
+        1        0               10
+                2        0               20
+        3        0               30
+                4        0               40
+

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,8 @@
+The value of i is 6
+The value of i is 18
+The value of i is 72
+The value of i is 25920
+The value of i is 935761216
+The value of i is -91738734
+The value of i is -91738729
+

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,50 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+/*
+ * Test compile-time casting between integer types of different size.
+ */
+
+#pragma D option quiet
+
+int64_t x;
+
+BEGIN
+{
+	x = (int32_t)(int16_t)0xfff0;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (int32_t)(uint16_t)0xfff0;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (uint32_t)(int16_t)0xfff0;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (uint32_t)(uint16_t)0xfff0;
+	printf("%16x %20d %20u\n", x, x, x);
+	printf("\n");
+
+	x = (int16_t)(int32_t)0xfff0;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (int16_t)(uint32_t)0xfff0;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (uint16_t)(int32_t)0xfff0;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (uint16_t)(uint32_t)0xfff0;
+	printf("%16x %20d %20u\n", x, x, x);
+
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,10 @@
+fffffffffffffff0                  -16 18446744073709551600
+            fff0                65520                65520
+        fffffff0           4294967280           4294967280
+            fff0                65520                65520
+
+fffffffffffffff0                  -16 18446744073709551600
+fffffffffffffff0                  -16 18446744073709551600
+            fff0                65520                65520
+            fff0                65520                65520
+

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,36 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+/*
+ * Test narrowing at assignment.
+ */
+
+#pragma D option quiet
+
+uint16_t x;
+uint32_t y;
+
+BEGIN
+{
+	x = 0xbeefcafe;
+	y = x;
+	printf("%x", y); /* where's the beef? */
+
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1 @@
+cafe

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,52 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+/*
+ * Test execution-time casting between integer types of different size.
+ */
+
+#pragma D option quiet
+
+int64_t x;
+
+BEGIN
+{
+	z = 0xfff0;
+
+	x = (int32_t)(int16_t)z;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (int32_t)(uint16_t)z;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (uint32_t)(int16_t)z;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (uint32_t)(uint16_t)z;
+	printf("%16x %20d %20u\n", x, x, x);
+	printf("\n");
+
+	x = (int16_t)(int32_t)z;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (int16_t)(uint32_t)z;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (uint16_t)(int32_t)z;
+	printf("%16x %20d %20u\n", x, x, x);
+	x = (uint16_t)(uint32_t)z;
+	printf("%16x %20d %20u\n", x, x, x);
+
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,10 @@
+fffffffffffffff0                  -16 18446744073709551600
+            fff0                65520                65520
+        fffffff0           4294967280           4294967280
+            fff0                65520                65520
+
+fffffffffffffff0                  -16 18446744073709551600
+fffffffffffffff0                  -16 18446744073709551600
+            fff0                65520                65520
+            fff0                65520                65520
+

Modified: vendor/illumos/dist/cmd/dtrace/test/tst/common/buffering/tst.fill1.d
==============================================================================
--- vendor/illumos/dist/cmd/dtrace/test/tst/common/buffering/tst.fill1.d	Sun Aug 19 09:17:21 2012	(r239384)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/buffering/tst.fill1.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -23,26 +23,29 @@
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
 
 /*
  * ASSERTION:
  *   Positive test for fill buffer policy.
  *
  * SECTION: Buffers and Buffering/fill Policy;
- * 	Buffers and Buffering/Buffer Sizes;
+ *	Buffers and Buffering/Buffer Sizes;
  *	Options and Tunables/bufsize;
  *	Options and Tunables/bufpolicy;
  *	Options and Tunables/statusrate
  */
 /*
- * This is a brute-force way of testing fill buffers.  We assume that each
- * printf() stores 8 bytes.  Because each fill buffer is per-CPU, we must
- * fill up our buffer in one series of enablings on a single CPU.
+ * This is a brute-force way of testing fill buffers.  We assume that
+ * each printf() stores 16 bytes (4x 32-bit words for EPID, timestamp
+ * lo, timestamp hi, and the variable i).  Because each fill buffer is
+ * per-CPU, we must fill up our buffer in one series of enablings on a
+ * single CPU.
  */
 #pragma D option bufpolicy=fill
-#pragma D option bufsize=64
+#pragma D option bufsize=128
 #pragma D option statusrate=10ms
 #pragma D option quiet
 

Modified: vendor/illumos/dist/cmd/dtrace/test/tst/common/buffering/tst.ring3.d
==============================================================================
--- vendor/illumos/dist/cmd/dtrace/test/tst/common/buffering/tst.ring3.d	Sun Aug 19 09:17:21 2012	(r239384)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/buffering/tst.ring3.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -23,8 +23,9 @@
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
 
 /*
  * ASSERTION:
@@ -37,19 +38,20 @@
  */
 
 /*
- * We make some regrettable assumptions about the implementation in this test.
- * First, we assume that each entry for the printf() of an int takes _exactly_
- * eight bytes (four bytes for the EPID, four bytes for the payload).  Second,
- * we assume that by allocating storage for n + 1 records, we will get exactly
- * n.  Here is why:  the final predicate that evaluates to false will reserve
- * space that it won't use.  This act of reservation will advance the wrapped
- * offset.  That record won't be subsequently used, but the wrapped offset has
- * advanced.  (And in this case, that old record is clobbered by the exit()
- * anyway.)  Thirdly:  we rely on t_cpu/cpu_id.  Finally:  we rely on being
- * able to run on the CPU that we first ran on.
+ * We make some regrettable assumptions about the implementation in this
+ * test.  First, we assume that each entry for the printf() of an int
+ * takes _exactly_ 16 bytes (4 bytes for the EPID, 8 bytes for the
+ * timestamp, 4 bytes for the payload).  Second, we assume that by
+ * allocating storage for n + 1 records, we will get exactly n.  Here is
+ * why:  the final predicate that evaluates to false will reserve space
+ * that it won't use.  This act of reservation will advance the wrapped
+ * offset.  That record won't be subsequently used, but the wrapped
+ * offset has advanced.  (And in this case, that old record is clobbered
+ * by the exit() anyway.)  Thirdly:  we rely on t_cpu/cpu_id.  Finally:
+ * we rely on being able to run on the CPU that we first ran on.
  */
 #pragma D option bufpolicy=ring
-#pragma D option bufsize=40
+#pragma D option bufsize=80
 #pragma D option quiet
 
 int n;

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/cg/err.D_NOREG.noreg.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/cg/err.D_NOREG.noreg.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,41 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+/*
+ * Compile some code that requires exactly 9 registers. This should run out
+ * of registers.
+ *
+ * Changes to the code generator might cause this test to succeeed in which
+ * case the code should be changed to another sequence that exhausts the
+ * available internal registers.
+ *
+ * Note that this and err.baddif.d should be kept in sync.
+ */
+
+BEGIN
+{
+	a = 4;
+	trace((a + a) * ((a + a) * ((a + a) * ((a + a) * ((a + a) *
+	    ((a + a) * (a + a)))))));
+}
+
+BEGIN
+{
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/cg/err.baddif.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/cg/err.baddif.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,44 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+/*
+ * Compile some code that requires exactly 9 registers. This should generate
+ * invalid DIF because the kernel will flag the fact that we're using more
+ * registers than are available internally.
+ *
+ * Changes to the code generator might cause this test to succeeed in which
+ * case the code should be changed to another sequence that exhausts the
+ * available internal registers.
+ *
+ * Note that this and err.D_NOREG.noreg.d should be kept in sync.
+ */
+
+#pragma D option iregs=9
+
+BEGIN
+{
+	a = 4;
+	trace((a + a) * ((a + a) * ((a + a) * ((a + a) * ((a + a) *
+	    ((a + a) * (a + a)))))));
+}
+
+BEGIN
+{
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.setfromscript.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.setfromscript.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,25 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+#pragma D option setenv=balloon=something_bad_happens
+
+BEGIN
+{
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.unsetfromscript.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/err.D_PRAGMA_OPTSET.unsetfromscript.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,25 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+#pragma D option unsetenv=rectalexambot
+
+BEGIN
+{
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,33 @@
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+#
+# Check that the LD_NOLAZYLOAD variable is set to 1 as expected.
+#
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+
+$dtrace -q -Z -n doogle -c 'printenv LD_NOLAZYLOAD'
+
+exit $?

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.ld_nolazyload.ksh.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,2 @@
+1
+

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,33 @@
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+#
+# Reset an environment variable we already know to be set.
+#
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+
+$dtrace -q -Z -n doogle -xsetenv=LD_NOLAZYLOAD=0 -c 'printenv LD_NOLAZYLOAD'
+
+exit $?

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv1.ksh.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,2 @@
+0
+

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,33 @@
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+#
+# Test setting a variable that we isn't already set.
+#
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+
+$dtrace -q -Z -n doogle -xsetenv=CORPORATIONS=PEOPLE -c 'printenv CORPORATIONS'
+
+exit $?

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.setenv2.ksh.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,2 @@
+PEOPLE
+

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,33 @@
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+#
+# Test unsetting a variable we know to be set.
+#
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+
+$dtrace -q -Z -n doogle -xunsetenv=LD_NOLAZYLOAD -c 'printenv LD_NOLAZYLOAD'
+
+exit $?

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv1.ksh.out
==============================================================================
Binary file. No diff available.

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,35 @@
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+#
+# Test invalid syntax to the unsetenv option.
+#
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+
+$dtrace -q -Z -n doogle -xunsetenv=ed=screven -c 'true' 2>&1
+
+[[ $? -eq 1 ]] && exit 0
+
+exit 1

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh.out
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/env/tst.unsetenv2.ksh.out	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1 @@
+dtrace: failed to set -x unsetenv: Invalid value for specified option

Modified: vendor/illumos/dist/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh
==============================================================================
--- vendor/illumos/dist/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh	Sun Aug 19 09:17:21 2012	(r239384)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh	Sun Aug 19 09:20:22 2012	(r239385)
@@ -24,7 +24,9 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
 #
 
 if [ $# != 1 ]; then
@@ -49,13 +51,13 @@ tick-1s
 tick-1s
 /(i % 2) == 0/
 {
-	system("dtrace -c date -ln 'pid\$target::main:entry' >/dev/null");
+	system("dtrace -c date -n 'pid\$target::main:entry' >/dev/null");
 }
 
 tick-1s
 /(i % 2) == 1/
 {
-	system("dtrace -c date -ln 'pid\$target::main:return' >/dev/null");
+	system("dtrace -c date -n 'pid\$target::main:return' >/dev/null");
 }
 EOF
 

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,28 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+BEGIN
+{
+	*((int *)alloca(4)) = 1;
+}
+
+BEGIN
+{
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,29 @@
+/*
+ * CDDL HEADER START
+ *
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+BEGIN
+{
+	this->a = alloca(4);
+	*((int *)this->a) = 1;
+}
+
+BEGIN
+{
+	exit(0);
+}

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,106 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+############################################################################
+# ASSERTION:
+#	temporal option causes output to be sorted
+#
+# SECTION: Pragma
+#
+# NOTES: The temporal option has no effect on a single-CPU system, so
+#    this needs to be run on a multi-CPU system to effectively test the
+#    temporal option.
+#
+############################################################################
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+file=/tmp/out.$$
+
+rm -f $file
+
+$dtrace -o $file -c 'sleep 3' -s /dev/stdin <<EOF
+	#pragma D option quiet
+	#pragma D option temporal
+
+	BEGIN
+	{
+		@lines = count();
+		printf("0 begin\n");
+	}
+
+	END
+	{
+		/* Bump @lines every time we print a line. */
+		@lines = count();
+		printf("%u end\n", timestamp);
+		@lines = count();
+		printa("99999999999999999 lines %@u\n", @lines);
+	}
+
+	profile-97hz
+	{
+		@lines = count();
+		printf("%u\n", timestamp);
+	}
+EOF
+
+status=$?
+if [ "$status" -ne 0 ]; then
+	echo $tst: dtrace failed
+	exit $status
+fi
+
+# dtrace outputs a blank line at the end, which will sort to the beginning,
+# so use head to remove the blank line.
+head -n -1 $file > $file.2
+
+sort -n $file.2 | diff $file.2 -
+status=$?
+if [ "$status" -ne 0 ]; then
+	echo $tst: output is not sorted
+	exit $status
+fi
+
+head -n 1 $file.2 | grep begin >/dev/null
+status=$?
+if [ "$status" -ne 0 ]; then
+	echo $tst: begin probe did not fire
+	exit $status
+fi
+
+tail -n 2 $file.2 | grep end >/dev/null
+status=$?
+if [ "$status" -ne 0 ]; then
+	echo $tst: end probe did not fire
+	exit $status
+fi
+
+if [ $(tail -n 1 $file.2 | cut -f3 -d ' ') -ne \
+    $(wc -l $file.2) ]; then
+	echo $tst: incorrect number of lines output
+	exit 1
+fi
+
+exit $status

Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/illumos/dist/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh	Sun Aug 19 09:20:22 2012	(r239385)
@@ -0,0 +1,102 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+############################################################################
+# ASSERTION:
+#	temporal option causes output to be sorted, even when some
+#	buffers are empty
+#
+# SECTION: Pragma
+#
+# NOTES: The temporal option has no effect on a single-CPU system, so
+#    this needs to be run on a multi-CPU system to effectively test the
+#    temporal option.
+#
+############################################################################
+
+if [ $# != 1 ]; then
+	echo expected one argument: '<'dtrace-path'>'
+	exit 2
+fi
+
+dtrace=$1
+file=/tmp/out.$$
+
+rm -f $file
+
+$dtrace -o $file -s /dev/stdin <<EOF
+	#pragma D option quiet
+	#pragma D option destructive
+	#pragma D option temporal
+	#pragma D option switchrate=1000hz
+
+	/*
+	 * Use two enablings of the same probe, so that cpu 0 will always
+	 * record its data just a little bit before the other cpus.
+	 * We don't want to use the chill() action in the same enabling
+	 * that we record the timestamp, because chill() causes the
+	 * timestamp to be re-read, and thus not match the timestamp
+	 * which libdtrace uses to sort the records.
+	 */
+
+	profile-401
+	/cpu == 0/
+	{
+		printf("%d\n", timestamp);
+	}
+
+	profile-401
+	/cpu != 0/
+	{
+		chill(1000); /* one microsecond */
+	}
+
+	profile-401
+	/cpu != 0/
+	{
+		printf("%d\n", timestamp);
+	}
+
+	tick-1s
+	/k++ == 10/
+	{
+		printf("%d\n", timestamp);
+		exit(0);
+	}
+EOF
+
+status=$?
+if [ "$status" -ne 0 ]; then
+	echo $tst: dtrace failed

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208190920.q7J9KNff056718>