svn commit: r256002 - in stable/9: cddl/contrib/opensolaris/cmd/dtrace cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs cddl/contrib/ope...
Pedro F. Giffuni
pfg at FreeBSD.org
Wed Oct 2 18:51:55 UTC 2013
Author: pfg
Date: Wed Oct 2 18:51:48 2013
New Revision: 256002
URL: http://svnweb.freebsd.org/changeset/base/256002
Log:
MFC r250574, r250812, r253725;
DTrace: option for time-ordered output
Merge changes from illumos:
3021 option for time-ordered output from dtrace(1M)
3022 DTrace: keys should not affect the sort order when sorting by value
3023 it should be possible to dereference dynamic variables
3024 D integer narrowing needs some work
3025 register leak in D code generation
This brings yet another feature implemented in upstream DTrace.
A complete description is available here:
http://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/
This change bumps the DT_VERS_* number to 1.9.1 in
accordance to what is done in illumos.
Special thanks to Mark Johnston for fixes and testing.
Illumos Revisions: 13758:23432da34147
Reference:
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/1694
Obtained from: Illumos
Added:
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/
- copied from r250812, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh
- copied unchanged from r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh
- copied unchanged from r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d
- copied unchanged from r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out
- copied unchanged from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pq.c
- copied unchanged from r250574, head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pq.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pq.h
- copied unchanged from r250574, head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pq.h
Deleted:
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/man.TestTransStability.d
Modified:
stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.h
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c
stable/9/cddl/lib/libdtrace/Makefile
stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
stable/9/sys/cddl/dev/dtrace/dtrace_ioctl.c
Directory Properties:
stable/9/ (props changed)
stable/9/cddl/ (props changed)
stable/9/cddl/contrib/ (props changed)
stable/9/cddl/contrib/opensolaris/ (props changed)
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed)
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed)
stable/9/cddl/lib/ (props changed)
stable/9/cddl/lib/libdtrace/ (props changed)
stable/9/sys/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Wed Oct 2 18:45:37 2013 (r256001)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Wed Oct 2 18:51:48 2013 (r256002)
@@ -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>
@@ -1409,6 +1410,7 @@ main(int argc, char *argv[])
(void) dtrace_setopt(g_dtp, "bufsize", "4m");
(void) dtrace_setopt(g_dtp, "aggsize", "4m");
#endif
+ (void) dtrace_setopt(g_dtp, "temporal", "yes");
/*
* If -G is specified, enable -xlink=dynamic and -xunodefs to permit
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Wed Oct 2 18:45:37 2013 (r256001)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Wed Oct 2 18:51:48 2013 (r256002)
@@ -583,6 +583,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';
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d)
@@ -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);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out)
@@ -0,0 +1,6 @@
+
+ 1 0 10
+ 2 0 20
+ 3 0 30
+ 4 0 40
+
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out)
@@ -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
+
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d)
@@ -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);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out)
@@ -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
+
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d)
@@ -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);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out)
@@ -0,0 +1 @@
+cafe
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d)
@@ -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);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out)
@@ -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: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d Wed Oct 2 18:45:37 2013 (r256001)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d Wed Oct 2 18:51:48 2013 (r256002)
@@ -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
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh (from r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh Wed Oct 2 18:51:48 2013 (r256002, copy of r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh)
@@ -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
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh (from r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh Wed Oct 2 18:51:48 2013 (r256002, copy of r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh)
@@ -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
+ exit $status
+fi
+
+# dtrace outputs a blank line at the end, which will sort to the beginning,
+# so use grep 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
+
+exit $status
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d (from r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d Wed Oct 2 18:51:48 2013 (r256002, copy of r250574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d)
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+/*
+ * This test excercises the "remnant" handling of the temporal option.
+ * At the end of one pass of retrieving and printing data from all CPUs,
+ * some unprocessed data will remain, because its timestamp is after the
+ * time covered by all CPUs' buffers. This unprocessed data is
+ * rearranged in a more space-efficient manner. If this is done
+ * incorrectly, an alignment error may occur. To test this, we use a
+ * high-frequency probe so that data will be recorded in subsequent
+ * CPU's buffers after the first CPU's buffer is obtained. The
+ * combination of data traced here (a 8-byte value and a 4-byte value)
+ * is effective to cause alignment problems with an incorrect
+ * implementation.
+ *
+ * This test needs to be run on a multi-CPU system to be effective.
+ */
+
+#pragma D option quiet
+#pragma D option temporal
+
+profile-4997
+{
+ printf("%u %u", 1ULL, 2);
+}
+
+tick-1
+/i++ == 10/
+{
+ exit(0);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d)
@@ -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
+{
+ print(*curpsinfo);
+}
+
+BEGIN
+{
+ exit(0);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d)
@@ -0,0 +1,42 @@
+/*
+ * 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
+
+typedef struct pancakes {
+ int i;
+ string s;
+ timespec_t t;
+} pancakes_t;
+
+translator pancakes_t < void *V > {
+ i = 2 * 10;
+ s = strjoin("I like ", "pancakes");
+ t = *(timespec_t *)`dtrace_zero;
+};
+
+BEGIN
+{
+ print(*(xlate < pancakes_t * > ((void *)NULL)));
+}
+
+BEGIN
+{
+ exit(0);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out)
@@ -0,0 +1,8 @@
+pancakes_t {
+ int i = 0x14
+ string s = [ "I like pancakes" ]
+ timespec_t t = {
+ time_t tv_sec = 0
+ long tv_nsec = 0
+ }
+}
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out Wed Oct 2 18:45:37 2013 (r256001)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out Wed Oct 2 18:51:48 2013 (r256002)
@@ -1,6 +1,6 @@
-239
-52719
+-17
+-12817
-1867788817
1311768467294899695
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d)
@@ -0,0 +1,38 @@
+/*
+ * 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 %d v. %i v. %u.
+ */
+
+#pragma D option quiet
+
+uint16_t x;
+int16_t y;
+
+BEGIN
+{
+ x = 0xffffffff;
+ y = 0xffffffff;
+
+ printf("%d %i %u\n", x, x, x);
+ printf("%d %i %u\n", y, y, y);
+
+ exit(0);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out)
@@ -0,0 +1,3 @@
+65535 -1 65535
+-1 -1 65535
+
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d Wed Oct 2 18:45:37 2013 (r256001)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d Wed Oct 2 18:51:48 2013 (r256002)
@@ -24,7 +24,10 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
/*
* ASSERTION:
@@ -35,17 +38,10 @@
*
* NOTES: This test behaves differently depending on the values
* assigned to bufsize.
- * 1. 0 > bufsize.
- * 2. 0 == bufsize.
- * 3. 0 < bufsize <= 7
- * 4. 8 <= bufsize <= 31
- * 5. 32 <= bufsize <= 47
- * 6. 48 <= bufsize <= 71
- * 7. 72 <= bufsize
*/
#pragma D option quiet
-#pragma D option bufsize=41
+#pragma D option bufsize=49
BEGIN
{
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d)
@@ -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
+{
+ trace(*curpsinfo);
+}
+
+BEGIN
+{
+ exit(0);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh)
@@ -0,0 +1,62 @@
+#
+# 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.
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+#
+# Test the output for stable translations.
+#
+
+if [ $# != 1 ]; then
+ echo expected one argument: '<'dtrace-path'>'
+ exit 2
+fi
+
+dtrace=$1
+
+$dtrace -v -s /dev/stdin <<EOF
+
+#pragma D option quiet
+
+inline lwpsinfo_t *myinfo = xlate < lwpsinfo_t *> (curthread);
+
+#pragma D attributes Stable/Stable/Common myinfo
+
+BEGIN
+{
+ this->a = myinfo->pr_flag;
+ exit(0);
+}
+
+BEGIN
+{
+ exit(1);
+}
+EOF
+
+exit $?
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out)
@@ -0,0 +1,14 @@
+
+Stability attributes for script /dev/stdin:
+
+ Minimum Probe Description Attributes
+ Identifier Names: Unstable
+ Data Semantics: Unstable
+ Dependency Class: Common
+
+ Minimum Statement Attributes
+ Identifier Names: Stable
+ Data Semantics: Stable
+ Dependency Class: Common
+
+
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh)
@@ -0,0 +1,60 @@
+#
+# 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.
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+#
+
+#
+# Test the output of unstable translations.
+#
+
+if [ $# != 1 ]; then
+ echo expected one argument: '<'dtrace-path'>'
+ exit 2
+fi
+
+dtrace=$1
+
+$dtrace -v -s /dev/stdin <<EOF
+
+#pragma D option quiet
+
+inline lwpsinfo_t *myinfo = xlate < lwpsinfo_t *> (curthread);
+
+BEGIN
+{
+ this->a = myinfo->pr_flag;
+ exit(0);
+}
+
+BEGIN
+{
+ exit(1);
+}
+EOF
+
+exit $?
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out (from r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out Wed Oct 2 18:51:48 2013 (r256002, copy of r253725, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out)
@@ -0,0 +1,14 @@
+
+Stability attributes for script /dev/stdin:
+
+ Minimum Probe Description Attributes
+ Identifier Names: Unstable
+ Data Semantics: Unstable
+ Dependency Class: Common
+
+ Minimum Statement Attributes
+ Identifier Names: Private
+ Data Semantics: Private
+ Dependency Class: Unknown
+
+
Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Wed Oct 2 18:45:37 2013 (r256001)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Wed Oct 2 18:51:48 2013 (r256002)
@@ -26,6 +26,7 @@
/*
* Copyright (c) 2011, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*/
#include <stdlib.h>
@@ -894,33 +895,14 @@ dt_aggregate_valcmp(const void *lhs, con
caddr_t rdata = rh->dtahe_data.dtada_data;
dtrace_recdesc_t *lrec, *rrec;
int64_t *laddr, *raddr;
- int rval, i;
-
- if ((rval = dt_aggregate_hashcmp(lhs, rhs)) != 0)
- return (rval);
-
- if (lagg->dtagd_nrecs > ragg->dtagd_nrecs)
- return (DT_GREATERTHAN);
-
- if (lagg->dtagd_nrecs < ragg->dtagd_nrecs)
- return (DT_LESSTHAN);
+ int rval;
- for (i = 0; i < lagg->dtagd_nrecs; i++) {
- lrec = &lagg->dtagd_rec[i];
- rrec = &ragg->dtagd_rec[i];
+ assert(lagg->dtagd_nrecs == ragg->dtagd_nrecs);
- if (lrec->dtrd_offset < rrec->dtrd_offset)
- return (DT_LESSTHAN);
-
- if (lrec->dtrd_offset > rrec->dtrd_offset)
- return (DT_GREATERTHAN);
+ lrec = &lagg->dtagd_rec[lagg->dtagd_nrecs - 1];
+ rrec = &ragg->dtagd_rec[ragg->dtagd_nrecs - 1];
- if (lrec->dtrd_action < rrec->dtrd_action)
- return (DT_LESSTHAN);
-
- if (lrec->dtrd_action > rrec->dtrd_action)
- return (DT_GREATERTHAN);
- }
+ assert(lrec->dtrd_action == rrec->dtrd_action);
laddr = (int64_t *)(uintptr_t)(ldata + lrec->dtrd_offset);
raddr = (int64_t *)(uintptr_t)(rdata + rrec->dtrd_offset);
Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Wed Oct 2 18:45:37 2013 (r256001)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Wed Oct 2 18:51:48 2013 (r256002)
@@ -22,7 +22,7 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, Joyent Inc. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-stable-9
mailing list