Author: rpaulo
Date: Mon Aug  2 13:40:53 2010
New Revision: 210767
URL: http://svn.freebsd.org/changeset/base/210767

Log:
  MFV OpenSolaris DTrace userland bits.

Added:
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cpc/
     - copied from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/cpc/
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/
     - copied from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/ip/
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.coverage.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.available.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.available.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/
     - copied from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/sdt/
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithStddev.d
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithStddev.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh.out
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i86xpv/
     - copied from r210759, vendor/opensolaris/dist/cmd/dtrace/test/tst/i86xpv/
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe
     - copied unchanged from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe
  head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrno.sh
     - copied unchanged from r210759, 
vendor/opensolaris/dist/lib/libdtrace/common/mkerrno.sh
  head/cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh
     - copied unchanged from r210759, 
vendor/opensolaris/dist/lib/libdtrace/common/mksignal.sh
Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/baddof.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/chkargs/chkargs.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.str.d.out
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sysevent/tst.post_chan.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/i386/funcs/tst.badcopyin.d
  head/cddl/contrib/opensolaris/common/avl/avl.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
  head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.h
  head/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/tdata.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/baddof.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/baddof.c   Mon Aug 
 2 13:40:19 2010        (r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/baddof.c   Mon Aug 
 2 13:40:53 2010        (r210767)
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident  "%Z%%M% %I%     %E% SMI"
-
 #include <sys/stat.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -162,7 +160,7 @@ main(int argc, char **argv)
        FILE *fp;
        unsigned char *dof, *copy;
 
-       if (argc < 1)
+       if (argc < 2)
                fatal("expected D script as argument\n");
 
        if ((fp = fopen(filename, "r")) == NULL)

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/chkargs/chkargs.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/chkargs/chkargs.c Mon Aug 
 2 13:40:19 2010        (r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/chkargs/chkargs.c Mon Aug 
 2 13:40:53 2010        (r210767)
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident  "%Z%%M% %I%     %E% SMI"
-
 #include <strings.h>
 #include <unistd.h>
 #include <dtrace.h>
@@ -35,6 +33,7 @@ static int g_errs;
 static int g_fd;
 static int g_verbose;
 static int g_errexit;
+static char *g_progname;
 
 static int
 probe(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *data)
@@ -91,9 +90,11 @@ main(int argc, char *argv[])
        int err, c;
        char *p;
 
+       g_progname = argv[0];
+
        if ((dtp = dtrace_open(DTRACE_VERSION, 0, &err)) == NULL) {
                (void) fprintf(stderr, "%s: failed to open dtrace: %s\n",
-                   argv[0], dtrace_errmsg(dtp, err));
+                   g_progname, dtrace_errmsg(dtp, err));
                return (1);
        }
 
@@ -111,7 +112,7 @@ main(int argc, char *argv[])
 
                        if (dtrace_setopt(dtp, optarg, p) != 0) {
                                (void) fprintf(stderr, "%s: failed to set "
-                                   "option -x %s: %s\n", argv[0], optarg,
+                                   "option -x %s: %s\n", g_progname, optarg,
                                    dtrace_errmsg(dtp, dtrace_errno(dtp)));
                                return (2);
                        }
@@ -119,7 +120,7 @@ main(int argc, char *argv[])
 
                default:
                        (void) fprintf(stderr, "Usage: %s [-ev] "
-                           "[-x opt[=arg]] [probedesc]\n", argv[0]);
+                           "[-x opt[=arg]] [probedesc]\n", g_progname);
                        return (2);
                }
        }
@@ -128,9 +129,9 @@ main(int argc, char *argv[])
        argc -= optind;
 
        if (argc > 0) {
-               if (dtrace_str2desc(dtp, DTRACE_PROBESPEC_NAME, argv[1], &pd)) {
+               if (dtrace_str2desc(dtp, DTRACE_PROBESPEC_NAME, argv[0], &pd)) {
                        (void) fprintf(stderr, "%s: invalid probe description "
-                           "%s: %s\n", argv[0], argv[1],
+                           "%s: %s\n", g_progname, argv[0],
                            dtrace_errmsg(dtp, dtrace_errno(dtp)));
                        return (2);
                }

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl Mon Aug 
 2 13:40:19 2010        (r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl Mon Aug 
 2 13:40:53 2010        (r210767)
@@ -21,12 +21,11 @@
 #
 
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#pragma ident  "%Z%%M% %I%     %E% SMI"
 
-require 5.6.1;
+require 5.8.4;
 
 $PNAME = $0;
 $PNAME =~ s:.*/::;

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl  Mon Aug 
 2 13:40:19 2010        (r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl  Mon Aug 
 2 13:40:53 2010        (r210767)
@@ -24,9 +24,8 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident        "%Z%%M% %I%     %E% SMI"
 
-require 5.6.1;
+require 5.8.4;
 
 use File::Find;
 use File::Basename;
@@ -40,6 +39,7 @@ $OPTSTR = 'abd:fghi:jlnqsx:';
 $USAGE = "Usage: $PNAME [-abfghjlnqs] [-d dir] [-i isa] "
     . "[-x opt[=arg]] [file | dir ...]\n";
 ($MACH = `uname -p`) =~ s/\W*\n//;
+($PLATFORM = `uname -i`) =~ s/\W*\n//;
 
 @dtrace_argv = ();
 
@@ -215,17 +215,17 @@ sub is_exception {
 }
 
 #
-# Iterate over the set of test files specified on the command-line or by
-# a find on "$defdir/common" and "$defdir/$MACH" and execute each one.
-# If the test file is executable, we fork and exec it. If the test is a
-# .ksh file, we run it with $ksh_path. Otherwise we run dtrace -s on it.
-# If the file is named tst.* we assume it should return exit status 0.
-# If the file is named err.* we assume it should return exit status 1.
-# If the file is named err.D_[A-Z0-9]+[.*].d we use dtrace -xerrtags and
-# examine stderr to ensure that a matching error tag was produced.
-# If the file is named drp.[A-Z0-9]+[.*].d we use dtrace -xdroptags and
-# examine stderr to ensure that a matching drop tag was produced.
-# If any *.out or *.err files are found we perform output comparisons.
+# Iterate over the set of test files specified on the command-line or by a find
+# on "$defdir/common", "$defdir/$MACH" and "$defdir/$PLATFORM" and execute each
+# one.  If the test file is executable, we fork and exec it. If the test is a
+# .ksh file, we run it with $ksh_path. Otherwise we run dtrace -s on it.  If
+# the file is named tst.* we assume it should return exit status 0.  If the
+# file is named err.* we assume it should return exit status 1.  If the file is
+# named err.D_[A-Z0-9]+[.*].d we use dtrace -xerrtags and examine stderr to
+# ensure that a matching error tag was produced.  If the file is named
+# drp.[A-Z0-9]+[.*].d we use dtrace -xdroptags and examine stderr to ensure
+# that a matching drop tag was produced.  If any *.out or *.err files are found
+# we perform output comparisons.
 #
 # run_tests takes two arguments: The first is the pathname of the dtrace
 # command to invoke when running the tests. The second is the pathname
@@ -548,6 +548,7 @@ $bindir = -d $dt_bin ? $dt_bin : '.';
 
 find(\&wanted, "$defdir/common") if (scalar(@ARGV) == 0);
 find(\&wanted, "$defdir/$MACH") if (scalar(@ARGV) == 0);
+find(\&wanted, "$defdir/$PLATFORM") if (scalar(@ARGV) == 0);
 die $USAGE if (scalar(@files) == 0);
 
 $dtrace_path = '/usr/sbin/dtrace';

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d
       Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.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 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not accept a non-scalar value
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+       @a[pid] = stddev(probefunc);
+}
+

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d
 Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.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 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not accept a call with no arguments
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+       @a[1] = stddev();
+}
+

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d
       Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.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 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     stddev() should not have more than one argument
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+       @a[1] = stddev(1, 2);
+}
+

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d 
(from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d 
    Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d)
@@ -0,0 +1,57 @@
+/*
+ * 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 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ *     Positive stddev() test
+ *
+ * SECTION: Aggregations/Aggregations
+ *
+ * NOTES:
+ *     Verifies that printing a clear()'d aggregation with an stddev()
+ *     aggregation function doesn't cause problems.
+ *
+ */
+
+#pragma D option quiet
+
+tick-10ms
+/i++ < 5/
+{
+       @a = stddev(timestamp);
+}
+
+tick-10ms
+/i == 5/
+{
+       exit(2);
+}
+
+END
+{
+       clear(@a);
+       exit(0);
+}

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out
 Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out)
@@ -0,0 +1,2 @@
+
+                0

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d  
    Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d  
    Mon Aug  2 13:40:53 2010        (r210767)
@@ -20,15 +20,13 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma        ident   "%Z%%M% %I%     %E% SMI"
-
 /*
  * ASSERTION:
- *     Multiple aggregates can be used within the same D script.
+ *     Multiple aggregates can be used within the same D script.
  *
  * SECTION: Aggregations/Aggregations
  *
@@ -52,9 +50,11 @@ tick-10ms
        @c[pid] = avg(new_time);
        @d[pid] = sum(new_time);
        @e[pid] = quantize(new_time);
-       @f[timestamp] = max(new_time);
-       @g[timestamp] = quantize(new_time);
-       @h[timestamp] = lquantize(new_time, 0, 10000, 1000);
+       @f[pid] = stddev(new_time);
+       @g[timestamp] = max(new_time);
+       @h[timestamp] = quantize(new_time);
+       @i[timestamp] = lquantize(new_time, 0, 10000, 1000);
+
        time_1 = time_2;
        i++;
 }

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d  
    Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d  
    Mon Aug  2 13:40:53 2010        (r210767)
@@ -20,18 +20,16 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma        ident   "%Z%%M% %I%     %E% SMI"
-
 /*
  * ASSERTION:
- *   Test multiple aggregations and the default output order
+ *     Test multiple aggregations and the default output order
  *
  * SECTION: Aggregations/Aggregations;
- *     Aggregations/Output
+ *     Aggregations/Output
  *
  */
 
@@ -51,6 +49,7 @@ tick-10ms
        @d = max(i);
        @e = quantize(i);
        @f = lquantize(i, 0, 1000, 100);
+       @g = stddev(i);
 
        i += 100;
 }

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out
  Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out
  Mon Aug  2 13:40:53 2010        (r210767)
@@ -34,3 +34,4 @@
              900 |@@@@                                     1        
          >= 1000 |                                         0        
 
+              287

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d  
    Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d  
    Mon Aug  2 13:40:53 2010        (r210767)
@@ -20,19 +20,17 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma        ident   "%Z%%M% %I%     %E% SMI"
-
 /*
  * ASSERTION:
- *   Test multiple aggregations and overriding default order with
- *   printa() statements.
+ *     Test multiple aggregations and overriding default order with
+ *     printa() statements.
  *
  * SECTION: Aggregations/Aggregations;
- *     Aggregations/Output
+ *     Aggregations/Output
  *
  * NOTES: This is a simple verifiable test.
  *
@@ -55,6 +53,7 @@ tick-10ms
        @e = max(i);
        @f = quantize(i);
        @g = lquantize(i, 0, 1000, 100);
+       @h = stddev(i);
 
        i += 100;
 }
@@ -62,6 +61,7 @@ tick-10ms
 tick-10ms
 /i == 1000/
 {
+       printa("%...@d\n", @h);
        printa("%...@d\n", @g);
        printa("%...@d\n", @f);
        printa("%...@d\n", @e);

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out
  Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out
  Mon Aug  2 13:40:53 2010        (r210767)
@@ -1,3 +1,4 @@
+287
 
            value  ------------- Distribution ------------- count    
              < 0 |                                         0        

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d  
Mon Aug  2 13:40:19 2010        (r210766)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d  
Mon Aug  2 13:40:53 2010        (r210767)
@@ -20,20 +20,19 @@
  */
 
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident  "%Z%%M% %I%     %E% SMI"
-
-
 /*
  * ASSERTION:
- *      Positive stddev() test
+ *     Positive stddev() test
  *
  * SECTION: Aggregations/Aggregations
  *
  * NOTES: This is a simple verifiable positive test of the stddev() function.
+ *     printa() for one aggregation, default printing behavior for the other
+ *     so that we exercise both code paths.
  */
 
 #pragma D option quiet
@@ -60,5 +59,6 @@ BEGIN
        @b = stddev(-5000000700);
        @b = stddev(-5000000800);
        @b = stddev(-5000000900);
+       printa("%...@d\n", @a);
        exit(0);
 }

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out  
    Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out  
    Mon Aug  2 13:40:53 2010        (r210767)
@@ -1,3 +1,3 @@
+287
 
               287
-              287

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java
       Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java
       Mon Aug  2 13:40:53 2010        (r210767)
@@ -20,10 +20,8 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
- *
- * ident       "%Z%%M% %I%     %E% SMI"
  */
 
 import org.opensolaris.os.dtrace.*;
@@ -70,7 +68,7 @@ public class TestFunctionLookup {
                            long addr = (Long)address;
                            f = consumer.lookupKernelFunction(addr);
                        }
-                       if (f.equals("genunix`setrun")) {
+                       if (f.equals("genunix`cv_wakeup")) {
                            System.out.println(f);
                            done = true;
                        }

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java
 Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java)
@@ -0,0 +1,252 @@
+/*
+ * 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 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+import org.opensolaris.os.dtrace.*;
+import java.util.*;
+
+/**
+ * Assert getAggregate() can explicitly specify the anonymous aggregation.
+ */
+public class TestGetAggregate {
+    static final String programString =
+           "profile:::tick-50ms" +
+           "{" +
+           "        @ = count();" +
+           "        @a = count();" +
+           "}";
+
+    static final String ANONYMOUS_AGGREGATION = "";
+    static final int TICK = 50;
+    static final int EXPECTED_TICKS = 3;
+    static final int INTERVALS = 4;
+
+    static void
+    testIncluded(Consumer consumer, String ... aggregationNames)
+           throws DTraceException, InterruptedException
+    {
+       Aggregate aggregate;
+       Set <String> included = new HashSet <String> ();
+       int n = 1;
+
+       for (String name : aggregationNames) {
+           included.add(name);
+       }
+
+       // Wait up to a full second to obtain aggregate data. Without a
+       // time limit, we'll loop forever if no aggregation was
+       // successfully included.
+       do {
+           Thread.sleep(TICK);
+           aggregate = consumer.getAggregate(included, null);
+       } while (aggregate.asMap().isEmpty() && n++ < (1000 / TICK));
+
+       for (String name : included) {
+           if (aggregate.getAggregation(name) == null) {
+               throw new IllegalStateException("@" + name +
+                       " was explicitly included but did not appear " +
+                       "in the aggregate");
+           }
+       }
+       for (Aggregation a : aggregate.getAggregations()) {
+           if (!included.contains(a.getName())) {
+               throw new IllegalStateException("@" + a.getName() +
+                       " was not explicitly included but appeared " +
+                       "in the aggregate anyway");
+           }
+       }
+
+       if (!consumer.isRunning()) {
+           throw new IllegalStateException("consumer exited");
+       }
+    }
+
+    static void
+    testCleared(Consumer consumer, String ... aggregationNames)
+           throws DTraceException, InterruptedException
+    {
+       Aggregate aggregate;
+       AggregationRecord rec;
+       long value;
+       Long firstValue;
+       int n = 1;
+       Map <String, Long> firstValues = new HashMap <String, Long> ();
+       Set <String> cleared = new HashSet <String> ();
+
+       for (String name : aggregationNames) {
+           cleared.add(name);
+       }
+
+       do {
+           Thread.sleep(TICK);
+           aggregate = consumer.getAggregate(null, cleared);
+       } while (aggregate.asMap().isEmpty() && n++ < (1000 / TICK));
+       n = 1;
+
+       do {
+           Thread.sleep(TICK * EXPECTED_TICKS);
+           aggregate = consumer.getAggregate(null, cleared);
+
+           for (Aggregation a : aggregate.getAggregations()) {
+               if (!firstValues.containsKey(a.getName())) {
+                   rec = a.getRecord(Tuple.EMPTY);
+                   value = rec.getValue().getValue().longValue();
+                   firstValues.put(a.getName(), value);
+               }
+           }
+       } while (consumer.isRunning() && n++ < INTERVALS);
+
+       for (Aggregation a : aggregate.getAggregations()) {
+           rec = a.getRecord(Tuple.EMPTY);
+           value = rec.getValue().getValue().longValue();
+           firstValue = firstValues.get(a.getName());
+
+           if (cleared.contains(a.getName())) {
+               // last value should be about the same as first value
+               if (value > (firstValue * 2)) {
+                   throw new IllegalStateException(
+                           "@" + a.getName() + " should have " +
+                           "been cleared but instead grew from " +
+                           firstValue + " to " + value);
+               }
+           } else {
+               // last value should be about (INTERVALS * firstValue)
+               if (value < (firstValue * 2)) {
+                   throw new IllegalStateException(
+                           "@" + a.getName() + " should have " +
+                           "accumulated a running total but " +
+                           "instead went from " +
+                           firstValue + " to " + value);
+               }
+           }
+       }
+
+       if (!consumer.isRunning()) {
+           throw new IllegalStateException("consumer exited");
+       }
+    }
+
+    static Integer includedStatus;
+    static Integer clearedStatus;
+
+    static void
+    startIncludedTest()
+    {
+       final Consumer consumer = new LocalConsumer();
+       consumer.addConsumerListener(new ConsumerAdapter() {
+           public void consumerStarted(ConsumerEvent e) {
+               new Thread(new Runnable() {
+                   public void run() {
+                       try {
+                           testIncluded(consumer, ANONYMOUS_AGGREGATION);
+                           includedStatus = 0;
+                       } catch (Exception e) {
+                           includedStatus = 1;
+                           e.printStackTrace();
+                       } finally {
+                           consumer.abort();
+                       }
+                   }
+               }).start();
+           }
+       });
+
+       try {
+           consumer.open();
+           consumer.setOption(Option.aggrate, Option.millis(TICK));
+           consumer.compile(programString);
+           consumer.enable();
+           consumer.go();
+       } catch (Exception e) {
+           includedStatus = 1;
+           e.printStackTrace();
+       }
+    }
+
+    static void
+    startClearedTest()
+    {
+       final Consumer consumer = new LocalConsumer();
+       consumer.addConsumerListener(new ConsumerAdapter() {
+           public void consumerStarted(ConsumerEvent e) {
+               new Thread(new Runnable() {
+                   public void run() {
+                       try {
+                           testCleared(consumer, ANONYMOUS_AGGREGATION);
+                           clearedStatus = 0;
+                       } catch (Exception e) {
+                           clearedStatus = 1;
+                           e.printStackTrace();
+                       } finally {
+                           consumer.abort();
+                       }
+                   }
+               }).start();
+           }
+       });
+
+       try {
+           consumer.open();
+           consumer.setOption(Option.aggrate, Option.millis(TICK));
+           consumer.compile(programString);
+           consumer.enable();
+           consumer.go();
+       } catch (Exception e) {
+           clearedStatus = 1;
+           e.printStackTrace();
+       }
+    }
+
+    public static void
+    main(String[] args)
+    {
+       startIncludedTest();
+
+       do {
+           try {
+               Thread.sleep(TICK);
+           } catch (InterruptedException e) {
+               e.printStackTrace();
+           }
+       } while (includedStatus == null);
+
+       startClearedTest();
+
+       do {
+           try {
+               Thread.sleep(TICK);
+           } catch (InterruptedException e) {
+               e.printStackTrace();
+           }
+       } while (clearedStatus == null);
+
+       if (includedStatus != 0 || clearedStatus != 0) {
+           System.out.println("Failure");
+           System.exit(1);
+       }
+
+       System.out.println("Success");
+    }
+}

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out
        Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out
        Mon Aug  2 13:40:53 2010        (r210767)
@@ -1,3 +1,3 @@
-genunix`setrun
+genunix`cv_wakeup
 3
 tst.FunctionLookup.exe`f1

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh
      Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh)
@@ -0,0 +1,36 @@
+#!/bin/ksh -p
+#
+# 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 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+############################################################################
+# ASSERTION:
+#      getAggregate() can explicitly specify the anonymous aggregation
+#
+# SECTION: Java API
+#
+############################################################################
+
+java -cp test.jar TestGetAggregate

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh 
(from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh 
    Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh)
@@ -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 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+if [ $# != 1 ]; then
+       echo expected one argument: '<'dtrace-path'>'
+       exit 2
+fi
+
+dtrace=$1
+
+$dtrace -ln 'syscall::*$1:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall::$1*:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall::re$1*:entry' ad | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall::$1l*:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall::p$1[0-9][0-9]:entry' read | awk '{print $(NF-1),$NF}' | \
+ sort
+
+exit $status

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
 Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out)
@@ -0,0 +1,15 @@
+FUNCTION NAME
+pread entry
+read entry
+FUNCTION NAME
+read entry
+readlink entry
+readv entry
+FUNCTION NAME
+read entry
+readlink entry
+readv entry
+FUNCTION NAME
+readlink entry
+FUNCTION NAME
+pread64 entry

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe 
(from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.coverage.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe 
(from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh
    Mon Aug  2 13:40:53 2010        (r210767, copy of r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh)
@@ -0,0 +1,41 @@
+#!/bin/ksh -p
+#
+# 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 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+if [ $# != 1 ]; then
+       echo expected one argument: '<'dtrace-path'>'
+       exit 2
+fi
+
+dtrace=$1
+
+#
+# Make sure we kill a process if the dtrace(1M) command fails.
+#
+
+rc=`$dtrace -c date -n jarod 2>/dev/null | /usr/bin/wc -l`
+
+exit $rc

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh   
    Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh   
    Mon Aug  2 13:40:53 2010        (r210767)
@@ -21,11 +21,9 @@
 #
 
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident        "%Z%%M% %I%     %E% SMI"
-#
 
 if [ $# != 1 ]; then
        echo expected one argument: '<'dtrace-path'>'
@@ -40,7 +38,7 @@ dtrace=$1
 # (and therefore 'libc' and 'libc.so') as it's definitely there.
 #
 
-for lib in libc libc.so libc.so.1; do
+for lib in libc libc.so libc.so.1 'lib[c]*'; do
        sleep 60 &
        pid=$!
        dtrace -n "pid$pid:$lib::entry" -n 'tick-2s{exit(0);}'

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.available.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.available.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe
 (from r210759, 
vendor/opensolaris/dist/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe)
==============================================================================
Binary file (source and/or target). No diff available.

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d
==============================================================================
--- 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d    
    Mon Aug  2 13:40:19 2010        (r210766)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printa/tst.basics.d    
    Mon Aug  2 13:40:53 2010        (r210767)
@@ -20,15 +20,13 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident  "%Z%%M% %I%     %E% SMI"
-
 /*
  * ASSERTION:
- *  Test the basic formatting of all the supported kinds of aggregations.
+ *     Test the basic formatting of all the supported kinds of aggregations.
  *

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to