From ed4977d45de8e0657a7af263cc871e3f097a529a Mon Sep 17 00:00:00 2001 From: mm Date: Sat, 30 Jun 2012 07:46:38 +0000 Subject: [PATCH] Update illumos/dist to revision 13742:b6bbdd77139c ZFS bits will follow in a separate commit --- cmd/dtrace/test/cmd/jdtrace/JDTrace.java | 11 +- cmd/dtrace/test/cmd/jdtrace/exception.lst | 6 +- cmd/dtrace/test/cmd/jdtrace/jdtrace.c | 18 +- cmd/dtrace/test/cmd/scripts/dtest.pl | 45 +- cmd/dtrace/test/cmd/scripts/dtfailures.ksh | 42 + cmd/dtrace/test/tst/common/aggs/tst.subr.d | 4 +- .../test/tst/common/buffering/tst.resize1.d | 8 - .../test/tst/common/buffering/tst.resize2.d | 8 - .../common/funcs/err.D_PROTO_ARG.tolower.d | 30 + .../common/funcs/err.D_PROTO_ARG.toupper.d | 30 + .../common/funcs/err.D_PROTO_LEN.tolower.d | 30 + .../funcs/err.D_PROTO_LEN.tolowertoomany.d | 30 + .../common/funcs/err.D_PROTO_LEN.toupper.d | 30 + .../funcs/err.D_PROTO_LEN.touppertoomany.d | 30 + .../test/tst/common/funcs/tst.lltostrbase.d | 80 + .../tst/common/funcs/tst.lltostrbase.d.out | 302 +++ .../test/tst/common/funcs/tst.tolower.d | 66 + .../test/tst/common/funcs/tst.toupper.d | 66 + .../tst/common/include/tst.includefirst.ksh | 76 + .../test/tst/common/ip/get.ipv4remote.pl | 3 +- .../test/tst/common/ip/get.ipv6remote.pl | 3 +- .../test/tst/common/ip/tst.ipv4localtcp.ksh | 2 +- .../test/tst/common/ip/tst.ipv4remotetcp.ksh | 2 +- .../test/tst/common/ip/tst.localtcpstate.ksh | 2 +- .../test/tst/common/ip/tst.remotetcpstate.ksh | 2 +- .../tst/common/java_api/src/TestBean.java | 47 +- .../test/tst/common/java_api/tst.Bean.ksh.out | 6 + .../err.D_LLQUANT_FACTOREVEN.nodivide.d | 29 + .../err.D_LLQUANT_FACTOREVEN.notfactor.d | 29 + .../llquantize/err.D_LLQUANT_FACTORMATCH.d | 30 + .../llquantize/err.D_LLQUANT_FACTORNSTEPS.d | 29 + .../llquantize/err.D_LLQUANT_FACTORSMALL.d | 29 + .../llquantize/err.D_LLQUANT_FACTORTYPE.d | 30 + .../llquantize/err.D_LLQUANT_FACTORVAL.d | 29 + .../llquantize/err.D_LLQUANT_HIGHMATCH.d | 30 + .../llquantize/err.D_LLQUANT_HIGHTYPE.d | 30 + .../common/llquantize/err.D_LLQUANT_HIGHVAL.d | 29 + .../llquantize/err.D_LLQUANT_LOWMATCH.d | 30 + .../common/llquantize/err.D_LLQUANT_LOWTYPE.d | 30 + .../common/llquantize/err.D_LLQUANT_LOWVAL.d | 29 + .../llquantize/err.D_LLQUANT_MAGRANGE.d | 29 + .../llquantize/err.D_LLQUANT_MAGTOOBIG.d | 29 + .../llquantize/err.D_LLQUANT_NSTEPMATCH.d | 30 + .../llquantize/err.D_LLQUANT_NSTEPTYPE.d | 30 + .../llquantize/err.D_LLQUANT_NSTEPVAL.d | 29 + .../test/tst/common/llquantize/tst.bases.d | 46 + .../tst/common/llquantize/tst.bases.d.out | 177 ++ .../test/tst/common/llquantize/tst.basic.d | 38 + .../tst/common/llquantize/tst.basic.d.out | 25 + .../test/tst/common/llquantize/tst.negorder.d | 62 + .../tst/common/llquantize/tst.negorder.d.out | 148 ++ .../test/tst/common/llquantize/tst.negvalue.d | 38 + .../tst/common/llquantize/tst.negvalue.d.out | 25 + .../test/tst/common/llquantize/tst.normal.d | 40 + .../tst/common/llquantize/tst.normal.d.out | 26 + .../test/tst/common/llquantize/tst.range.d | 38 + .../tst/common/llquantize/tst.range.d.out | 29 + .../test/tst/common/llquantize/tst.steps.d | 52 + .../tst/common/llquantize/tst.steps.d.out | 2033 +++++++++++++++++ .../test/tst/common/llquantize/tst.trunc.d | 49 + .../tst/common/llquantize/tst.trunc.d.out | 34 + .../test/tst/common/mdb/tst.dtracedcmd.ksh | 4 +- .../test/tst/common/misc/tst.include.ksh | 35 +- .../tst/common/misc/tst.macroglob.ksh.out | 3 + .../test/tst/common/misc/tst.schrock.ksh | 12 +- .../test/tst/common/pid/tst.provregex1.ksh | 5 +- .../test/tst/common/pid/tst.provregex2.ksh | 9 +- .../test/tst/common/pid/tst.provregex3.ksh | 7 +- .../test/tst/common/pid/tst.provregex4.ksh | 9 +- .../tst/common/pragma/tst.libdepsepdir.ksh | 76 + .../tst/common/print/err.D_PRINT_DYN.bad.d | 29 + .../tst/common/print/err.D_PRINT_VOID.bad.d | 29 + .../tst/common/print/err.D_PROTO_LEN.bad.d | 29 + cmd/dtrace/test/tst/common/print/tst.array.d | 62 + .../test/tst/common/print/tst.array.d.out | 23 + .../test/tst/common/print/tst.bitfield.d | 49 + .../test/tst/common/print/tst.bitfield.d.out | 6 + .../test/tst/common/print/tst.primitive.d | 45 + .../test/tst/common/print/tst.primitive.d.out | 11 + cmd/dtrace/test/tst/common/print/tst.struct.d | 59 + .../test/tst/common/print/tst.struct.d.out | 12 + .../tst/common/printa/tst.largeusersym.ksh | 2 +- .../test/tst/common/privs/tst.noprivdrop.ksh | 72 + .../tst/common/privs/tst.noprivrestrict.ksh | 61 + cmd/dtrace/test/tst/common/privs/tst.tick.ksh | 55 + .../test/tst/common/profile-n/tst.ufunc.ksh | 6 +- .../test/tst/common/profile-n/tst.umod.ksh | 3 +- .../test/tst/common/profile-n/tst.usym.ksh | 3 +- .../tst/common/safety/tst.violentdeath.ksh | 3 +- .../sizeof/err.D_SIZEOF_TYPE.badstruct.d | 30 + .../tst/common/trace/err.D_TRACE_DYN.bad.d | 29 + .../tst/common/tracemem/err.D_TRACEMEM_ARGS.d | 29 + .../common/tracemem/err.D_TRACEMEM_DYNSIZE.d | 30 + .../test/tst/common/tracemem/tst.dynsize.d | 45 + .../tst/common/tracemem/tst.dynsize.d.out | 1313 +++++++++++ .../test/tst/common/tracemem/tst.smallsize.d | 32 + .../tst/common/tracemem/tst.smallsize.d.out | 4 + .../test/tst/common/usdt/tst.badguess.ksh | 5 +- .../test/tst/common/usdt/tst.corruptenv.ksh | 4 +- .../test/tst/common/usdt/tst.dlclose1.ksh | 15 +- .../test/tst/common/usdt/tst.dlclose2.ksh | 15 +- .../test/tst/common/usdt/tst.dlclose3.ksh | 15 +- .../test/tst/common/usdt/tst.eliminate.ksh | 5 +- .../test/tst/common/usdt/tst.enabled.ksh | 5 +- .../test/tst/common/usdt/tst.enabled2.ksh | 5 +- .../test/tst/common/usdt/tst.entryreturn.ksh | 5 +- cmd/dtrace/test/tst/common/usdt/tst.fork.ksh | 5 +- .../test/tst/common/usdt/tst.guess32.ksh | 5 +- .../test/tst/common/usdt/tst.guess64.ksh | 5 +- .../test/tst/common/usdt/tst.header.ksh | 5 +- .../test/tst/common/usdt/tst.include.ksh | 3 +- .../test/tst/common/usdt/tst.linkpriv.ksh | 5 +- .../test/tst/common/usdt/tst.linkunpriv.ksh | 5 +- .../test/tst/common/usdt/tst.multiple.ksh | 5 +- .../test/tst/common/usdt/tst.nodtrace.ksh | 5 +- .../test/tst/common/usdt/tst.noreap.ksh | 128 ++ .../test/tst/common/usdt/tst.noreapring.ksh | 124 + .../test/tst/common/usdt/tst.onlyenabled.ksh | 5 +- cmd/dtrace/test/tst/common/usdt/tst.reap.ksh | 115 + .../test/tst/common/usdt/tst.reeval.ksh | 5 +- .../test/tst/common/usdt/tst.static.ksh | 5 +- .../test/tst/common/usdt/tst.static2.ksh | 5 +- cmd/dtrace/test/tst/common/usdt/tst.user.ksh | 5 +- .../test/tst/common/ustack/tst.spin.ksh | 3 +- .../test/tst/sparc/usdt/tst.tailcall.ksh | 3 +- lib/libctf/common/ctf_lib.c | 6 +- lib/libdtrace/common/dt_aggregate.c | 89 +- lib/libdtrace/common/dt_cc.c | 302 ++- lib/libdtrace/common/dt_consume.c | 186 +- lib/libdtrace/common/dt_decl.c | 14 +- lib/libdtrace/common/dt_dof.c | 14 +- lib/libdtrace/common/dt_errtags.h | 30 +- lib/libdtrace/common/dt_ident.c | 8 +- lib/libdtrace/common/dt_impl.h | 13 + lib/libdtrace/common/dt_map.c | 172 +- lib/libdtrace/common/dt_open.c | 32 +- lib/libdtrace/common/dt_options.c | 27 - lib/libdtrace/common/dt_parser.c | 31 +- lib/libdtrace/common/dt_pragma.c | 49 +- lib/libdtrace/common/dt_print.c | 648 ++++++ lib/libdtrace/common/dt_printf.c | 12 + lib/libdtrace/common/dt_program.c | 2 + lib/libdtrace/common/dt_string.c | 17 - lib/libdtrace/common/dt_string.h | 12 +- lib/libdtrace/common/dt_subr.c | 6 +- lib/libdtrace/common/dtrace.h | 19 +- lib/libdtrace/i386/regs.d.in | 151 +- tools/ctf/cvt/dwarf.c | 9 +- 148 files changed, 8578 insertions(+), 386 deletions(-) create mode 100755 cmd/dtrace/test/cmd/scripts/dtfailures.ksh create mode 100644 cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d create mode 100644 cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d create mode 100644 cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d create mode 100644 cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d create mode 100644 cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d create mode 100644 cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d create mode 100644 cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d create mode 100644 cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out create mode 100644 cmd/dtrace/test/tst/common/funcs/tst.tolower.d create mode 100644 cmd/dtrace/test/tst/common/funcs/tst.toupper.d create mode 100644 cmd/dtrace/test/tst/common/include/tst.includefirst.ksh create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.notfactor.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORMATCH.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORNSTEPS.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORSMALL.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORTYPE.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORVAL.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHMATCH.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHTYPE.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHVAL.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWMATCH.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWTYPE.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWVAL.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGRANGE.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPMATCH.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPTYPE.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPVAL.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.bases.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.bases.d.out create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.basic.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.basic.d.out create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.negorder.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.negorder.d.out create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d.out create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.normal.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.normal.d.out create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.range.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.range.d.out create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.steps.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.steps.d.out create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.trunc.d create mode 100644 cmd/dtrace/test/tst/common/llquantize/tst.trunc.d.out create mode 100644 cmd/dtrace/test/tst/common/pragma/tst.libdepsepdir.ksh create mode 100644 cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d create mode 100644 cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d create mode 100644 cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d create mode 100644 cmd/dtrace/test/tst/common/print/tst.array.d create mode 100644 cmd/dtrace/test/tst/common/print/tst.array.d.out create mode 100644 cmd/dtrace/test/tst/common/print/tst.bitfield.d create mode 100644 cmd/dtrace/test/tst/common/print/tst.bitfield.d.out create mode 100644 cmd/dtrace/test/tst/common/print/tst.primitive.d create mode 100644 cmd/dtrace/test/tst/common/print/tst.primitive.d.out create mode 100644 cmd/dtrace/test/tst/common/print/tst.struct.d create mode 100644 cmd/dtrace/test/tst/common/print/tst.struct.d.out create mode 100755 cmd/dtrace/test/tst/common/privs/tst.noprivdrop.ksh create mode 100755 cmd/dtrace/test/tst/common/privs/tst.noprivrestrict.ksh create mode 100755 cmd/dtrace/test/tst/common/privs/tst.tick.ksh create mode 100644 cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d create mode 100644 cmd/dtrace/test/tst/common/trace/err.D_TRACE_DYN.bad.d create mode 100644 cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d create mode 100644 cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d create mode 100644 cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d create mode 100644 cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out create mode 100644 cmd/dtrace/test/tst/common/tracemem/tst.smallsize.d create mode 100644 cmd/dtrace/test/tst/common/tracemem/tst.smallsize.d.out create mode 100644 cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh create mode 100644 cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh create mode 100644 cmd/dtrace/test/tst/common/usdt/tst.reap.ksh create mode 100644 lib/libdtrace/common/dt_print.c diff --git a/cmd/dtrace/test/cmd/jdtrace/JDTrace.java b/cmd/dtrace/test/cmd/jdtrace/JDTrace.java index 3c5654d88df..f8c9ab7337d 100644 --- a/cmd/dtrace/test/cmd/jdtrace/JDTrace.java +++ b/cmd/dtrace/test/cmd/jdtrace/JDTrace.java @@ -23,7 +23,6 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * - * ident "%Z%%M% %I% %E% SMI" */ import org.opensolaris.os.dtrace.*; import java.io.*; @@ -303,6 +302,7 @@ public class JDTrace { Distribution.Bucket bucket; int b1 = 0; // first displayed bucket int b2 = d.size() - 1; // last displayed bucket + for (; (b1 <= b2) && (d.get(b1).getFrequency() == 0); ++b1); // If possible, get one bucket before the first non-zero // bucket and one bucket after the last. @@ -337,9 +337,14 @@ public class JDTrace { v = bucket.getFrequency(); b = bucket.getMin(); - if (d instanceof LinearDistribution) { + if ((d instanceof LinearDistribution) || + (d instanceof LogLinearDistribution)) { if (b == Long.MIN_VALUE) { - String lt = "< " + ((LinearDistribution)d).getBase(); + String lt; + if (d instanceof LinearDistribution) + lt = "< " + ((LinearDistribution)d).getBase(); + else + lt = "< " + ((LogLinearDistribution)d).getBase(); out.printf("%16s ", lt); } else if (bucket.getMax() == Long.MAX_VALUE) { String ge = ">= " + b; diff --git a/cmd/dtrace/test/cmd/jdtrace/exception.lst b/cmd/dtrace/test/cmd/jdtrace/exception.lst index 261f8707c18..19fc3aca51c 100644 --- a/cmd/dtrace/test/cmd/jdtrace/exception.lst +++ b/cmd/dtrace/test/cmd/jdtrace/exception.lst @@ -23,7 +23,6 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" # Exception list: names tests that are bypassed when running in Java # mode (relative to /opt/SUNWdtrt/tst) @@ -52,14 +51,17 @@ common/usdt/tst.enabled.ksh common/usdt/tst.enabled2.ksh common/usdt/tst.entryreturn.ksh common/usdt/tst.fork.ksh -common/usdt/tst.header.ksh common/usdt/tst.guess32.ksh common/usdt/tst.guess64.ksh +common/usdt/tst.header.ksh common/usdt/tst.linkpriv.ksh common/usdt/tst.linkunpriv.ksh common/usdt/tst.multiple.ksh common/usdt/tst.nodtrace.ksh +common/usdt/tst.noreap.ksh +common/usdt/tst.noreapring.ksh common/usdt/tst.onlyenabled.ksh +common/usdt/tst.reap.ksh common/usdt/tst.reeval.ksh common/usdt/tst.static.ksh common/usdt/tst.static2.ksh diff --git a/cmd/dtrace/test/cmd/jdtrace/jdtrace.c b/cmd/dtrace/test/cmd/jdtrace/jdtrace.c index 095126569cc..81a2d9bcdfd 100644 --- a/cmd/dtrace/test/cmd/jdtrace/jdtrace.c +++ b/cmd/dtrace/test/cmd/jdtrace/jdtrace.c @@ -22,25 +22,27 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2011, Richard Lowe */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include +#include #include int main(int argc, char **argv) { - int i, ac, has64; + int i, ac; char **av, **p; + char isaname[16]; ac = argc + 3; av = p = alloca(sizeof (char *) * ac); - *p++ = "java"; + *p++ = "/usr/java/bin/java"; *p++ = "-jar"; *p++ = "/opt/SUNWdtrt/lib/java/jdtrace.jar"; @@ -52,9 +54,9 @@ main(int argc, char **argv) } p[i] = NULL; - (void) execvp(av[0], av); - - perror("exec failed"); + if (sysinfo(SI_ARCHITECTURE_64, isaname, sizeof (isaname)) != -1) + asprintf(av, "/usr/java/bin/%s/java", isaname); - return (0); + (void) execv(av[0], av); + err(1, "exec failed"); } diff --git a/cmd/dtrace/test/cmd/scripts/dtest.pl b/cmd/dtrace/test/cmd/scripts/dtest.pl index 3f2442950bb..f11cf6916c5 100644 --- a/cmd/dtrace/test/cmd/scripts/dtest.pl +++ b/cmd/dtrace/test/cmd/scripts/dtest.pl @@ -25,6 +25,9 @@ # Use is subject to license terms. # +# +# Copyright (c) 2011, Joyent, Inc. All rights reserved. +# require 5.8.4; use File::Find; @@ -35,8 +38,8 @@ use Cwd 'abs_path'; $PNAME = $0; $PNAME =~ s:.*/::; -$OPTSTR = 'abd:fghi:jlnqsx:'; -$USAGE = "Usage: $PNAME [-abfghjlnqs] [-d dir] [-i isa] " +$OPTSTR = 'abd:fFghi:jlnqsx:'; +$USAGE = "Usage: $PNAME [-abfFghjlnqs] [-d dir] [-i isa] " . "[-x opt[=arg]] [file | dir ...]\n"; ($MACH = `uname -p`) =~ s/\W*\n//; ($PLATFORM = `uname -i`) =~ s/\W*\n//; @@ -69,6 +72,20 @@ sub dirname { return $i == -1 ? '.' : $i == 0 ? '/' : $s; } +sub inpath +{ + my ($exec) = (@_); + my @path = File::Spec->path(); + + for my $dir (@path) { + if (-x $dir . "/" . $exec) { + return 1; + } + } + + return 0; +} + sub usage { print $USAGE; @@ -77,6 +94,7 @@ sub usage print "\t -d specify directory for test results files and cores\n"; print "\t -g enable libumem debugging when running tests\n"; print "\t -f force bypassed tests to run\n"; + print "\t -F force tests to be run, even if missing dependencies\n"; print "\t -h display verbose usage message\n"; print "\t -i specify ISA to test instead of isaexec(3C) default\n"; print "\t -j execute test suite using jdtrace (Java API) only\n"; @@ -240,8 +258,8 @@ sub run_tests { my($failed) = $errs; my($total) = 0; - die "$PNAME: $dtrace not found\n" unless (-x "$dtrace"); - logmsg($dtrace . "\n"); + die "$PNAME: $dtrace not found; aborting\n" unless (-x "$dtrace"); + logmsg("executing tests using $dtrace ...\n"); load_exceptions($exceptions_path); @@ -546,9 +564,20 @@ $dt_bin = '/opt/SUNWdtrt/bin'; $defdir = -d $dt_tst ? $dt_tst : '.'; $bindir = -d $dt_bin ? $dt_bin : '.'; +if (!$opt_F) { + my @dependencies = ("gcc", "make", "java", "perl"); + + for my $dep (@dependencies) { + if (!inpath($dep)) { + die "$PNAME: '$dep' not found (use -F to force run)\n"; + } + } +} + 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'; @@ -562,7 +591,7 @@ if ($opt_j || $opt_n || $opt_i) { push(@dtrace_cmds, $jdtrace_path) if ($opt_j); push(@dtrace_cmds, "/usr/sbin/$opt_i/dtrace") if ($opt_i); } else { - @dtrace_cmds = ($dtrace_path, $jdtrace_path); + @dtrace_cmds = ($dtrace_path); } if ($opt_d) { @@ -589,12 +618,6 @@ if ($opt_g) { $ENV{'LD_PRELOAD'} = 'libumem.so'; } -# -# Ensure that $PATH contains a cc(1) so that we can execute the -# test programs that require compilation of C code. -# -$ENV{'PATH'} = $ENV{'PATH'} . ':/ws/onnv-tools/SUNWspro/SS11/bin'; - if ($opt_b) { logmsg("badioctl'ing ... "); diff --git a/cmd/dtrace/test/cmd/scripts/dtfailures.ksh b/cmd/dtrace/test/cmd/scripts/dtfailures.ksh new file mode 100755 index 00000000000..89ba955871a --- /dev/null +++ b/cmd/dtrace/test/cmd/scripts/dtfailures.ksh @@ -0,0 +1,42 @@ +#!/usr/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 (c) 2011, Joyent, Inc. All rights reserved. +# + +let failure=0 + +printf "%-3s %-10s %-31s %s\n" "#" "KIND" "TEST" "DETAILS" + +while [[ -d failure.$failure ]]; do + dir=failure.$failure + tst=`cat $dir/README | head -1 | nawk '{ print $2 }'` + kind=`basename $(dirname $tst)` + name=`basename $tst` + cols=$(expr `tput cols` - 47) + details=`tail -1 $dir/*.err | cut -c1-$cols` + printf "%-3d %-10s %-31s " $failure $kind $name + echo $details + let failure=failure+1 +done + diff --git a/cmd/dtrace/test/tst/common/aggs/tst.subr.d b/cmd/dtrace/test/tst/common/aggs/tst.subr.d index 5ca1f1ef938..bb0739f0d38 100644 --- a/cmd/dtrace/test/tst/common/aggs/tst.subr.d +++ b/cmd/dtrace/test/tst/common/aggs/tst.subr.d @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #define INTFUNC(x) \ @@ -98,6 +96,8 @@ INTFUNC(ntohll(0x1234567890abcdefL)) STRFUNC(inet_ntoa((ipaddr_t *)alloca(sizeof (ipaddr_t)))) STRFUNC(inet_ntoa6((in6_addr_t *)alloca(sizeof (in6_addr_t)))) STRFUNC(inet_ntop(AF_INET, (void *)alloca(sizeof (ipaddr_t)))) +STRFUNC(toupper("foo")) +STRFUNC(tolower("BAR")) BEGIN /subr == DIF_SUBR_MAX + 1/ diff --git a/cmd/dtrace/test/tst/common/buffering/tst.resize1.d b/cmd/dtrace/test/tst/common/buffering/tst.resize1.d index 396a8081162..ca8ad44a621 100644 --- a/cmd/dtrace/test/tst/common/buffering/tst.resize1.d +++ b/cmd/dtrace/test/tst/common/buffering/tst.resize1.d @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * ASSERTION: * Checks that setting "bufresize" to "auto" will cause buffer @@ -34,14 +32,8 @@ * SECTION: Buffers and Buffering/Buffer Resizing Policy; * Options and Tunables/bufsize; * Options and Tunables/bufresize - * - * NOTES: - * We use the undocumented "preallocate" option to make sure dtrace(1M) - * has enough space in its heap to allocate a buffer as large as the - * kernel's trace buffer. */ -#pragma D option preallocate=100t #pragma D option bufresize=auto #pragma D option bufsize=100t diff --git a/cmd/dtrace/test/tst/common/buffering/tst.resize2.d b/cmd/dtrace/test/tst/common/buffering/tst.resize2.d index 50b814b1bfc..ddb97c89ec1 100644 --- a/cmd/dtrace/test/tst/common/buffering/tst.resize2.d +++ b/cmd/dtrace/test/tst/common/buffering/tst.resize2.d @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * ASSERTION: * Checks that setting "bufresize" to "auto" will cause buffer @@ -34,14 +32,8 @@ * SECTION: Buffers and Buffering/Buffer Resizing Policy; * Options and Tunables/aggsize; * Options and Tunables/bufresize - * - * NOTES: - * We use the undocumented "preallocate" option to make sure dtrace(1M) - * has enough space in its heap to allocate a buffer as large as the - * kernel's trace buffer. */ -#pragma D option preallocate=100t #pragma D option bufresize=auto #pragma D option aggsize=100t diff --git a/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d new file mode 100644 index 00000000000..9d4e40b4dbd --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower(2152006)); + exit(1); +} diff --git a/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d new file mode 100644 index 00000000000..2c1389bdeb4 --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(toupper(timestamp)); + exit(1); +} diff --git a/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d new file mode 100644 index 00000000000..7d9c27f902d --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower()); + exit(1); +} diff --git a/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d new file mode 100644 index 00000000000..afaa7f976ed --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower("dory", "eel", "roughy")); + exit(1); +} diff --git a/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d new file mode 100644 index 00000000000..9658f6a7544 --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(toupper()); + exit(1); +} diff --git a/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d new file mode 100644 index 00000000000..bee8697fb2c --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower("haino", "tylo")); + exit(1); +} diff --git a/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d b/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d new file mode 100644 index 00000000000..1afe37dc689 --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d @@ -0,0 +1,80 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +int64_t val[int]; + +BEGIN +{ + base = -2; + i = 0; + val[i++] = -10; + val[i++] = -1; + val[i++] = 0; + val[i++] = 10; + val[i++] = 100; + val[i++] = 1000; + val[i++] = (1LL << 62); + maxval = i; + i = 0; +} + +tick-1ms +/i < maxval/ +{ + printf("base %2d of %20d: ", base, val[i]); +} + +tick-1ms +/i < maxval/ +{ + printf(" %s\n", lltostr(val[i], base)); +} + +ERROR +{ + printf(" \n"); +} + +tick-1ms +/i < maxval/ +{ + i++; +} + +tick-1ms +/i == maxval/ +{ + i = 0; + base++; +} + +tick-1ms +/base > 40/ +{ + exit(0); +} + diff --git a/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out b/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out new file mode 100644 index 00000000000..94e22577123 --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out @@ -0,0 +1,302 @@ +base -2 of -10: +base -2 of -1: +base -2 of 0: +base -2 of 10: +base -2 of 100: +base -2 of 1000: +base -2 of 4611686018427387904: +base -1 of -10: +base -1 of -1: +base -1 of 0: +base -1 of 10: +base -1 of 100: +base -1 of 1000: +base -1 of 4611686018427387904: +base 0 of -10: +base 0 of -1: +base 0 of 0: +base 0 of 10: +base 0 of 100: +base 0 of 1000: +base 0 of 4611686018427387904: +base 1 of -10: +base 1 of -1: +base 1 of 0: +base 1 of 10: +base 1 of 100: +base 1 of 1000: +base 1 of 4611686018427387904: +base 2 of -10: 1111111111111111111111111111111111111111111111111111111111110110 +base 2 of -1: 1111111111111111111111111111111111111111111111111111111111111111 +base 2 of 0: 0 +base 2 of 10: 1010 +base 2 of 100: 1100100 +base 2 of 1000: 1111101000 +base 2 of 4611686018427387904: 100000000000000000000000000000000000000000000000000000000000000 +base 3 of -10: 11112220022122120101211020120210210211120 +base 3 of -1: 11112220022122120101211020120210210211220 +base 3 of 0: 0 +base 3 of 10: 101 +base 3 of 100: 10201 +base 3 of 1000: 1101001 +base 3 of 4611686018427387904: 1010201120122220002201001122110012110111 +base 4 of -10: 33333333333333333333333333333312 +base 4 of -1: 33333333333333333333333333333333 +base 4 of 0: 0 +base 4 of 10: 22 +base 4 of 100: 1210 +base 4 of 1000: 33220 +base 4 of 4611686018427387904: 10000000000000000000000000000000 +base 5 of -10: 2214220303114400424121122411 +base 5 of -1: 2214220303114400424121122430 +base 5 of 0: 0 +base 5 of 10: 20 +base 5 of 100: 400 +base 5 of 1000: 13000 +base 5 of 4611686018427387904: 302141200402211214402403104 +base 6 of -10: 3520522010102100444244410 +base 6 of -1: 3520522010102100444244423 +base 6 of 0: 0 +base 6 of 10: 14 +base 6 of 100: 244 +base 6 of 1000: 4344 +base 6 of 4611686018427387904: 550120301313313111041104 +base 7 of -10: 45012021522523134134556 +base 7 of -1: 45012021522523134134601 +base 7 of 0: 0 +base 7 of 10: 13 +base 7 of 100: 202 +base 7 of 1000: 2626 +base 7 of 4611686018427387904: 11154003640456024361134 +base 8 of -10: 01777777777777777777766 +base 8 of -1: 01777777777777777777777 +base 8 of 0: 0 +base 8 of 10: 012 +base 8 of 100: 0144 +base 8 of 1000: 01750 +base 8 of 4611686018427387904: 0400000000000000000000 +base 9 of -10: 145808576354216723746 +base 9 of -1: 145808576354216723756 +base 9 of 0: 0 +base 9 of 10: 11 +base 9 of 100: 121 +base 9 of 1000: 1331 +base 9 of 4611686018427387904: 33646586081048405414 +base 10 of -10: -10 +base 10 of -1: -1 +base 10 of 0: 0 +base 10 of 10: 10 +base 10 of 100: 100 +base 10 of 1000: 1000 +base 10 of 4611686018427387904: 4611686018427387904 +base 11 of -10: 335500516a429071276 +base 11 of -1: 335500516a429071284 +base 11 of 0: 0 +base 11 of 10: a +base 11 of 100: 91 +base 11 of 1000: 82a +base 11 of 4611686018427387904: 9140013181078458a4 +base 12 of -10: 839365134a2a240706 +base 12 of -1: 839365134a2a240713 +base 12 of 0: 0 +base 12 of 10: a +base 12 of 100: 84 +base 12 of 1000: 6b4 +base 12 of 4611686018427387904: 20b3a733a268670194 +base 13 of -10: 219505a9511a867b66 +base 13 of -1: 219505a9511a867b72 +base 13 of 0: 0 +base 13 of 10: a +base 13 of 100: 79 +base 13 of 1000: 5bc +base 13 of 4611686018427387904: 6c1349246a2881c84 +base 14 of -10: 8681049adb03db166 +base 14 of -1: 8681049adb03db171 +base 14 of 0: 0 +base 14 of 10: a +base 14 of 100: 72 +base 14 of 1000: 516 +base 14 of 4611686018427387904: 219038263637dd3c4 +base 15 of -10: 2c1d56b648c6cd106 +base 15 of -1: 2c1d56b648c6cd110 +base 15 of 0: 0 +base 15 of 10: a +base 15 of 100: 6a +base 15 of 1000: 46a +base 15 of 4611686018427387904: a7e8ce189a933404 +base 16 of -10: 0xfffffffffffffff6 +base 16 of -1: 0xffffffffffffffff +base 16 of 0: 0x0 +base 16 of 10: 0xa +base 16 of 100: 0x64 +base 16 of 1000: 0x3e8 +base 16 of 4611686018427387904: 0x4000000000000000 +base 17 of -10: 67979g60f5428008 +base 17 of -1: 67979g60f5428010 +base 17 of 0: 0 +base 17 of 10: a +base 17 of 100: 5f +base 17 of 1000: 37e +base 17 of 4611686018427387904: 1a6a6ca03e10a88d +base 18 of -10: 2d3fgb0b9cg4bd26 +base 18 of -1: 2d3fgb0b9cg4bd2f +base 18 of 0: 0 +base 18 of 10: a +base 18 of 100: 5a +base 18 of 1000: 31a +base 18 of 4611686018427387904: c588bdbfgd12ge4 +base 19 of -10: 141c8786h1ccaag7 +base 19 of -1: 141c8786h1ccaagg +base 19 of 0: 0 +base 19 of 10: a +base 19 of 100: 55 +base 19 of 1000: 2ec +base 19 of 4611686018427387904: 5ecbb6fi9h7ggi9 +base 20 of -10: b53bjh07be4dj06 +base 20 of -1: b53bjh07be4dj0f +base 20 of 0: 0 +base 20 of 10: a +base 20 of 100: 50 +base 20 of 1000: 2a0 +base 20 of 4611686018427387904: 2g5hjj51hib39f4 +base 21 of -10: 5e8g4ggg7g56di6 +base 21 of -1: 5e8g4ggg7g56dif +base 21 of 0: 0 +base 21 of 10: a +base 21 of 100: 4g +base 21 of 1000: 25d +base 21 of 4611686018427387904: 18hjgjjjhebh8f4 +base 22 of -10: 2l4lf104353j8k6 +base 22 of -1: 2l4lf104353j8kf +base 22 of 0: 0 +base 22 of 10: a +base 22 of 100: 4c +base 22 of 1000: 21a +base 22 of 4611686018427387904: g6g95gc0hha7g4 +base 23 of -10: 1ddh88h2782i50j +base 23 of -1: 1ddh88h2782i515 +base 23 of 0: 0 +base 23 of 10: a +base 23 of 100: 48 +base 23 of 1000: 1kb +base 23 of 4611686018427387904: 93a22467dc4chd +base 24 of -10: l12ee5fn0ji1i6 +base 24 of -1: l12ee5fn0ji1if +base 24 of 0: 0 +base 24 of 10: a +base 24 of 100: 44 +base 24 of 1000: 1hg +base 24 of 4611686018427387904: 566ffd9ni4mcag +base 25 of -10: c9c336o0mlb7e6 +base 25 of -1: c9c336o0mlb7ef +base 25 of 0: 0 +base 25 of 10: a +base 25 of 100: 40 +base 25 of 1000: 1f0 +base 25 of 4611686018427387904: 32970kc6bo2kg4 +base 26 of -10: 7b7n2pcniokcg6 +base 26 of -1: 7b7n2pcniokcgf +base 26 of 0: 0 +base 26 of 10: a +base 26 of 100: 3m +base 26 of 1000: 1cc +base 26 of 4611686018427387904: 1m8c769io65344 +base 27 of -10: 4eo8hfam6fllmf +base 27 of -1: 4eo8hfam6fllmo +base 27 of 0: 0 +base 27 of 10: a +base 27 of 100: 3j +base 27 of 1000: 1a1 +base 27 of 4611686018427387904: 13jfho2j1hc5cd +base 28 of -10: 2nc6j26l66rho6 +base 28 of -1: 2nc6j26l66rhof +base 28 of 0: 0 +base 28 of 10: a +base 28 of 100: 3g +base 28 of 1000: 17k +base 28 of 4611686018427387904: jo1ilfj8fkpd4 +base 29 of -10: 1n3rsh11f098re +base 29 of -1: 1n3rsh11f098rn +base 29 of 0: 0 +base 29 of 10: a +base 29 of 100: 3d +base 29 of 1000: 15e +base 29 of 4611686018427387904: d0slim0b029e6 +base 30 of -10: 14l9lkmo30o406 +base 30 of -1: 14l9lkmo30o40f +base 30 of 0: 0 +base 30 of 10: a +base 30 of 100: 3a +base 30 of 1000: 13a +base 30 of 4611686018427387904: 8k9rrkl0ml104 +base 31 of -10: nd075ib45k866 +base 31 of -1: nd075ib45k86f +base 31 of 0: 0 +base 31 of 10: a +base 31 of 100: 37 +base 31 of 1000: 118 +base 31 of 4611686018427387904: 5qfh94i8okhh4 +base 32 of -10: fvvvvvvvvvvvm +base 32 of -1: fvvvvvvvvvvvv +base 32 of 0: 0 +base 32 of 10: a +base 32 of 100: 34 +base 32 of 1000: v8 +base 32 of 4611686018427387904: 4000000000000 +base 33 of -10: b1w8p7j5q9r66 +base 33 of -1: b1w8p7j5q9r6f +base 33 of 0: 0 +base 33 of 10: a +base 33 of 100: 31 +base 33 of 1000: ua +base 33 of 4611686018427387904: 2p826a4q6ivi4 +base 34 of -10: 7orp63sh4dph8 +base 34 of -1: 7orp63sh4dphh +base 34 of 0: 0 +base 34 of 10: a +base 34 of 100: 2w +base 34 of 1000: te +base 34 of 4611686018427387904: 1vnvr0wl9ketu +base 35 of -10: 5g24a25twkwf6 +base 35 of -1: 5g24a25twkwff +base 35 of 0: 0 +base 35 of 10: a +base 35 of 100: 2u +base 35 of 1000: sk +base 35 of 4611686018427387904: 1cqrb9a7gvgu4 +base 36 of -10: 3w5e11264sgs6 +base 36 of -1: 3w5e11264sgsf +base 36 of 0: 0 +base 36 of 10: a +base 36 of 100: 2s +base 36 of 1000: rs +base 36 of 4611686018427387904: z1ci99jj7474 +base 37 of -10: +base 37 of -1: +base 37 of 0: +base 37 of 10: +base 37 of 100: +base 37 of 1000: +base 37 of 4611686018427387904: +base 38 of -10: +base 38 of -1: +base 38 of 0: +base 38 of 10: +base 38 of 100: +base 38 of 1000: +base 38 of 4611686018427387904: +base 39 of -10: +base 39 of -1: +base 39 of 0: +base 39 of 10: +base 39 of 100: +base 39 of 1000: +base 39 of 4611686018427387904: +base 40 of -10: +base 40 of -1: +base 40 of 0: +base 40 of 10: +base 40 of 100: +base 40 of 1000: +base 40 of 4611686018427387904: + diff --git a/cmd/dtrace/test/tst/common/funcs/tst.tolower.d b/cmd/dtrace/test/tst/common/funcs/tst.tolower.d new file mode 100644 index 00000000000..2539630e9d6 --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/tst.tolower.d @@ -0,0 +1,66 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; + + input[i] = "ahi"; + expected[i++] = "ahi"; + + input[i] = "MaHi!"; + expected[i++] = "mahi!"; + + input[i] = " Nase-5"; + expected[i++] = " nase-5"; + + input[i] = "!@#$%"; + expected[i++] = "!@#$%"; + + i = 0; +} + +tick-1ms +/input[i] != NULL && (this->out = tolower(input[i])) != expected[i]/ +{ + printf("expected tolower(\"%s\") to be \"%s\"; found \"%s\"\n", + input[i], expected[i], this->out); + exit(1); +} + +tick-1ms +/input[i] != NULL/ +{ + printf("tolower(\"%s\") is \"%s\", as expected\n", + input[i], expected[i]); +} + +tick-1ms +/input[i++] == NULL/ +{ + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/funcs/tst.toupper.d b/cmd/dtrace/test/tst/common/funcs/tst.toupper.d new file mode 100644 index 00000000000..fd803f2ef0a --- /dev/null +++ b/cmd/dtrace/test/tst/common/funcs/tst.toupper.d @@ -0,0 +1,66 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; + + input[i] = "ahi"; + expected[i++] = "AHI"; + + input[i] = "MaHi!"; + expected[i++] = "MAHI!"; + + input[i] = " dace-9"; + expected[i++] = " DACE-9"; + + input[i] = "!@#$%"; + expected[i++] = "!@#$%"; + + i = 0; +} + +tick-1ms +/input[i] != NULL && (this->out = toupper(input[i])) != expected[i]/ +{ + printf("expected toupper(\"%s\") to be \"%s\"; found \"%s\"\n", + input[i], expected[i], this->out); + exit(1); +} + +tick-1ms +/input[i] != NULL/ +{ + printf("toupper(\"%s\") is \"%s\", as expected\n", + input[i], expected[i]); +} + +tick-1ms +/input[i++] == NULL/ +{ + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/include/tst.includefirst.ksh b/cmd/dtrace/test/tst/common/include/tst.includefirst.ksh new file mode 100644 index 00000000000..b8240d64367 --- /dev/null +++ b/cmd/dtrace/test/tst/common/include/tst.includefirst.ksh @@ -0,0 +1,76 @@ +# +# 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 (c) 2011, Joyent Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# This test verifies that we only use the first entry of a file with a given +# name in the library path +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +firstinc=${TMPDIR:-/tmp}/firstinc.$$ +secondinc=${TMPDIR:-/tmp}/secondinc.$$ +expexit=23 + +setup_include() +{ + mkdir $firstinc + mkdir $secondinc + cat > $firstinc/lib.d < $secondinc/lib.d < test.pl <<-EOPERL close \$s; EOPERL -$dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin < test.pl <<-EOPERL close \$s; EOPERL -$dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin < test.pl <<-EOPERL close \$s; EOPERL -$dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin < test.pl <<-EOPERL close \$s; EOPERL -$dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin < buckets = + new ArrayList < Distribution.Bucket > (); + + for (order = 0; order < low; order++) + value *= factor; + + bucket = new Distribution.Bucket(Long.MIN_VALUE, (value - 1), 0); + buckets.add(bucket); + + next = value * factor; + step = (next > nsteps) ? (next / nsteps) : 1; + + while (order <= high) { + bucket = new Distribution.Bucket(value, value + step - 1, 5); + buckets.add(bucket); + + if ((value += step) != next) + continue; + + next = value * factor; + step = (next > nsteps) ? (next / nsteps) : 1; + order++; + } + + bucket = new Distribution.Bucket(value, Long.MAX_VALUE, 0); + buckets.add(bucket); + + LogLinearDistribution d = new LogLinearDistribution(factor, low, high, + nsteps, 0, buckets); + return d; + } + public static Option getOption() { diff --git a/cmd/dtrace/test/tst/common/java_api/tst.Bean.ksh.out b/cmd/dtrace/test/tst/common/java_api/tst.Bean.ksh.out index cf24c672645..141dcccb1ca 100644 --- a/cmd/dtrace/test/tst/common/java_api/tst.Bean.ksh.out +++ b/cmd/dtrace/test/tst/common/java_api/tst.Bean.ksh.out @@ -158,6 +158,12 @@ LinearDistribution: LinearDistribution: encoded: class org.opensolaris.os.dtrace.LinearDistribution[base = 1, step = 10, buckets = [org.opensolaris.os.dtrace.Distribution$Bucket[min = 1, max = 10, frequency = 0], org.opensolaris.os.dtrace.Distribution$Bucket[min = 11, max = 20, frequency = 1], org.opensolaris.os.dtrace.Distribution$Bucket[min = 21, max = 30, frequency = 2], org.opensolaris.os.dtrace.Distribution$Bucket[min = 31, max = 40, frequency = 3], org.opensolaris.os.dtrace.Distribution$Bucket[min = 41, max = 50, frequency = 4], org.opensolaris.os.dtrace.Distribution$Bucket[min = 51, max = 60, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 61, max = 70, frequency = 6], org.opensolaris.os.dtrace.Distribution$Bucket[min = 71, max = 80, frequency = 7], org.opensolaris.os.dtrace.Distribution$Bucket[min = 81, max = 90, frequency = 8], org.opensolaris.os.dtrace.Distribution$Bucket[min = 91, max = 100, frequency = 9], org.opensolaris.os.dtrace.Distribution$Bucket[min = 101, max = 9223372036854775807, frequency = 0]], total = 45.0] decoded: class org.opensolaris.os.dtrace.LinearDistribution[base = 1, step = 10, buckets = [org.opensolaris.os.dtrace.Distribution$Bucket[min = 1, max = 10, frequency = 0], org.opensolaris.os.dtrace.Distribution$Bucket[min = 11, max = 20, frequency = 1], org.opensolaris.os.dtrace.Distribution$Bucket[min = 21, max = 30, frequency = 2], org.opensolaris.os.dtrace.Distribution$Bucket[min = 31, max = 40, frequency = 3], org.opensolaris.os.dtrace.Distribution$Bucket[min = 41, max = 50, frequency = 4], org.opensolaris.os.dtrace.Distribution$Bucket[min = 51, max = 60, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 61, max = 70, frequency = 6], org.opensolaris.os.dtrace.Distribution$Bucket[min = 71, max = 80, frequency = 7], org.opensolaris.os.dtrace.Distribution$Bucket[min = 81, max = 90, frequency = 8], org.opensolaris.os.dtrace.Distribution$Bucket[min = 91, max = 100, frequency = 9], org.opensolaris.os.dtrace.Distribution$Bucket[min = 101, max = 9223372036854775807, frequency = 0]], total = 45.0] +LogLinearDistribution: + serialized: org.opensolaris.os.dtrace.Distribution[buckets = [org.opensolaris.os.dtrace.Distribution$Bucket[min = -9223372036854775808, max = 0, frequency = 0], org.opensolaris.os.dtrace.Distribution$Bucket[min = 1, max = 1, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 2, max = 3, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 4, max = 7, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 8, max = 15, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 16, max = 31, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 32, max = 63, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 64, max = 127, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 128, max = 9223372036854775807, frequency = 0]], total = 35.0] + deserialized: org.opensolaris.os.dtrace.Distribution[buckets = [org.opensolaris.os.dtrace.Distribution$Bucket[min = -9223372036854775808, max = 0, frequency = 0], org.opensolaris.os.dtrace.Distribution$Bucket[min = 1, max = 1, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 2, max = 3, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 4, max = 7, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 8, max = 15, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 16, max = 31, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 32, max = 63, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 64, max = 127, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 128, max = 9223372036854775807, frequency = 0]], total = 35.0] +LogLinearDistribution: + encoded: org.opensolaris.os.dtrace.Distribution[buckets = [org.opensolaris.os.dtrace.Distribution$Bucket[min = -9223372036854775808, max = 0, frequency = 0], org.opensolaris.os.dtrace.Distribution$Bucket[min = 1, max = 1, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 2, max = 3, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 4, max = 7, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 8, max = 15, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 16, max = 31, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 32, max = 63, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 64, max = 127, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 128, max = 9223372036854775807, frequency = 0]], total = 35.0] + decoded: org.opensolaris.os.dtrace.Distribution[buckets = [org.opensolaris.os.dtrace.Distribution$Bucket[min = -9223372036854775808, max = 0, frequency = 0], org.opensolaris.os.dtrace.Distribution$Bucket[min = 1, max = 1, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 2, max = 3, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 4, max = 7, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 8, max = 15, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 16, max = 31, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 32, max = 63, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 64, max = 127, frequency = 5], org.opensolaris.os.dtrace.Distribution$Bucket[min = 128, max = 9223372036854775807, frequency = 0]], total = 35.0] Option: serialized: org.opensolaris.os.dtrace.Option[name = aggrate, value = 1s] deserialized: org.opensolaris.os.dtrace.Option[name = aggrate, value = 1s] diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d new file mode 100644 index 00000000000..b11d2828bb7 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 25); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.notfactor.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.notfactor.d new file mode 100644 index 00000000000..c8af7d920f3 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.notfactor.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 30); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORMATCH.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORMATCH.d new file mode 100644 index 00000000000..0404b4ffbdc --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORMATCH.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 10); + @ = llquantize(0, 3, 0, 10, 81); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORNSTEPS.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORNSTEPS.d new file mode 100644 index 00000000000..fd6b0e67f26 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORNSTEPS.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 7); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORSMALL.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORSMALL.d new file mode 100644 index 00000000000..7074f5f6650 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORSMALL.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 1, 0, 10, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORTYPE.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORTYPE.d new file mode 100644 index 00000000000..ea39c7e38ca --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORTYPE.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + this->doogle = 10; + @ = llquantize(0, this->doogle, 0, 10, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORVAL.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORVAL.d new file mode 100644 index 00000000000..a1ad20f28a6 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORVAL.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 65537, 0, 10, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHMATCH.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHMATCH.d new file mode 100644 index 00000000000..46bf0e6fc20 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHMATCH.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 10); + @ = llquantize(0, 10, 0, 11, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHTYPE.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHTYPE.d new file mode 100644 index 00000000000..fee786d39e0 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHTYPE.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + this->doogle = 10; + @ = llquantize(0, 10, 0, this->doogle, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHVAL.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHVAL.d new file mode 100644 index 00000000000..531ab0b6641 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHVAL.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, -1, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWMATCH.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWMATCH.d new file mode 100644 index 00000000000..126429a2996 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWMATCH.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 10); + @ = llquantize(0, 10, 1, 10, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWTYPE.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWTYPE.d new file mode 100644 index 00000000000..2a9b2efdc8d --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWTYPE.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + this->doogle = 0; + @ = llquantize(0, 10, this->doogle, 10, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWVAL.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWVAL.d new file mode 100644 index 00000000000..e1045d83bdc --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWVAL.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, -1, 10, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGRANGE.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGRANGE.d new file mode 100644 index 00000000000..9852c1ab953 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGRANGE.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 10, 0, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.d new file mode 100644 index 00000000000..c7076308446 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 100, 10); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPMATCH.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPMATCH.d new file mode 100644 index 00000000000..77b4d8a84d2 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPMATCH.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 10); + @ = llquantize(0, 10, 0, 10, 100); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPTYPE.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPTYPE.d new file mode 100644 index 00000000000..4eb9b2f06d0 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPTYPE.d @@ -0,0 +1,30 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + this->doogle = 10; + @ = llquantize(0, 10, 0, 10, this->doogle); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPVAL.d b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPVAL.d new file mode 100644 index 00000000000..3855beb4adc --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPVAL.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(123, 10, 0, 10, 123456); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.bases.d b/cmd/dtrace/test/tst/common/llquantize/tst.bases.d new file mode 100644 index 00000000000..e3a6ff1a8cd --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.bases.d @@ -0,0 +1,46 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +tick-1ms +/i++ <= 100/ +{ + @two = llquantize(i, 2, 0, 6, 2); + @three = llquantize(i, 3, 0, 1, 9); + @four = llquantize(i, 4, 0, 1, 4); + @five = llquantize(i, 5, 0, 1, 25); + @six = llquantize(i, 6, 0, 3, 12); + @seven = llquantize(i, 7, 0, 1, 7); + @eight = llquantize(i, 8, 0, 1, 16); + @nine = llquantize(i, 9, 0, 1, 9); + @ten = llquantize(i, 10, 0, 1, 10); +} + +tick-1ms +/i > 100/ +{ + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.bases.d.out b/cmd/dtrace/test/tst/common/llquantize/tst.bases.d.out new file mode 100644 index 00000000000..1b207bf6f29 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.bases.d.out @@ -0,0 +1,177 @@ + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 |@ 2 + 4 |@@ 4 + 8 |@@@ 8 + 16 |@@@@@@ 16 + 32 |@@@@@@@@@@@@@ 32 + 64 |@@@@@@@@@@@@@@@ 38 + >= 128 | 0 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + >= 9 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 93 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 |@@ 4 + 8 |@@ 4 + 12 |@@ 4 + >= 16 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 86 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 | 1 + 10 | 1 + 11 | 1 + 12 | 1 + 13 | 1 + 14 | 1 + 15 | 1 + 16 | 1 + 17 | 1 + 18 | 1 + 19 | 1 + 20 | 1 + 21 | 1 + 22 | 1 + 23 | 1 + 24 | 1 + >= 25 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 77 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 |@ 3 + 9 |@ 3 + 12 |@ 3 + 15 |@ 3 + 18 |@ 3 + 21 |@ 3 + 24 |@ 3 + 27 |@ 3 + 30 |@ 3 + 33 |@ 3 + 36 |@@@@@@@ 18 + 54 |@@@@@@@ 18 + 72 |@@@@@@@ 18 + 90 |@@@@@ 12 + 108 | 0 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 |@@@ 7 + 14 |@@@ 7 + 21 |@@@ 7 + 28 |@@@ 7 + 35 |@@@ 7 + 42 |@@@ 7 + >= 49 |@@@@@@@@@@@@@@@@@@@@@ 53 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 |@@ 4 + 12 |@@ 4 + 16 |@@ 4 + 20 |@@ 4 + 24 |@@ 4 + 28 |@@ 4 + 32 |@@ 4 + 36 |@@ 4 + 40 |@@ 4 + 44 |@@ 4 + 48 |@@ 4 + 52 |@@ 4 + 56 |@@ 4 + 60 |@@ 4 + >= 64 |@@@@@@@@@@@@@@@ 38 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 |@@@@ 9 + 18 |@@@@ 9 + 27 |@@@@ 9 + 36 |@@@@ 9 + 45 |@@@@ 9 + 54 |@@@@ 9 + 63 |@@@@ 9 + 72 |@@@@ 9 + >= 81 |@@@@@@@@ 21 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 | 1 + 10 |@@@@ 10 + 20 |@@@@ 10 + 30 |@@@@ 10 + 40 |@@@@ 10 + 50 |@@@@ 10 + 60 |@@@@ 10 + 70 |@@@@ 10 + 80 |@@@@ 10 + 90 |@@@@ 10 + >= 100 |@ 2 + diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.basic.d b/cmd/dtrace/test/tst/common/llquantize/tst.basic.d new file mode 100644 index 00000000000..57b6ed881b7 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.basic.d @@ -0,0 +1,38 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +tick-1ms +/i++ <= 100/ +{ + @ = llquantize(i, 10, 0, 10, 10); +} + +tick-1ms +/i > 100/ +{ + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.basic.d.out b/cmd/dtrace/test/tst/common/llquantize/tst.basic.d.out new file mode 100644 index 00000000000..9a7b288966f --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.basic.d.out @@ -0,0 +1,25 @@ + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 | 1 + 10 |@@@@ 10 + 20 |@@@@ 10 + 30 |@@@@ 10 + 40 |@@@@ 10 + 50 |@@@@ 10 + 60 |@@@@ 10 + 70 |@@@@ 10 + 80 |@@@@ 10 + 90 |@@@@ 10 + 100 |@ 2 + 200 | 0 + diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d b/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d new file mode 100644 index 00000000000..b18c688bc75 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d @@ -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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + a = 7; + b = 13; + val = (-a * b) + a; +} + +tick-1ms +{ + incr = val % b; + val += a; +} + +tick-1ms +/val == 0/ +{ + val += a; +} + +tick-1ms +/incr != 0/ +{ + i++; + @llquanty[i] = llquantize(1, 10, 0, 10, 10, incr); +} + +tick-1ms +/incr == 0/ +{ + printf("Ordering of llquantize() with some negative weights:\n"); + printa(@llquanty); + printf("\n"); + + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d.out b/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d.out new file mode 100644 index 00000000000..ac0f3cb300e --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d.out @@ -0,0 +1,148 @@ +Ordering of llquantize() with some negative weights: + + 2 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 2 | 0 + + 4 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 2 | 0 + + 6 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 2 | 0 + + 8 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 2 | 0 + + 10 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 2 | 0 + + 12 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 2 | 0 + + 1 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 2 | 0 + + 3 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 2 | 0 + + 5 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + 2 | 0 + + 7 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + 2 | 0 + + 9 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + 2 | 0 + + 11 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + 2 | 0 + + 14 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 2 | 0 + + 16 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 2 | 0 + + 18 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 2 | 0 + + 20 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + 2 | 0 + + 22 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 2 | 0 + + 24 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + 2 | 0 + + 13 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + 2 | 0 + + 15 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + 2 | 0 + + 17 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + 2 | 0 + + 19 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + 2 | 0 + + 21 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + 2 | 0 + + 23 + value ------------- Distribution ------------- count + < 1 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + 2 | 0 + + + diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d b/cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d new file mode 100644 index 00000000000..c74d019cb18 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d @@ -0,0 +1,38 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +tick-1ms +/i++ <= 100/ +{ + @ = llquantize(i, 10, 0, 10, 10, 50 - i); +} + +tick-1ms +/i > 100/ +{ + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d.out b/cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d.out new file mode 100644 index 00000000000..04b0d5e1bde --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d.out @@ -0,0 +1,25 @@ + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 49 + 2 | 48 + 3 | 47 + 4 | 46 + 5 | 45 + 6 | 44 + 7 | 43 + 8 | 42 + 9 | 41 + 10 |@@@ 355 + 20 |@@ 255 + 30 |@ 155 + 40 | 55 + 50 | -45 + 60 @| -145 + 70 @@| -245 + 80 @@@| -345 + 90 @@@| -445 + 100 @| -101 + 200 | 0 + diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.normal.d b/cmd/dtrace/test/tst/common/llquantize/tst.normal.d new file mode 100644 index 00000000000..7097ba7d33c --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.normal.d @@ -0,0 +1,40 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +tick-1ms +/i++ <= 100/ +{ + @ = llquantize(i, 10, 0, 10, 10); +} + +tick-1ms +/i > 100/ +{ + normalize(@, 10); + printa(@); + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.normal.d.out b/cmd/dtrace/test/tst/common/llquantize/tst.normal.d.out new file mode 100644 index 00000000000..3b1f41b218f --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.normal.d.out @@ -0,0 +1,26 @@ + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 0 + 2 | 0 + 3 | 0 + 4 | 0 + 5 | 0 + 6 | 0 + 7 | 0 + 8 | 0 + 9 | 0 + 10 |@@@@ 1 + 20 |@@@@ 1 + 30 |@@@@ 1 + 40 |@@@@ 1 + 50 |@@@@ 1 + 60 |@@@@ 1 + 70 |@@@@ 1 + 80 |@@@@ 1 + 90 |@@@@ 1 + 100 |@ 0 + 200 | 0 + + diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.range.d b/cmd/dtrace/test/tst/common/llquantize/tst.range.d new file mode 100644 index 00000000000..e2882b3f8e3 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.range.d @@ -0,0 +1,38 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + @["Screven"] = llquantize(0, 10, 1, 2, 20, 25); + @["Katz"] = llquantize(1, 10, 1, 2, 20, -100); + @["Kurian"] = llquantize(7, 10, 1, 2, 20, 15); + @["Rozwat"] = llquantize(49, 10, 1, 2, 20, 15); + @["Fowler"] = llquantize(343, 10, 1, 2, 20, 150); + + printa(@); + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.range.d.out b/cmd/dtrace/test/tst/common/llquantize/tst.range.d.out new file mode 100644 index 00000000000..c6736c6fc15 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.range.d.out @@ -0,0 +1,29 @@ + + Katz + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -100 + 10 | 0 + + Kurian + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 15 + 10 | 0 + + Screven + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 25 + 10 | 0 + + Rozwat + value ------------- Distribution ------------- count + 40 | 0 + 45 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 15 + 50 | 0 + + Fowler + value ------------- Distribution ------------- count + 250 | 0 + 300 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 150 + 350 | 0 + + diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.steps.d b/cmd/dtrace/test/tst/common/llquantize/tst.steps.d new file mode 100644 index 00000000000..f00659e5751 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.steps.d @@ -0,0 +1,52 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +tick-1ms +/i++ <= 100/ +{ + @ = llquantize(i, 10, 0, 10, 20); + @hunid = llquantize(i * 10, 10, 0, 10, 100); + @large = llquantize(i * 100, 10, 0, 10, 1000); +} + +tick-1ms +/i > 100/ +{ + exit(0); +} + +END +{ + printf("20 steps:\n"); + printa(@); + + printf("100 steps:\n"); + printa(@hunid); + + printf("1000 steps:\n"); + printa(@large); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.steps.d.out b/cmd/dtrace/test/tst/common/llquantize/tst.steps.d.out new file mode 100644 index 00000000000..08885515c00 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.steps.d.out @@ -0,0 +1,2033 @@ +20 steps: + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 | 1 + 10 |@@ 5 + 15 |@@ 5 + 20 |@@ 5 + 25 |@@ 5 + 30 |@@ 5 + 35 |@@ 5 + 40 |@@ 5 + 45 |@@ 5 + 50 |@@ 5 + 55 |@@ 5 + 60 |@@ 5 + 65 |@@ 5 + 70 |@@ 5 + 75 |@@ 5 + 80 |@@ 5 + 85 |@@ 5 + 90 |@@ 5 + 95 |@@ 5 + 100 |@ 2 + 150 | 0 + +100 steps: + + + value ------------- Distribution ------------- count + 9 | 0 + 10 | 1 + 11 | 0 + 12 | 0 + 13 | 0 + 14 | 0 + 15 | 0 + 16 | 0 + 17 | 0 + 18 | 0 + 19 | 0 + 20 | 1 + 21 | 0 + 22 | 0 + 23 | 0 + 24 | 0 + 25 | 0 + 26 | 0 + 27 | 0 + 28 | 0 + 29 | 0 + 30 | 1 + 31 | 0 + 32 | 0 + 33 | 0 + 34 | 0 + 35 | 0 + 36 | 0 + 37 | 0 + 38 | 0 + 39 | 0 + 40 | 1 + 41 | 0 + 42 | 0 + 43 | 0 + 44 | 0 + 45 | 0 + 46 | 0 + 47 | 0 + 48 | 0 + 49 | 0 + 50 | 1 + 51 | 0 + 52 | 0 + 53 | 0 + 54 | 0 + 55 | 0 + 56 | 0 + 57 | 0 + 58 | 0 + 59 | 0 + 60 | 1 + 61 | 0 + 62 | 0 + 63 | 0 + 64 | 0 + 65 | 0 + 66 | 0 + 67 | 0 + 68 | 0 + 69 | 0 + 70 | 1 + 71 | 0 + 72 | 0 + 73 | 0 + 74 | 0 + 75 | 0 + 76 | 0 + 77 | 0 + 78 | 0 + 79 | 0 + 80 | 1 + 81 | 0 + 82 | 0 + 83 | 0 + 84 | 0 + 85 | 0 + 86 | 0 + 87 | 0 + 88 | 0 + 89 | 0 + 90 | 1 + 91 | 0 + 92 | 0 + 93 | 0 + 94 | 0 + 95 | 0 + 96 | 0 + 97 | 0 + 98 | 0 + 99 | 0 + 100 | 1 + 110 | 1 + 120 | 1 + 130 | 1 + 140 | 1 + 150 | 1 + 160 | 1 + 170 | 1 + 180 | 1 + 190 | 1 + 200 | 1 + 210 | 1 + 220 | 1 + 230 | 1 + 240 | 1 + 250 | 1 + 260 | 1 + 270 | 1 + 280 | 1 + 290 | 1 + 300 | 1 + 310 | 1 + 320 | 1 + 330 | 1 + 340 | 1 + 350 | 1 + 360 | 1 + 370 | 1 + 380 | 1 + 390 | 1 + 400 | 1 + 410 | 1 + 420 | 1 + 430 | 1 + 440 | 1 + 450 | 1 + 460 | 1 + 470 | 1 + 480 | 1 + 490 | 1 + 500 | 1 + 510 | 1 + 520 | 1 + 530 | 1 + 540 | 1 + 550 | 1 + 560 | 1 + 570 | 1 + 580 | 1 + 590 | 1 + 600 | 1 + 610 | 1 + 620 | 1 + 630 | 1 + 640 | 1 + 650 | 1 + 660 | 1 + 670 | 1 + 680 | 1 + 690 | 1 + 700 | 1 + 710 | 1 + 720 | 1 + 730 | 1 + 740 | 1 + 750 | 1 + 760 | 1 + 770 | 1 + 780 | 1 + 790 | 1 + 800 | 1 + 810 | 1 + 820 | 1 + 830 | 1 + 840 | 1 + 850 | 1 + 860 | 1 + 870 | 1 + 880 | 1 + 890 | 1 + 900 | 1 + 910 | 1 + 920 | 1 + 930 | 1 + 940 | 1 + 950 | 1 + 960 | 1 + 970 | 1 + 980 | 1 + 990 | 1 + 1000 |@ 2 + 1100 | 0 + +1000 steps: + + + value ------------- Distribution ------------- count + 99 | 0 + 100 | 1 + 101 | 0 + 102 | 0 + 103 | 0 + 104 | 0 + 105 | 0 + 106 | 0 + 107 | 0 + 108 | 0 + 109 | 0 + 110 | 0 + 111 | 0 + 112 | 0 + 113 | 0 + 114 | 0 + 115 | 0 + 116 | 0 + 117 | 0 + 118 | 0 + 119 | 0 + 120 | 0 + 121 | 0 + 122 | 0 + 123 | 0 + 124 | 0 + 125 | 0 + 126 | 0 + 127 | 0 + 128 | 0 + 129 | 0 + 130 | 0 + 131 | 0 + 132 | 0 + 133 | 0 + 134 | 0 + 135 | 0 + 136 | 0 + 137 | 0 + 138 | 0 + 139 | 0 + 140 | 0 + 141 | 0 + 142 | 0 + 143 | 0 + 144 | 0 + 145 | 0 + 146 | 0 + 147 | 0 + 148 | 0 + 149 | 0 + 150 | 0 + 151 | 0 + 152 | 0 + 153 | 0 + 154 | 0 + 155 | 0 + 156 | 0 + 157 | 0 + 158 | 0 + 159 | 0 + 160 | 0 + 161 | 0 + 162 | 0 + 163 | 0 + 164 | 0 + 165 | 0 + 166 | 0 + 167 | 0 + 168 | 0 + 169 | 0 + 170 | 0 + 171 | 0 + 172 | 0 + 173 | 0 + 174 | 0 + 175 | 0 + 176 | 0 + 177 | 0 + 178 | 0 + 179 | 0 + 180 | 0 + 181 | 0 + 182 | 0 + 183 | 0 + 184 | 0 + 185 | 0 + 186 | 0 + 187 | 0 + 188 | 0 + 189 | 0 + 190 | 0 + 191 | 0 + 192 | 0 + 193 | 0 + 194 | 0 + 195 | 0 + 196 | 0 + 197 | 0 + 198 | 0 + 199 | 0 + 200 | 1 + 201 | 0 + 202 | 0 + 203 | 0 + 204 | 0 + 205 | 0 + 206 | 0 + 207 | 0 + 208 | 0 + 209 | 0 + 210 | 0 + 211 | 0 + 212 | 0 + 213 | 0 + 214 | 0 + 215 | 0 + 216 | 0 + 217 | 0 + 218 | 0 + 219 | 0 + 220 | 0 + 221 | 0 + 222 | 0 + 223 | 0 + 224 | 0 + 225 | 0 + 226 | 0 + 227 | 0 + 228 | 0 + 229 | 0 + 230 | 0 + 231 | 0 + 232 | 0 + 233 | 0 + 234 | 0 + 235 | 0 + 236 | 0 + 237 | 0 + 238 | 0 + 239 | 0 + 240 | 0 + 241 | 0 + 242 | 0 + 243 | 0 + 244 | 0 + 245 | 0 + 246 | 0 + 247 | 0 + 248 | 0 + 249 | 0 + 250 | 0 + 251 | 0 + 252 | 0 + 253 | 0 + 254 | 0 + 255 | 0 + 256 | 0 + 257 | 0 + 258 | 0 + 259 | 0 + 260 | 0 + 261 | 0 + 262 | 0 + 263 | 0 + 264 | 0 + 265 | 0 + 266 | 0 + 267 | 0 + 268 | 0 + 269 | 0 + 270 | 0 + 271 | 0 + 272 | 0 + 273 | 0 + 274 | 0 + 275 | 0 + 276 | 0 + 277 | 0 + 278 | 0 + 279 | 0 + 280 | 0 + 281 | 0 + 282 | 0 + 283 | 0 + 284 | 0 + 285 | 0 + 286 | 0 + 287 | 0 + 288 | 0 + 289 | 0 + 290 | 0 + 291 | 0 + 292 | 0 + 293 | 0 + 294 | 0 + 295 | 0 + 296 | 0 + 297 | 0 + 298 | 0 + 299 | 0 + 300 | 1 + 301 | 0 + 302 | 0 + 303 | 0 + 304 | 0 + 305 | 0 + 306 | 0 + 307 | 0 + 308 | 0 + 309 | 0 + 310 | 0 + 311 | 0 + 312 | 0 + 313 | 0 + 314 | 0 + 315 | 0 + 316 | 0 + 317 | 0 + 318 | 0 + 319 | 0 + 320 | 0 + 321 | 0 + 322 | 0 + 323 | 0 + 324 | 0 + 325 | 0 + 326 | 0 + 327 | 0 + 328 | 0 + 329 | 0 + 330 | 0 + 331 | 0 + 332 | 0 + 333 | 0 + 334 | 0 + 335 | 0 + 336 | 0 + 337 | 0 + 338 | 0 + 339 | 0 + 340 | 0 + 341 | 0 + 342 | 0 + 343 | 0 + 344 | 0 + 345 | 0 + 346 | 0 + 347 | 0 + 348 | 0 + 349 | 0 + 350 | 0 + 351 | 0 + 352 | 0 + 353 | 0 + 354 | 0 + 355 | 0 + 356 | 0 + 357 | 0 + 358 | 0 + 359 | 0 + 360 | 0 + 361 | 0 + 362 | 0 + 363 | 0 + 364 | 0 + 365 | 0 + 366 | 0 + 367 | 0 + 368 | 0 + 369 | 0 + 370 | 0 + 371 | 0 + 372 | 0 + 373 | 0 + 374 | 0 + 375 | 0 + 376 | 0 + 377 | 0 + 378 | 0 + 379 | 0 + 380 | 0 + 381 | 0 + 382 | 0 + 383 | 0 + 384 | 0 + 385 | 0 + 386 | 0 + 387 | 0 + 388 | 0 + 389 | 0 + 390 | 0 + 391 | 0 + 392 | 0 + 393 | 0 + 394 | 0 + 395 | 0 + 396 | 0 + 397 | 0 + 398 | 0 + 399 | 0 + 400 | 1 + 401 | 0 + 402 | 0 + 403 | 0 + 404 | 0 + 405 | 0 + 406 | 0 + 407 | 0 + 408 | 0 + 409 | 0 + 410 | 0 + 411 | 0 + 412 | 0 + 413 | 0 + 414 | 0 + 415 | 0 + 416 | 0 + 417 | 0 + 418 | 0 + 419 | 0 + 420 | 0 + 421 | 0 + 422 | 0 + 423 | 0 + 424 | 0 + 425 | 0 + 426 | 0 + 427 | 0 + 428 | 0 + 429 | 0 + 430 | 0 + 431 | 0 + 432 | 0 + 433 | 0 + 434 | 0 + 435 | 0 + 436 | 0 + 437 | 0 + 438 | 0 + 439 | 0 + 440 | 0 + 441 | 0 + 442 | 0 + 443 | 0 + 444 | 0 + 445 | 0 + 446 | 0 + 447 | 0 + 448 | 0 + 449 | 0 + 450 | 0 + 451 | 0 + 452 | 0 + 453 | 0 + 454 | 0 + 455 | 0 + 456 | 0 + 457 | 0 + 458 | 0 + 459 | 0 + 460 | 0 + 461 | 0 + 462 | 0 + 463 | 0 + 464 | 0 + 465 | 0 + 466 | 0 + 467 | 0 + 468 | 0 + 469 | 0 + 470 | 0 + 471 | 0 + 472 | 0 + 473 | 0 + 474 | 0 + 475 | 0 + 476 | 0 + 477 | 0 + 478 | 0 + 479 | 0 + 480 | 0 + 481 | 0 + 482 | 0 + 483 | 0 + 484 | 0 + 485 | 0 + 486 | 0 + 487 | 0 + 488 | 0 + 489 | 0 + 490 | 0 + 491 | 0 + 492 | 0 + 493 | 0 + 494 | 0 + 495 | 0 + 496 | 0 + 497 | 0 + 498 | 0 + 499 | 0 + 500 | 1 + 501 | 0 + 502 | 0 + 503 | 0 + 504 | 0 + 505 | 0 + 506 | 0 + 507 | 0 + 508 | 0 + 509 | 0 + 510 | 0 + 511 | 0 + 512 | 0 + 513 | 0 + 514 | 0 + 515 | 0 + 516 | 0 + 517 | 0 + 518 | 0 + 519 | 0 + 520 | 0 + 521 | 0 + 522 | 0 + 523 | 0 + 524 | 0 + 525 | 0 + 526 | 0 + 527 | 0 + 528 | 0 + 529 | 0 + 530 | 0 + 531 | 0 + 532 | 0 + 533 | 0 + 534 | 0 + 535 | 0 + 536 | 0 + 537 | 0 + 538 | 0 + 539 | 0 + 540 | 0 + 541 | 0 + 542 | 0 + 543 | 0 + 544 | 0 + 545 | 0 + 546 | 0 + 547 | 0 + 548 | 0 + 549 | 0 + 550 | 0 + 551 | 0 + 552 | 0 + 553 | 0 + 554 | 0 + 555 | 0 + 556 | 0 + 557 | 0 + 558 | 0 + 559 | 0 + 560 | 0 + 561 | 0 + 562 | 0 + 563 | 0 + 564 | 0 + 565 | 0 + 566 | 0 + 567 | 0 + 568 | 0 + 569 | 0 + 570 | 0 + 571 | 0 + 572 | 0 + 573 | 0 + 574 | 0 + 575 | 0 + 576 | 0 + 577 | 0 + 578 | 0 + 579 | 0 + 580 | 0 + 581 | 0 + 582 | 0 + 583 | 0 + 584 | 0 + 585 | 0 + 586 | 0 + 587 | 0 + 588 | 0 + 589 | 0 + 590 | 0 + 591 | 0 + 592 | 0 + 593 | 0 + 594 | 0 + 595 | 0 + 596 | 0 + 597 | 0 + 598 | 0 + 599 | 0 + 600 | 1 + 601 | 0 + 602 | 0 + 603 | 0 + 604 | 0 + 605 | 0 + 606 | 0 + 607 | 0 + 608 | 0 + 609 | 0 + 610 | 0 + 611 | 0 + 612 | 0 + 613 | 0 + 614 | 0 + 615 | 0 + 616 | 0 + 617 | 0 + 618 | 0 + 619 | 0 + 620 | 0 + 621 | 0 + 622 | 0 + 623 | 0 + 624 | 0 + 625 | 0 + 626 | 0 + 627 | 0 + 628 | 0 + 629 | 0 + 630 | 0 + 631 | 0 + 632 | 0 + 633 | 0 + 634 | 0 + 635 | 0 + 636 | 0 + 637 | 0 + 638 | 0 + 639 | 0 + 640 | 0 + 641 | 0 + 642 | 0 + 643 | 0 + 644 | 0 + 645 | 0 + 646 | 0 + 647 | 0 + 648 | 0 + 649 | 0 + 650 | 0 + 651 | 0 + 652 | 0 + 653 | 0 + 654 | 0 + 655 | 0 + 656 | 0 + 657 | 0 + 658 | 0 + 659 | 0 + 660 | 0 + 661 | 0 + 662 | 0 + 663 | 0 + 664 | 0 + 665 | 0 + 666 | 0 + 667 | 0 + 668 | 0 + 669 | 0 + 670 | 0 + 671 | 0 + 672 | 0 + 673 | 0 + 674 | 0 + 675 | 0 + 676 | 0 + 677 | 0 + 678 | 0 + 679 | 0 + 680 | 0 + 681 | 0 + 682 | 0 + 683 | 0 + 684 | 0 + 685 | 0 + 686 | 0 + 687 | 0 + 688 | 0 + 689 | 0 + 690 | 0 + 691 | 0 + 692 | 0 + 693 | 0 + 694 | 0 + 695 | 0 + 696 | 0 + 697 | 0 + 698 | 0 + 699 | 0 + 700 | 1 + 701 | 0 + 702 | 0 + 703 | 0 + 704 | 0 + 705 | 0 + 706 | 0 + 707 | 0 + 708 | 0 + 709 | 0 + 710 | 0 + 711 | 0 + 712 | 0 + 713 | 0 + 714 | 0 + 715 | 0 + 716 | 0 + 717 | 0 + 718 | 0 + 719 | 0 + 720 | 0 + 721 | 0 + 722 | 0 + 723 | 0 + 724 | 0 + 725 | 0 + 726 | 0 + 727 | 0 + 728 | 0 + 729 | 0 + 730 | 0 + 731 | 0 + 732 | 0 + 733 | 0 + 734 | 0 + 735 | 0 + 736 | 0 + 737 | 0 + 738 | 0 + 739 | 0 + 740 | 0 + 741 | 0 + 742 | 0 + 743 | 0 + 744 | 0 + 745 | 0 + 746 | 0 + 747 | 0 + 748 | 0 + 749 | 0 + 750 | 0 + 751 | 0 + 752 | 0 + 753 | 0 + 754 | 0 + 755 | 0 + 756 | 0 + 757 | 0 + 758 | 0 + 759 | 0 + 760 | 0 + 761 | 0 + 762 | 0 + 763 | 0 + 764 | 0 + 765 | 0 + 766 | 0 + 767 | 0 + 768 | 0 + 769 | 0 + 770 | 0 + 771 | 0 + 772 | 0 + 773 | 0 + 774 | 0 + 775 | 0 + 776 | 0 + 777 | 0 + 778 | 0 + 779 | 0 + 780 | 0 + 781 | 0 + 782 | 0 + 783 | 0 + 784 | 0 + 785 | 0 + 786 | 0 + 787 | 0 + 788 | 0 + 789 | 0 + 790 | 0 + 791 | 0 + 792 | 0 + 793 | 0 + 794 | 0 + 795 | 0 + 796 | 0 + 797 | 0 + 798 | 0 + 799 | 0 + 800 | 1 + 801 | 0 + 802 | 0 + 803 | 0 + 804 | 0 + 805 | 0 + 806 | 0 + 807 | 0 + 808 | 0 + 809 | 0 + 810 | 0 + 811 | 0 + 812 | 0 + 813 | 0 + 814 | 0 + 815 | 0 + 816 | 0 + 817 | 0 + 818 | 0 + 819 | 0 + 820 | 0 + 821 | 0 + 822 | 0 + 823 | 0 + 824 | 0 + 825 | 0 + 826 | 0 + 827 | 0 + 828 | 0 + 829 | 0 + 830 | 0 + 831 | 0 + 832 | 0 + 833 | 0 + 834 | 0 + 835 | 0 + 836 | 0 + 837 | 0 + 838 | 0 + 839 | 0 + 840 | 0 + 841 | 0 + 842 | 0 + 843 | 0 + 844 | 0 + 845 | 0 + 846 | 0 + 847 | 0 + 848 | 0 + 849 | 0 + 850 | 0 + 851 | 0 + 852 | 0 + 853 | 0 + 854 | 0 + 855 | 0 + 856 | 0 + 857 | 0 + 858 | 0 + 859 | 0 + 860 | 0 + 861 | 0 + 862 | 0 + 863 | 0 + 864 | 0 + 865 | 0 + 866 | 0 + 867 | 0 + 868 | 0 + 869 | 0 + 870 | 0 + 871 | 0 + 872 | 0 + 873 | 0 + 874 | 0 + 875 | 0 + 876 | 0 + 877 | 0 + 878 | 0 + 879 | 0 + 880 | 0 + 881 | 0 + 882 | 0 + 883 | 0 + 884 | 0 + 885 | 0 + 886 | 0 + 887 | 0 + 888 | 0 + 889 | 0 + 890 | 0 + 891 | 0 + 892 | 0 + 893 | 0 + 894 | 0 + 895 | 0 + 896 | 0 + 897 | 0 + 898 | 0 + 899 | 0 + 900 | 1 + 901 | 0 + 902 | 0 + 903 | 0 + 904 | 0 + 905 | 0 + 906 | 0 + 907 | 0 + 908 | 0 + 909 | 0 + 910 | 0 + 911 | 0 + 912 | 0 + 913 | 0 + 914 | 0 + 915 | 0 + 916 | 0 + 917 | 0 + 918 | 0 + 919 | 0 + 920 | 0 + 921 | 0 + 922 | 0 + 923 | 0 + 924 | 0 + 925 | 0 + 926 | 0 + 927 | 0 + 928 | 0 + 929 | 0 + 930 | 0 + 931 | 0 + 932 | 0 + 933 | 0 + 934 | 0 + 935 | 0 + 936 | 0 + 937 | 0 + 938 | 0 + 939 | 0 + 940 | 0 + 941 | 0 + 942 | 0 + 943 | 0 + 944 | 0 + 945 | 0 + 946 | 0 + 947 | 0 + 948 | 0 + 949 | 0 + 950 | 0 + 951 | 0 + 952 | 0 + 953 | 0 + 954 | 0 + 955 | 0 + 956 | 0 + 957 | 0 + 958 | 0 + 959 | 0 + 960 | 0 + 961 | 0 + 962 | 0 + 963 | 0 + 964 | 0 + 965 | 0 + 966 | 0 + 967 | 0 + 968 | 0 + 969 | 0 + 970 | 0 + 971 | 0 + 972 | 0 + 973 | 0 + 974 | 0 + 975 | 0 + 976 | 0 + 977 | 0 + 978 | 0 + 979 | 0 + 980 | 0 + 981 | 0 + 982 | 0 + 983 | 0 + 984 | 0 + 985 | 0 + 986 | 0 + 987 | 0 + 988 | 0 + 989 | 0 + 990 | 0 + 991 | 0 + 992 | 0 + 993 | 0 + 994 | 0 + 995 | 0 + 996 | 0 + 997 | 0 + 998 | 0 + 999 | 0 + 1000 | 1 + 1010 | 0 + 1020 | 0 + 1030 | 0 + 1040 | 0 + 1050 | 0 + 1060 | 0 + 1070 | 0 + 1080 | 0 + 1090 | 0 + 1100 | 1 + 1110 | 0 + 1120 | 0 + 1130 | 0 + 1140 | 0 + 1150 | 0 + 1160 | 0 + 1170 | 0 + 1180 | 0 + 1190 | 0 + 1200 | 1 + 1210 | 0 + 1220 | 0 + 1230 | 0 + 1240 | 0 + 1250 | 0 + 1260 | 0 + 1270 | 0 + 1280 | 0 + 1290 | 0 + 1300 | 1 + 1310 | 0 + 1320 | 0 + 1330 | 0 + 1340 | 0 + 1350 | 0 + 1360 | 0 + 1370 | 0 + 1380 | 0 + 1390 | 0 + 1400 | 1 + 1410 | 0 + 1420 | 0 + 1430 | 0 + 1440 | 0 + 1450 | 0 + 1460 | 0 + 1470 | 0 + 1480 | 0 + 1490 | 0 + 1500 | 1 + 1510 | 0 + 1520 | 0 + 1530 | 0 + 1540 | 0 + 1550 | 0 + 1560 | 0 + 1570 | 0 + 1580 | 0 + 1590 | 0 + 1600 | 1 + 1610 | 0 + 1620 | 0 + 1630 | 0 + 1640 | 0 + 1650 | 0 + 1660 | 0 + 1670 | 0 + 1680 | 0 + 1690 | 0 + 1700 | 1 + 1710 | 0 + 1720 | 0 + 1730 | 0 + 1740 | 0 + 1750 | 0 + 1760 | 0 + 1770 | 0 + 1780 | 0 + 1790 | 0 + 1800 | 1 + 1810 | 0 + 1820 | 0 + 1830 | 0 + 1840 | 0 + 1850 | 0 + 1860 | 0 + 1870 | 0 + 1880 | 0 + 1890 | 0 + 1900 | 1 + 1910 | 0 + 1920 | 0 + 1930 | 0 + 1940 | 0 + 1950 | 0 + 1960 | 0 + 1970 | 0 + 1980 | 0 + 1990 | 0 + 2000 | 1 + 2010 | 0 + 2020 | 0 + 2030 | 0 + 2040 | 0 + 2050 | 0 + 2060 | 0 + 2070 | 0 + 2080 | 0 + 2090 | 0 + 2100 | 1 + 2110 | 0 + 2120 | 0 + 2130 | 0 + 2140 | 0 + 2150 | 0 + 2160 | 0 + 2170 | 0 + 2180 | 0 + 2190 | 0 + 2200 | 1 + 2210 | 0 + 2220 | 0 + 2230 | 0 + 2240 | 0 + 2250 | 0 + 2260 | 0 + 2270 | 0 + 2280 | 0 + 2290 | 0 + 2300 | 1 + 2310 | 0 + 2320 | 0 + 2330 | 0 + 2340 | 0 + 2350 | 0 + 2360 | 0 + 2370 | 0 + 2380 | 0 + 2390 | 0 + 2400 | 1 + 2410 | 0 + 2420 | 0 + 2430 | 0 + 2440 | 0 + 2450 | 0 + 2460 | 0 + 2470 | 0 + 2480 | 0 + 2490 | 0 + 2500 | 1 + 2510 | 0 + 2520 | 0 + 2530 | 0 + 2540 | 0 + 2550 | 0 + 2560 | 0 + 2570 | 0 + 2580 | 0 + 2590 | 0 + 2600 | 1 + 2610 | 0 + 2620 | 0 + 2630 | 0 + 2640 | 0 + 2650 | 0 + 2660 | 0 + 2670 | 0 + 2680 | 0 + 2690 | 0 + 2700 | 1 + 2710 | 0 + 2720 | 0 + 2730 | 0 + 2740 | 0 + 2750 | 0 + 2760 | 0 + 2770 | 0 + 2780 | 0 + 2790 | 0 + 2800 | 1 + 2810 | 0 + 2820 | 0 + 2830 | 0 + 2840 | 0 + 2850 | 0 + 2860 | 0 + 2870 | 0 + 2880 | 0 + 2890 | 0 + 2900 | 1 + 2910 | 0 + 2920 | 0 + 2930 | 0 + 2940 | 0 + 2950 | 0 + 2960 | 0 + 2970 | 0 + 2980 | 0 + 2990 | 0 + 3000 | 1 + 3010 | 0 + 3020 | 0 + 3030 | 0 + 3040 | 0 + 3050 | 0 + 3060 | 0 + 3070 | 0 + 3080 | 0 + 3090 | 0 + 3100 | 1 + 3110 | 0 + 3120 | 0 + 3130 | 0 + 3140 | 0 + 3150 | 0 + 3160 | 0 + 3170 | 0 + 3180 | 0 + 3190 | 0 + 3200 | 1 + 3210 | 0 + 3220 | 0 + 3230 | 0 + 3240 | 0 + 3250 | 0 + 3260 | 0 + 3270 | 0 + 3280 | 0 + 3290 | 0 + 3300 | 1 + 3310 | 0 + 3320 | 0 + 3330 | 0 + 3340 | 0 + 3350 | 0 + 3360 | 0 + 3370 | 0 + 3380 | 0 + 3390 | 0 + 3400 | 1 + 3410 | 0 + 3420 | 0 + 3430 | 0 + 3440 | 0 + 3450 | 0 + 3460 | 0 + 3470 | 0 + 3480 | 0 + 3490 | 0 + 3500 | 1 + 3510 | 0 + 3520 | 0 + 3530 | 0 + 3540 | 0 + 3550 | 0 + 3560 | 0 + 3570 | 0 + 3580 | 0 + 3590 | 0 + 3600 | 1 + 3610 | 0 + 3620 | 0 + 3630 | 0 + 3640 | 0 + 3650 | 0 + 3660 | 0 + 3670 | 0 + 3680 | 0 + 3690 | 0 + 3700 | 1 + 3710 | 0 + 3720 | 0 + 3730 | 0 + 3740 | 0 + 3750 | 0 + 3760 | 0 + 3770 | 0 + 3780 | 0 + 3790 | 0 + 3800 | 1 + 3810 | 0 + 3820 | 0 + 3830 | 0 + 3840 | 0 + 3850 | 0 + 3860 | 0 + 3870 | 0 + 3880 | 0 + 3890 | 0 + 3900 | 1 + 3910 | 0 + 3920 | 0 + 3930 | 0 + 3940 | 0 + 3950 | 0 + 3960 | 0 + 3970 | 0 + 3980 | 0 + 3990 | 0 + 4000 | 1 + 4010 | 0 + 4020 | 0 + 4030 | 0 + 4040 | 0 + 4050 | 0 + 4060 | 0 + 4070 | 0 + 4080 | 0 + 4090 | 0 + 4100 | 1 + 4110 | 0 + 4120 | 0 + 4130 | 0 + 4140 | 0 + 4150 | 0 + 4160 | 0 + 4170 | 0 + 4180 | 0 + 4190 | 0 + 4200 | 1 + 4210 | 0 + 4220 | 0 + 4230 | 0 + 4240 | 0 + 4250 | 0 + 4260 | 0 + 4270 | 0 + 4280 | 0 + 4290 | 0 + 4300 | 1 + 4310 | 0 + 4320 | 0 + 4330 | 0 + 4340 | 0 + 4350 | 0 + 4360 | 0 + 4370 | 0 + 4380 | 0 + 4390 | 0 + 4400 | 1 + 4410 | 0 + 4420 | 0 + 4430 | 0 + 4440 | 0 + 4450 | 0 + 4460 | 0 + 4470 | 0 + 4480 | 0 + 4490 | 0 + 4500 | 1 + 4510 | 0 + 4520 | 0 + 4530 | 0 + 4540 | 0 + 4550 | 0 + 4560 | 0 + 4570 | 0 + 4580 | 0 + 4590 | 0 + 4600 | 1 + 4610 | 0 + 4620 | 0 + 4630 | 0 + 4640 | 0 + 4650 | 0 + 4660 | 0 + 4670 | 0 + 4680 | 0 + 4690 | 0 + 4700 | 1 + 4710 | 0 + 4720 | 0 + 4730 | 0 + 4740 | 0 + 4750 | 0 + 4760 | 0 + 4770 | 0 + 4780 | 0 + 4790 | 0 + 4800 | 1 + 4810 | 0 + 4820 | 0 + 4830 | 0 + 4840 | 0 + 4850 | 0 + 4860 | 0 + 4870 | 0 + 4880 | 0 + 4890 | 0 + 4900 | 1 + 4910 | 0 + 4920 | 0 + 4930 | 0 + 4940 | 0 + 4950 | 0 + 4960 | 0 + 4970 | 0 + 4980 | 0 + 4990 | 0 + 5000 | 1 + 5010 | 0 + 5020 | 0 + 5030 | 0 + 5040 | 0 + 5050 | 0 + 5060 | 0 + 5070 | 0 + 5080 | 0 + 5090 | 0 + 5100 | 1 + 5110 | 0 + 5120 | 0 + 5130 | 0 + 5140 | 0 + 5150 | 0 + 5160 | 0 + 5170 | 0 + 5180 | 0 + 5190 | 0 + 5200 | 1 + 5210 | 0 + 5220 | 0 + 5230 | 0 + 5240 | 0 + 5250 | 0 + 5260 | 0 + 5270 | 0 + 5280 | 0 + 5290 | 0 + 5300 | 1 + 5310 | 0 + 5320 | 0 + 5330 | 0 + 5340 | 0 + 5350 | 0 + 5360 | 0 + 5370 | 0 + 5380 | 0 + 5390 | 0 + 5400 | 1 + 5410 | 0 + 5420 | 0 + 5430 | 0 + 5440 | 0 + 5450 | 0 + 5460 | 0 + 5470 | 0 + 5480 | 0 + 5490 | 0 + 5500 | 1 + 5510 | 0 + 5520 | 0 + 5530 | 0 + 5540 | 0 + 5550 | 0 + 5560 | 0 + 5570 | 0 + 5580 | 0 + 5590 | 0 + 5600 | 1 + 5610 | 0 + 5620 | 0 + 5630 | 0 + 5640 | 0 + 5650 | 0 + 5660 | 0 + 5670 | 0 + 5680 | 0 + 5690 | 0 + 5700 | 1 + 5710 | 0 + 5720 | 0 + 5730 | 0 + 5740 | 0 + 5750 | 0 + 5760 | 0 + 5770 | 0 + 5780 | 0 + 5790 | 0 + 5800 | 1 + 5810 | 0 + 5820 | 0 + 5830 | 0 + 5840 | 0 + 5850 | 0 + 5860 | 0 + 5870 | 0 + 5880 | 0 + 5890 | 0 + 5900 | 1 + 5910 | 0 + 5920 | 0 + 5930 | 0 + 5940 | 0 + 5950 | 0 + 5960 | 0 + 5970 | 0 + 5980 | 0 + 5990 | 0 + 6000 | 1 + 6010 | 0 + 6020 | 0 + 6030 | 0 + 6040 | 0 + 6050 | 0 + 6060 | 0 + 6070 | 0 + 6080 | 0 + 6090 | 0 + 6100 | 1 + 6110 | 0 + 6120 | 0 + 6130 | 0 + 6140 | 0 + 6150 | 0 + 6160 | 0 + 6170 | 0 + 6180 | 0 + 6190 | 0 + 6200 | 1 + 6210 | 0 + 6220 | 0 + 6230 | 0 + 6240 | 0 + 6250 | 0 + 6260 | 0 + 6270 | 0 + 6280 | 0 + 6290 | 0 + 6300 | 1 + 6310 | 0 + 6320 | 0 + 6330 | 0 + 6340 | 0 + 6350 | 0 + 6360 | 0 + 6370 | 0 + 6380 | 0 + 6390 | 0 + 6400 | 1 + 6410 | 0 + 6420 | 0 + 6430 | 0 + 6440 | 0 + 6450 | 0 + 6460 | 0 + 6470 | 0 + 6480 | 0 + 6490 | 0 + 6500 | 1 + 6510 | 0 + 6520 | 0 + 6530 | 0 + 6540 | 0 + 6550 | 0 + 6560 | 0 + 6570 | 0 + 6580 | 0 + 6590 | 0 + 6600 | 1 + 6610 | 0 + 6620 | 0 + 6630 | 0 + 6640 | 0 + 6650 | 0 + 6660 | 0 + 6670 | 0 + 6680 | 0 + 6690 | 0 + 6700 | 1 + 6710 | 0 + 6720 | 0 + 6730 | 0 + 6740 | 0 + 6750 | 0 + 6760 | 0 + 6770 | 0 + 6780 | 0 + 6790 | 0 + 6800 | 1 + 6810 | 0 + 6820 | 0 + 6830 | 0 + 6840 | 0 + 6850 | 0 + 6860 | 0 + 6870 | 0 + 6880 | 0 + 6890 | 0 + 6900 | 1 + 6910 | 0 + 6920 | 0 + 6930 | 0 + 6940 | 0 + 6950 | 0 + 6960 | 0 + 6970 | 0 + 6980 | 0 + 6990 | 0 + 7000 | 1 + 7010 | 0 + 7020 | 0 + 7030 | 0 + 7040 | 0 + 7050 | 0 + 7060 | 0 + 7070 | 0 + 7080 | 0 + 7090 | 0 + 7100 | 1 + 7110 | 0 + 7120 | 0 + 7130 | 0 + 7140 | 0 + 7150 | 0 + 7160 | 0 + 7170 | 0 + 7180 | 0 + 7190 | 0 + 7200 | 1 + 7210 | 0 + 7220 | 0 + 7230 | 0 + 7240 | 0 + 7250 | 0 + 7260 | 0 + 7270 | 0 + 7280 | 0 + 7290 | 0 + 7300 | 1 + 7310 | 0 + 7320 | 0 + 7330 | 0 + 7340 | 0 + 7350 | 0 + 7360 | 0 + 7370 | 0 + 7380 | 0 + 7390 | 0 + 7400 | 1 + 7410 | 0 + 7420 | 0 + 7430 | 0 + 7440 | 0 + 7450 | 0 + 7460 | 0 + 7470 | 0 + 7480 | 0 + 7490 | 0 + 7500 | 1 + 7510 | 0 + 7520 | 0 + 7530 | 0 + 7540 | 0 + 7550 | 0 + 7560 | 0 + 7570 | 0 + 7580 | 0 + 7590 | 0 + 7600 | 1 + 7610 | 0 + 7620 | 0 + 7630 | 0 + 7640 | 0 + 7650 | 0 + 7660 | 0 + 7670 | 0 + 7680 | 0 + 7690 | 0 + 7700 | 1 + 7710 | 0 + 7720 | 0 + 7730 | 0 + 7740 | 0 + 7750 | 0 + 7760 | 0 + 7770 | 0 + 7780 | 0 + 7790 | 0 + 7800 | 1 + 7810 | 0 + 7820 | 0 + 7830 | 0 + 7840 | 0 + 7850 | 0 + 7860 | 0 + 7870 | 0 + 7880 | 0 + 7890 | 0 + 7900 | 1 + 7910 | 0 + 7920 | 0 + 7930 | 0 + 7940 | 0 + 7950 | 0 + 7960 | 0 + 7970 | 0 + 7980 | 0 + 7990 | 0 + 8000 | 1 + 8010 | 0 + 8020 | 0 + 8030 | 0 + 8040 | 0 + 8050 | 0 + 8060 | 0 + 8070 | 0 + 8080 | 0 + 8090 | 0 + 8100 | 1 + 8110 | 0 + 8120 | 0 + 8130 | 0 + 8140 | 0 + 8150 | 0 + 8160 | 0 + 8170 | 0 + 8180 | 0 + 8190 | 0 + 8200 | 1 + 8210 | 0 + 8220 | 0 + 8230 | 0 + 8240 | 0 + 8250 | 0 + 8260 | 0 + 8270 | 0 + 8280 | 0 + 8290 | 0 + 8300 | 1 + 8310 | 0 + 8320 | 0 + 8330 | 0 + 8340 | 0 + 8350 | 0 + 8360 | 0 + 8370 | 0 + 8380 | 0 + 8390 | 0 + 8400 | 1 + 8410 | 0 + 8420 | 0 + 8430 | 0 + 8440 | 0 + 8450 | 0 + 8460 | 0 + 8470 | 0 + 8480 | 0 + 8490 | 0 + 8500 | 1 + 8510 | 0 + 8520 | 0 + 8530 | 0 + 8540 | 0 + 8550 | 0 + 8560 | 0 + 8570 | 0 + 8580 | 0 + 8590 | 0 + 8600 | 1 + 8610 | 0 + 8620 | 0 + 8630 | 0 + 8640 | 0 + 8650 | 0 + 8660 | 0 + 8670 | 0 + 8680 | 0 + 8690 | 0 + 8700 | 1 + 8710 | 0 + 8720 | 0 + 8730 | 0 + 8740 | 0 + 8750 | 0 + 8760 | 0 + 8770 | 0 + 8780 | 0 + 8790 | 0 + 8800 | 1 + 8810 | 0 + 8820 | 0 + 8830 | 0 + 8840 | 0 + 8850 | 0 + 8860 | 0 + 8870 | 0 + 8880 | 0 + 8890 | 0 + 8900 | 1 + 8910 | 0 + 8920 | 0 + 8930 | 0 + 8940 | 0 + 8950 | 0 + 8960 | 0 + 8970 | 0 + 8980 | 0 + 8990 | 0 + 9000 | 1 + 9010 | 0 + 9020 | 0 + 9030 | 0 + 9040 | 0 + 9050 | 0 + 9060 | 0 + 9070 | 0 + 9080 | 0 + 9090 | 0 + 9100 | 1 + 9110 | 0 + 9120 | 0 + 9130 | 0 + 9140 | 0 + 9150 | 0 + 9160 | 0 + 9170 | 0 + 9180 | 0 + 9190 | 0 + 9200 | 1 + 9210 | 0 + 9220 | 0 + 9230 | 0 + 9240 | 0 + 9250 | 0 + 9260 | 0 + 9270 | 0 + 9280 | 0 + 9290 | 0 + 9300 | 1 + 9310 | 0 + 9320 | 0 + 9330 | 0 + 9340 | 0 + 9350 | 0 + 9360 | 0 + 9370 | 0 + 9380 | 0 + 9390 | 0 + 9400 | 1 + 9410 | 0 + 9420 | 0 + 9430 | 0 + 9440 | 0 + 9450 | 0 + 9460 | 0 + 9470 | 0 + 9480 | 0 + 9490 | 0 + 9500 | 1 + 9510 | 0 + 9520 | 0 + 9530 | 0 + 9540 | 0 + 9550 | 0 + 9560 | 0 + 9570 | 0 + 9580 | 0 + 9590 | 0 + 9600 | 1 + 9610 | 0 + 9620 | 0 + 9630 | 0 + 9640 | 0 + 9650 | 0 + 9660 | 0 + 9670 | 0 + 9680 | 0 + 9690 | 0 + 9700 | 1 + 9710 | 0 + 9720 | 0 + 9730 | 0 + 9740 | 0 + 9750 | 0 + 9760 | 0 + 9770 | 0 + 9780 | 0 + 9790 | 0 + 9800 | 1 + 9810 | 0 + 9820 | 0 + 9830 | 0 + 9840 | 0 + 9850 | 0 + 9860 | 0 + 9870 | 0 + 9880 | 0 + 9890 | 0 + 9900 | 1 + 9910 | 0 + 9920 | 0 + 9930 | 0 + 9940 | 0 + 9950 | 0 + 9960 | 0 + 9970 | 0 + 9980 | 0 + 9990 | 0 + 10000 | 1 + 10100 | 1 + 10200 | 0 + + diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.trunc.d b/cmd/dtrace/test/tst/common/llquantize/tst.trunc.d new file mode 100644 index 00000000000..e3db03002c4 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.trunc.d @@ -0,0 +1,49 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +int i; + +tick-10ms +/i < 100/ +{ + @[i] = llquantize(i, 10, 1, 2, 10, 150); + @[i] = llquantize(i + 1, 10, 1, 2, 10, 150); + @[i] = llquantize(i + 2, 10, 1, 2, 10, 150); + @[i] = llquantize(i + 3, 10, 1, 2, 10, 150); + i++; +} + +tick-10ms +/i == 100/ +{ + exit(0); +} + +END +{ + trunc(@, 5); +} diff --git a/cmd/dtrace/test/tst/common/llquantize/tst.trunc.d.out b/cmd/dtrace/test/tst/common/llquantize/tst.trunc.d.out new file mode 100644 index 00000000000..941c62679b0 --- /dev/null +++ b/cmd/dtrace/test/tst/common/llquantize/tst.trunc.d.out @@ -0,0 +1,34 @@ + + 95 + value ------------- Distribution ------------- count + 80 | 0 + 90 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 600 + 100 | 0 + + 96 + value ------------- Distribution ------------- count + 80 | 0 + 90 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 600 + 100 | 0 + + 97 + value ------------- Distribution ------------- count + 80 | 0 + 90 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 450 + 100 |@@@@@@@@@@ 150 + 200 | 0 + + 98 + value ------------- Distribution ------------- count + 80 | 0 + 90 |@@@@@@@@@@@@@@@@@@@@ 300 + 100 |@@@@@@@@@@@@@@@@@@@@ 300 + 200 | 0 + + 99 + value ------------- Distribution ------------- count + 80 | 0 + 90 |@@@@@@@@@@ 150 + 100 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 450 + 200 | 0 + diff --git a/cmd/dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh b/cmd/dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh index 561f8549d92..6ca9712736a 100644 --- a/cmd/dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh +++ b/cmd/dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh @@ -24,8 +24,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # # This script primarily tests that the ::dtrace dcmd is not dumping @@ -36,7 +34,7 @@ script() { - $dtrace -o $dtraceout -s /dev/stdin <' @@ -31,7 +30,7 @@ if [ $# != 1 ]; then fi dtrace=$1 -CC=/usr/sfw/bin/gcc +CC=`which gcc` CFLAGS= doit() @@ -83,13 +82,37 @@ files=/usr/include/sys/*.h # because they include static globals (!) or function bodies (!!) in the header # file. Hopefully these remain sufficiently few that the O(#files * #badfiles) # algorithm, below, doesn't become a problem. (And yes, writing scripts in -# something other than ksh1888 would probably be a good idea.) If this script +# something other than ksh would probably be a good idea.) If this script # becomes a problem, kindly fix it by reducing the number of bad files! (That # is, fix it by fixing the broken file, not the broken script.) # -badfiles="ctype.h eri_msg.h ser_sync.h sbpro.h neti.h hook_event.h \ - bootconf.h bootstat.h dtrace.h dumphdr.h exacct_impl.h fasttrap.h \ - kobj.h kobj_impl.h ksyms.h lockstat.h smedia.h stat.h utsname.h" +badfiles="\ + bootconf.h \ + bootstat.h \ + ctype.h \ + dtrace.h \ + dumphdr.h \ + exacct_impl.h \ + fasttrap.h \ + hook_event.h \ + iscsi_authclient.h \ + kiconv_ja.h \ + kiconv_ja_jis_to_unicode.h \ + kiconv_ja_unicode_to_jis.h \ + kobj.h \ + kobj_impl.h \ + ksyms.h \ + lockstat.h \ + neti.h \ + rds.h \ + ser_sync.h \ + smbios_impl.h \ + smedia.h \ + sockfilter.h \ + stat.h \ + u8_textprep_data.h \ + utsname.h \ + vnic.h" for inc in $files; do file=`basename $inc` diff --git a/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out b/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out index 8a9ac6d96c5..09d984d3fa0 100644 --- a/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out +++ b/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out @@ -4,12 +4,15 @@ read entry FUNCTION NAME read entry readlink entry +readlinkat entry readv entry FUNCTION NAME read entry readlink entry +readlinkat entry readv entry FUNCTION NAME readlink entry +readlinkat entry FUNCTION NAME pread64 entry diff --git a/cmd/dtrace/test/tst/common/misc/tst.schrock.ksh b/cmd/dtrace/test/tst/common/misc/tst.schrock.ksh index 494f6f8e660..bc29f714cbf 100644 --- a/cmd/dtrace/test/tst/common/misc/tst.schrock.ksh +++ b/cmd/dtrace/test/tst/common/misc/tst.schrock.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -33,13 +32,12 @@ fi dtrace=$1 # -# /usr/ccs/bin/nm execs a 64-bit version of itself. DTrace uses libproc -# (which uses /proc) to find out when the traced process exits, but a -# 32-bit process can't examine a 64-bit one with libproc. The -# LD_NOEXEC_64 variable prevents nm from re-execing itself. +# Some variants of nm may exec a 64-bit version of themselves. DTrace uses +# libproc (which uses /proc) to find out when the traced process exits, but a +# 32-bit process can't examine a 64-bit one with libproc. The LD_NOEXEC_64 +# variable prevents nm from re-execing itself. # -LD_NOEXEC_64=tomeeisrad $dtrace -F -s /dev/stdin -c \ - '/usr/ccs/bin/nm /bin/ls' stat < Makefile < main.c < Makefile < altlib.c < Makefile < Makefile <' + exit 2 +fi + +libdira=${TMPDIR:-/tmp}/libdepa.$$ +libdirb=${TMPDIR:-/tmp}/libdepb.$$ +libdirc=${TMPDIR:-/tmp}/libdepc.$$ +dtrace=$1 + +setup_libs() +{ + mkdir $libdira + mkdir $libdirb + mkdir $libdirc + cat > $libdira/liba.$$.d < $libdirb/libb.$$.d < $libdirb/libc.$$.d < $libdirb/libd.$$.d < $libdirc/libe.$$.d < $libdirc/libf.$$.d <f = (foo_t *)alloca(sizeof (foo_t)); + + this->f->a[0] = 1; + this->f->a[1] = 2; + this->f->a[2] = 3; + this->f->b[0] = 'a'; + this->f->b[1] = 'b'; + this->f->b[2] = 0; + this->f->c[0].alpha = 5; + this->f->c[1].alpha = 6; + this->f->c[2].alpha = 7; + this->f->d[0] = 4; + this->f->d[1] = 0; + this->f->d[2] = 0; + + print(this->f->a); + print(this->f->b); + print(this->f->c); + print(*this->f); + + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/print/tst.array.d.out b/cmd/dtrace/test/tst/common/print/tst.array.d.out new file mode 100644 index 00000000000..0702d4bb5a8 --- /dev/null +++ b/cmd/dtrace/test/tst/common/print/tst.array.d.out @@ -0,0 +1,23 @@ +int [3] [ 0x1, 0x2, 0x3 ] +char [30] "ab" +bar_t [2] [ + bar_t { + int alpha = 0x5 + }, + bar_t { + int alpha = 0x6 + } +] +foo_t { + int [3] a = [ 0x1, 0x2, 0x3 ] + char [30] b = [ "ab" ] + bar_t [2] c = [ + bar_t { + int alpha = 0x5 + }, + bar_t { + int alpha = 0x6 + } + ] + char [3] d = [ '\004', '\0', '\0' ] +} diff --git a/cmd/dtrace/test/tst/common/print/tst.bitfield.d b/cmd/dtrace/test/tst/common/print/tst.bitfield.d new file mode 100644 index 00000000000..ff77bb0ec74 --- /dev/null +++ b/cmd/dtrace/test/tst/common/print/tst.bitfield.d @@ -0,0 +1,49 @@ +/* + * 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 (c) 2011 by Delphix. All rights reserved. + */ + +#pragma D option quiet + +typedef struct forward forward_t; + +typedef struct foo { + int a:4; + int b:7; + int c:1; + int d:2; +} foo_t; + +BEGIN +{ + this->s = (foo_t *)alloca(sizeof (foo_t)); + + this->s->a = 1; + this->s->b = 5; + this->s->c = 0; + this->s->d = 2; + + print(*this->s); + + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/print/tst.bitfield.d.out b/cmd/dtrace/test/tst/common/print/tst.bitfield.d.out new file mode 100644 index 00000000000..309444d5c8d --- /dev/null +++ b/cmd/dtrace/test/tst/common/print/tst.bitfield.d.out @@ -0,0 +1,6 @@ +foo_t { + int a :4 = 0x1 + int b :7 = 0x5 + int c :1 = 0 + int d :2 = 0x2 +} diff --git a/cmd/dtrace/test/tst/common/print/tst.primitive.d b/cmd/dtrace/test/tst/common/print/tst.primitive.d new file mode 100644 index 00000000000..559dab1840c --- /dev/null +++ b/cmd/dtrace/test/tst/common/print/tst.primitive.d @@ -0,0 +1,45 @@ +/* + * 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 (c) 2011 by Delphix. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + i = (int)'a'; + + printf("\n"); + + print((char)'a'); + print((int)-1); + print((unsigned int)23); + print((short)456); + print((unsigned short)789); + print((long)1234); + print((ulong_t)56789); + print((void *)0x1234); + print("hello"); + + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/print/tst.primitive.d.out b/cmd/dtrace/test/tst/common/print/tst.primitive.d.out new file mode 100644 index 00000000000..f7e4076726a --- /dev/null +++ b/cmd/dtrace/test/tst/common/print/tst.primitive.d.out @@ -0,0 +1,11 @@ + +char 'a' +int 0xffffffff +unsigned int 0x17 +short 0x1c8 +unsigned short 0x315 +long 0x4d2 +ulong_t 0xddd5 +void * 0x1234 +string "hello" + diff --git a/cmd/dtrace/test/tst/common/print/tst.struct.d b/cmd/dtrace/test/tst/common/print/tst.struct.d new file mode 100644 index 00000000000..2fb1c41401e --- /dev/null +++ b/cmd/dtrace/test/tst/common/print/tst.struct.d @@ -0,0 +1,59 @@ +/* + * 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 (c) 2011 by Delphix. All rights reserved. + */ + +#pragma D option quiet + +typedef struct forward forward_t; + +typedef struct foo { + int a; + void *b; + struct { + uint64_t alpha; + uint64_t beta; + } c; + ushort_t d; + int e; + forward_t *f; + void (*g)(); +} foo_t; + +BEGIN +{ + this->s = (foo_t *)alloca(sizeof (foo_t)); + + this->s->a = 1; + this->s->b = (void *)2; + this->s->c.alpha = 3; + this->s->c.beta = 4; + this->s->d = 5; + this->s->e = 6; + this->s->f = (void *)7; + this->s->g = (void *)8; + + print(*this->s); + + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/print/tst.struct.d.out b/cmd/dtrace/test/tst/common/print/tst.struct.d.out new file mode 100644 index 00000000000..b7b21083755 --- /dev/null +++ b/cmd/dtrace/test/tst/common/print/tst.struct.d.out @@ -0,0 +1,12 @@ +foo_t { + int a = 0x1 + void *b = 0x2 + struct c = { + uint64_t alpha = 0x3 + uint64_t beta = 0x4 + } + ushort_t d = 0x5 + int e = 0x6 + forward_t *f = 0x7 + int (*)() g = 0x8 +} diff --git a/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh b/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh index ed375fdbf9b..4c5df0a1efa 100644 --- a/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh +++ b/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh @@ -50,7 +50,7 @@ main(int argc, char *argv[]) } EOF -cc -o test test.c +gcc -o test test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 diff --git a/cmd/dtrace/test/tst/common/privs/tst.noprivdrop.ksh b/cmd/dtrace/test/tst/common/privs/tst.noprivdrop.ksh new file mode 100755 index 00000000000..a5cd18386c3 --- /dev/null +++ b/cmd/dtrace/test/tst/common/privs/tst.noprivdrop.ksh @@ -0,0 +1,72 @@ +# +# 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 (c) 2011, Joyent, Inc. All rights reserved. +# + +ppriv -s A=basic,dtrace_user $$ + +# +# We expect some number of these profile probes to be silently dropped. +# Note that this test will fail if something is stuck on all CPUs that +# whomever is running the test happens to own. +# +count=$(/usr/sbin/dtrace -q -s /dev/stdin < 100/ +{ + printa("%@d", @); + exit(0); +} +EOF) + +cpus=`psrinfo | grep -- on-line | wc -l` +max=`expr $cpus \* 500` + +if [[ $count -gt $max ]]; then + echo "count ($count) is greater than allowed max ($max)" + exit 1 +fi + +echo "count ($count) is within allowed max ($max)" +exit 0 diff --git a/cmd/dtrace/test/tst/common/privs/tst.noprivrestrict.ksh b/cmd/dtrace/test/tst/common/privs/tst.noprivrestrict.ksh new file mode 100755 index 00000000000..358ed92c6f8 --- /dev/null +++ b/cmd/dtrace/test/tst/common/privs/tst.noprivrestrict.ksh @@ -0,0 +1,61 @@ +# +# 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 (c) 2011, Joyent, Inc. All rights reserved. +# + +ppriv -s A=basic,dtrace_user $$ + +# +# We expect at least one of these tick probes to error out because only +# dtrace_user is set, and we are attempting to access arguments. Note that +# this test will fail if something is stuck on CPU that whomever is running +# the test happens to own. +# +/usr/sbin/dtrace -q -s /dev/stdin < 100/ +{ + printf("error count is %d\n", errcnt); + exit(errcnt != 0 ? 0 : 1); +} +EOF diff --git a/cmd/dtrace/test/tst/common/privs/tst.tick.ksh b/cmd/dtrace/test/tst/common/privs/tst.tick.ksh new file mode 100755 index 00000000000..eaff59fa94d --- /dev/null +++ b/cmd/dtrace/test/tst/common/privs/tst.tick.ksh @@ -0,0 +1,55 @@ +# +# 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 (c) 2011, Joyent, Inc. All rights reserved. +# + +ppriv -s A=basic,dtrace_user $$ + +# +# We expect tick probes to fire if dtrace_user is set +# +/usr/sbin/dtrace -q -s /dev/stdin < 10 && (this->ms = (timestamp - start) / 1000000) > 2000/ +{ + printf("expected completion in 100 ms, found %d!\n", this->ms); + exit(1); +} + +tick-10ms +/ticks > 10/ +{ + printf("completed in %d ms\n", this->ms); + exit(0); +} +EOF diff --git a/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh b/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh index 69c0f84a490..478307a11a2 100644 --- a/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh +++ b/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh @@ -23,7 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" script() { @@ -61,10 +60,9 @@ child=$! # # The only thing we can be sure of here is that we caught some function in -# ksh doing work. (This actually goes one step further and assumes that we -# catch some non-static function in ksh.) +# ksh doing work. # -script | tee /dev/fd/2 | grep 'ksh`[a-zA-Z_]' > /dev/null +script | tee /dev/fd/2 | egrep '(ksh|libshell\.so\.[0-9])`[a-zA-Z_]' > /dev/null status=$? kill $child diff --git a/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh b/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh index 6ca823f5ddd..fe5649da76c 100644 --- a/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh +++ b/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh @@ -23,7 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" script() { @@ -62,7 +61,7 @@ child=$! # # The only thing we can be sure of here is that ksh is doing some work. # -script | tee /dev/fd/2 | grep -w ksh > /dev/null +script | tee /dev/fd/2 | egrep '(ksh|libshell)' > /dev/null status=$? kill $child diff --git a/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh b/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh index b1a3ab9de2f..36edf0ed39f 100644 --- a/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh +++ b/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh @@ -23,7 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" script() { @@ -63,7 +62,7 @@ child=$! # This test is essentially the same as that in the ufunc test; see that # test for the rationale. # -script | tee /dev/fd/2 | grep 'ksh`[a-zA-Z_]' > /dev/null +script | tee /dev/fd/2 | egrep '(ksh|libshell\.so\.[0-9])`[a-zA-Z_]' > /dev/null status=$? kill $child diff --git a/cmd/dtrace/test/tst/common/safety/tst.violentdeath.ksh b/cmd/dtrace/test/tst/common/safety/tst.violentdeath.ksh index 879774a42ea..d701053b68c 100644 --- a/cmd/dtrace/test/tst/common/safety/tst.violentdeath.ksh +++ b/cmd/dtrace/test/tst/common/safety/tst.violentdeath.ksh @@ -23,11 +23,10 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" script() { - $dtrace -x bufpolicy=ring -x bufsize=1k -s /dev/stdin <= 150/ +{ + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out b/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out new file mode 100644 index 00000000000..6415893b8db --- /dev/null +++ b/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out @@ -0,0 +1,1313 @@ +-9: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-8: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-7: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-6: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-5: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-4: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-3: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-2: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +-1: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +0: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +1: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 . + +2: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 .. + +3: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 ... + +4: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 .... + +5: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 ..... + +6: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 ...... + +7: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 ....... + +8: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 ........ + +9: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 ......... + +10: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 .......... + +11: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 ........... + +12: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 ............ + +13: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 ............. + +14: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. + +15: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + +16: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +17: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 . + +18: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 .. + +19: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 ... + +20: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 .... + +21: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 ..... + +22: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 ...... + +23: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 ....... + +24: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 ........ + +25: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 ......... + +26: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 .......... + +27: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 ........... + +28: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 ............ + +29: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 ............. + +30: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. + +31: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + +32: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +33: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 . + +34: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 .. + +35: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 ... + +36: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 .... + +37: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 ..... + +38: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 ...... + +39: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 ....... + +40: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 ........ + +41: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 ......... + +42: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 .......... + +43: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 ........... + +44: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 ............ + +45: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 ............. + +46: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. + +47: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + +48: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +49: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 . + +50: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 .. + +51: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 ... + +52: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 .... + +53: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 ..... + +54: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 ...... + +55: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 ....... + +56: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 ........ + +57: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 ......... + +58: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 .......... + +59: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 ........... + +60: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 ............ + +61: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 ............. + +62: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. + +63: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + +64: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +65: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 . + +66: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 .. + +67: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 ... + +68: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 .... + +69: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 ..... + +70: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 ...... + +71: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 ....... + +72: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 ........ + +73: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 ......... + +74: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 .......... + +75: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 ........... + +76: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 ............ + +77: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 ............. + +78: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. + +79: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + +80: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +81: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 . + +82: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 .. + +83: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 ... + +84: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 .... + +85: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 ..... + +86: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 ...... + +87: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 ....... + +88: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 ........ + +89: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 ......... + +90: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 .......... + +91: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 ........... + +92: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 ............ + +93: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 ............. + +94: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. + +95: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + +96: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +97: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 . + +98: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 .. + +99: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 ... + +100: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 .... + +101: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 ..... + +102: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 ...... + +103: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 ....... + +104: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 ........ + +105: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 ......... + +106: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 .......... + +107: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 ........... + +108: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 ............ + +109: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 ............. + +110: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. + +111: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + +112: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +113: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 . + +114: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 .. + +115: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 ... + +116: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 .... + +117: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 ..... + +118: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 ...... + +119: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 ....... + +120: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 ........ + +121: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 ......... + +122: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 .......... + +123: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 ........... + +124: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 ............ + +125: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 ............. + +126: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............. + +127: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + +128: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +129: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +130: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +131: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +132: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +133: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +134: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +135: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +136: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +137: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +138: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +139: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +140: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +141: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +142: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +143: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +144: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +145: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +146: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +147: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +148: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +149: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +150: + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + + diff --git a/cmd/dtrace/test/tst/common/tracemem/tst.smallsize.d b/cmd/dtrace/test/tst/common/tracemem/tst.smallsize.d new file mode 100644 index 00000000000..ae447709ee3 --- /dev/null +++ b/cmd/dtrace/test/tst/common/tracemem/tst.smallsize.d @@ -0,0 +1,32 @@ +/* + * 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 (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + tracemem(`utsname.sysname, 5); + exit(0); +} diff --git a/cmd/dtrace/test/tst/common/tracemem/tst.smallsize.d.out b/cmd/dtrace/test/tst/common/tracemem/tst.smallsize.d.out new file mode 100644 index 00000000000..8cefb586041 --- /dev/null +++ b/cmd/dtrace/test/tst/common/tracemem/tst.smallsize.d.out @@ -0,0 +1,4 @@ + + 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef + 0: 53 75 6e 4f 53 SunOS + diff --git a/cmd/dtrace/test/tst/common/usdt/tst.badguess.ksh b/cmd/dtrace/test/tst/common/usdt/tst.badguess.ksh index 291fe83fac2..3c41f662146 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.badguess.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.badguess.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -61,12 +60,12 @@ main(int argc, char **argv) } EOF -cc -xarch=generic64 -c -o test64.o test.c +gcc -m64 -c -o test64.o test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c 64-bit" exit 1 fi -cc -xarch=generic -c -o test32.o test.c +gcc -m32 -c -o test32.o test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c 32-bit" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh b/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh index 68dbb03456c..c9bcb03e631 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh @@ -60,10 +60,10 @@ cat > Makefile < Makefile < /dev/null +make > /dev/null if [ $? -ne 0 ]; then print -u2 "failed to build" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.dlclose2.ksh b/cmd/dtrace/test/tst/common/usdt/tst.dlclose2.ksh index c83d8bfa861..692c8d9b5c5 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.dlclose2.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.dlclose2.ksh @@ -24,7 +24,6 @@ # Copyright 2006 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'>' @@ -41,17 +40,17 @@ cat > Makefile < /dev/null +make > /dev/null if [ $? -ne 0 ]; then print -u2 "failed to build" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.dlclose3.ksh b/cmd/dtrace/test/tst/common/usdt/tst.dlclose3.ksh index 72f24ce5e30..e950eb4af2b 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.dlclose3.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.dlclose3.ksh @@ -24,7 +24,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" # # This test verifies that performing a dlclose(3dl) on a library doesn't @@ -46,17 +45,17 @@ cat > Makefile < /dev/null +make > /dev/null if [ $? -ne 0 ]; then print -u2 "failed to build" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.eliminate.ksh b/cmd/dtrace/test/tst/common/usdt/tst.eliminate.ksh index 687e435e3fc..3d50443370a 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.eliminate.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.eliminate.ksh @@ -23,7 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" # # Make sure temporary symbols generated due to DTrace probes in static @@ -72,7 +71,7 @@ main(int argc, char **argv) } EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -82,7 +81,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.enabled.ksh b/cmd/dtrace/test/tst/common/usdt/tst.enabled.ksh index ba62be75a4c..47ea79f3761 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.enabled.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.enabled.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -61,7 +60,7 @@ main(int argc, char **argv) } EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -71,7 +70,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh b/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh index 340164847bf..9b71ac26377 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh @@ -23,7 +23,6 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" # # This test is primarily intended to verify a fix for SPARC, but there's no @@ -77,7 +76,7 @@ main(int argc, char **argv) } EOF -cc -c -xO2 test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -87,7 +86,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.entryreturn.ksh b/cmd/dtrace/test/tst/common/usdt/tst.entryreturn.ksh index 9d2646cdf1f..79e82661927 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.entryreturn.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.entryreturn.ksh @@ -23,7 +23,6 @@ # Copyright 2007 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'>' @@ -70,7 +69,7 @@ provider test_prov { }; EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -80,7 +79,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.fork.ksh b/cmd/dtrace/test/tst/common/usdt/tst.fork.ksh index 9c12e6dea29..1264e3ffb69 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.fork.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.fork.ksh @@ -24,7 +24,6 @@ # Copyright 2006 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'>' @@ -71,7 +70,7 @@ main(int argc, char **argv) } EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -81,7 +80,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.guess32.ksh b/cmd/dtrace/test/tst/common/usdt/tst.guess32.ksh index 68a8d016073..59339f766c0 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.guess32.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.guess32.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -61,7 +60,7 @@ main(int argc, char **argv) } EOF -cc -xarch=generic -c test.c +gcc -m32 -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -71,7 +70,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -xarch=generic -o test test.o prov.o +gcc -m32 -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.guess64.ksh b/cmd/dtrace/test/tst/common/usdt/tst.guess64.ksh index 39de8e0d81b..e270290e7d8 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.guess64.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.guess64.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -61,7 +60,7 @@ main(int argc, char **argv) } EOF -cc -xarch=generic64 -c test.c +gcc -m64 -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -71,7 +70,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -xarch=generic64 -o test test.o prov.o +gcc -m64 -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.header.ksh b/cmd/dtrace/test/tst/common/usdt/tst.header.ksh index 08a1912bae8..f4679bc3f8e 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.header.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.header.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -65,7 +64,7 @@ main(int argc, char **argv) } EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -75,7 +74,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.include.ksh b/cmd/dtrace/test/tst/common/usdt/tst.include.ksh index 5683f47d427..5576ab81ec4 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.include.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.include.ksh @@ -23,7 +23,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" # Make sure defines _DTRACE_VERSION @@ -46,7 +45,7 @@ main(int argc, char **argv) } EOF -cc -xarch=generic -o test test.c +gcc -m32 -o test test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.linkpriv.ksh b/cmd/dtrace/test/tst/common/usdt/tst.linkpriv.ksh index ec07e057af8..bbe1a4acc9a 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.linkpriv.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.linkpriv.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -62,7 +61,7 @@ provider test_prov { }; EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -72,7 +71,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.linkunpriv.ksh b/cmd/dtrace/test/tst/common/usdt/tst.linkunpriv.ksh index 01b2126c944..35d97afc482 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.linkunpriv.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.linkunpriv.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -64,7 +63,7 @@ provider test_prov { }; EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -74,7 +73,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.multiple.ksh b/cmd/dtrace/test/tst/common/usdt/tst.multiple.ksh index 0c8b072cb0d..852f5a0b3c7 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.multiple.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.multiple.ksh @@ -24,7 +24,6 @@ # Copyright 2006 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'>' @@ -65,7 +64,7 @@ main(int argc, char **argv) } EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -75,7 +74,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.nodtrace.ksh b/cmd/dtrace/test/tst/common/usdt/tst.nodtrace.ksh index a911bcdfdfb..c0c3465e762 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.nodtrace.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.nodtrace.ksh @@ -23,7 +23,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" # Fake up a scenario where _DTRACE_VERSION is not defined by having our own # . This tests that dtrace -h will produce a header file which can @@ -70,12 +69,12 @@ main(int argc, char **argv) } EOF -cc -I. -xarch=generic -c test.c +gcc -I. -m32 -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 fi -cc -xarch=generic -o test test.o +gcc -m32 -o test test.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh b/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh new file mode 100644 index 00000000000..338dcdf03e6 --- /dev/null +++ b/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh @@ -0,0 +1,128 @@ +# +# 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 (c) 2011, Joyent, Inc. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.c < +#include + +int +main(int argc, char **argv) +{ + DTRACE_PROBE(test_prov, probe1); +} +EOF + +cat > prov.d < 10/ + { + exit(0); + } +EOF +} + +script 2>&1 | tee test.out + +# +# It should be true that our probe was not reaped after the provider was made +# defunct: the speculative tracing action prevents reaping of any ECB in the +# enabling. +# +status=0 + +if grep D_PDESC_INVAL test.out 2> /dev/null 1>&2 ; then + status=1 +else + grep D_PROC_GRAB test.out 2> /dev/null 1>&2 + status=$? +fi + +cd / +/usr/bin/rm -rf $DIR + +exit $status diff --git a/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh b/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh new file mode 100644 index 00000000000..a2e5edee381 --- /dev/null +++ b/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh @@ -0,0 +1,124 @@ +# +# 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 (c) 2011, Joyent, Inc. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.c < +#include + +int +main(int argc, char **argv) +{ + DTRACE_PROBE(test_prov, probe1); +} +EOF + +cat > prov.d < 10/ + { + exit(0); + } +EOF +} + +$dtrace -x bufpolicy=ring -ZwqP test_prov\* > /dev/null 2>&1 & +background=$! +echo launched ring buffered enabling as pid $background +script 2>&1 | tee test.out + +# +# It should be true that our probe was not reaped after the provider was made +# defunct: the active ring buffer in the earlier enabling prevents reaping of +# any of the earlier enabling's ECBs. +# +status=0 + +if grep D_PDESC_INVAL test.out 2> /dev/null 1>&2 ; then + status=1 +else + grep D_PROC_GRAB test.out 2> /dev/null 1>&2 + status=$? +fi + +kill $background +cd / +/usr/bin/rm -rf $DIR + +exit $status diff --git a/cmd/dtrace/test/tst/common/usdt/tst.onlyenabled.ksh b/cmd/dtrace/test/tst/common/usdt/tst.onlyenabled.ksh index 989d6d32aff..a1e939c8839 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.onlyenabled.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.onlyenabled.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -62,7 +61,7 @@ main(int argc, char **argv) } EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -72,7 +71,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh b/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh new file mode 100644 index 00000000000..f18c585ef6c --- /dev/null +++ b/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh @@ -0,0 +1,115 @@ +# +# 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 (c) 2011, Joyent, Inc. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.c < +#include + +int +main(int argc, char **argv) +{ + DTRACE_PROBE(test_prov, probe1); +} +EOF + +cat > prov.d < 10/ + { + exit(0); + } +EOF +} + +script 2>&1 | tee test.out + +# +# It should be true that our probe was reaped over the course of the enabling, +# causing the embedded DTrace invocation to fail on an invalid probe (that is, +# D_PDESC_INVAL) instead of an inability to grab the underlying process +# (D_PROC_GRAB). +# +grep D_PDESC_INVAL test.out 2> /dev/null 1>&2 +status=$? + +cd / +/usr/bin/rm -rf $DIR + +exit $status diff --git a/cmd/dtrace/test/tst/common/usdt/tst.reeval.ksh b/cmd/dtrace/test/tst/common/usdt/tst.reeval.ksh index 7fad40156a0..2f0ee33f1e2 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.reeval.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.reeval.ksh @@ -23,7 +23,6 @@ # Copyright 2007 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'>' @@ -52,7 +51,7 @@ provider test_prov { }; EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -62,7 +61,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.static.ksh b/cmd/dtrace/test/tst/common/usdt/tst.static.ksh index 1ebcdb95fdf..85b0e553c46 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.static.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.static.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -63,7 +62,7 @@ provider test_prov { }; EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -73,7 +72,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.static2.ksh b/cmd/dtrace/test/tst/common/usdt/tst.static2.ksh index 7cf9004c612..07b765702ca 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.static2.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.static2.ksh @@ -23,7 +23,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" # Rebuilding an object file containing DOF changes slightly when the object # files containing the probes have already been modified. This tests that @@ -67,7 +66,7 @@ provider test_prov { }; EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -83,7 +82,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create final DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/usdt/tst.user.ksh b/cmd/dtrace/test/tst/common/usdt/tst.user.ksh index d5d9fdc4d3f..f52c1c351e9 100644 --- a/cmd/dtrace/test/tst/common/usdt/tst.user.ksh +++ b/cmd/dtrace/test/tst/common/usdt/tst.user.ksh @@ -24,7 +24,6 @@ # Copyright 2006 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'>' @@ -62,7 +61,7 @@ main(int argc, char **argv) } EOF -cc -c test.c +gcc -c test.c if [ $? -ne 0 ]; then print -u2 "failed to compile test.c" exit 1 @@ -72,7 +71,7 @@ if [ $? -ne 0 ]; then print -u2 "failed to create DOF" exit 1 fi -cc -o test test.o prov.o +gcc -o test test.o prov.o if [ $? -ne 0 ]; then print -u2 "failed to link final executable" exit 1 diff --git a/cmd/dtrace/test/tst/common/ustack/tst.spin.ksh b/cmd/dtrace/test/tst/common/ustack/tst.spin.ksh index 1a7e0e12365..57c13d5abee 100644 --- a/cmd/dtrace/test/tst/common/ustack/tst.spin.ksh +++ b/cmd/dtrace/test/tst/common/ustack/tst.spin.ksh @@ -23,7 +23,6 @@ # Copyright 2006 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'>' @@ -35,7 +34,7 @@ dtrace=$1 rm -f $file -dir=`dirname $tst` +dir=`/bin/dirname $tst` $dtrace -o $file -c $dir/tst.spin.exe -s /dev/stdin < #include #include @@ -37,9 +35,9 @@ #include #ifdef _LP64 -static const char *_libctf_zlib = "/usr/lib/64/libz.so"; +static const char *_libctf_zlib = "/usr/lib/64/libz.so.1"; #else -static const char *_libctf_zlib = "/usr/lib/libz.so"; +static const char *_libctf_zlib = "/usr/lib/libz.so.1"; #endif static struct { diff --git a/lib/libdtrace/common/dt_aggregate.c b/lib/libdtrace/common/dt_aggregate.c index 2e66250b88d..bb766f71c46 100644 --- a/lib/libdtrace/common/dt_aggregate.c +++ b/lib/libdtrace/common/dt_aggregate.c @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ #include #include @@ -204,6 +206,83 @@ dt_aggregate_lquantizedcmp(int64_t *lhs, int64_t *rhs) return (0); } +static void +dt_aggregate_llquantize(int64_t *existing, int64_t *new, size_t size) +{ + int i; + + for (i = 1; i < size / sizeof (int64_t); i++) + existing[i] = existing[i] + new[i]; +} + +static long double +dt_aggregate_llquantizedsum(int64_t *llquanta) +{ + int64_t arg = *llquanta++; + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + int bin = 0, order; + int64_t value = 1, next, step; + long double total; + + assert(nsteps >= factor); + assert(nsteps % factor == 0); + + for (order = 0; order < low; order++) + value *= factor; + + total = (long double)llquanta[bin++] * (long double)(value - 1); + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + + while (order <= high) { + assert(value < next); + total += (long double)llquanta[bin++] * (long double)(value); + + if ((value += step) != next) + continue; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + order++; + } + + return (total + (long double)llquanta[bin] * (long double)value); +} + +static int +dt_aggregate_llquantizedcmp(int64_t *lhs, int64_t *rhs) +{ + long double lsum = dt_aggregate_llquantizedsum(lhs); + long double rsum = dt_aggregate_llquantizedsum(rhs); + int64_t lzero, rzero; + + if (lsum < rsum) + return (DT_LESSTHAN); + + if (lsum > rsum) + return (DT_GREATERTHAN); + + /* + * If they're both equal, then we will compare based on the weights at + * zero. If the weights at zero are equal, then this will be judged a + * tie and will be resolved based on the key comparison. + */ + lzero = lhs[1]; + rzero = rhs[1]; + + if (lzero < rzero) + return (DT_LESSTHAN); + + if (lzero > rzero) + return (DT_GREATERTHAN); + + return (0); +} + static int dt_aggregate_quantizedcmp(int64_t *lhs, int64_t *rhs) { @@ -582,6 +661,10 @@ dt_aggregate_snap_cpu(dtrace_hdl_t *dtp, processorid_t cpu) h->dtahe_aggregate = dt_aggregate_lquantize; break; + case DTRACEAGG_LLQUANTIZE: + h->dtahe_aggregate = dt_aggregate_llquantize; + break; + case DTRACEAGG_COUNT: case DTRACEAGG_SUM: case DTRACEAGG_AVG: @@ -849,6 +932,10 @@ dt_aggregate_valcmp(const void *lhs, const void *rhs) rval = dt_aggregate_lquantizedcmp(laddr, raddr); break; + case DTRACEAGG_LLQUANTIZE: + rval = dt_aggregate_llquantizedcmp(laddr, raddr); + break; + case DTRACEAGG_COUNT: case DTRACEAGG_SUM: case DTRACEAGG_MIN: diff --git a/lib/libdtrace/common/dt_cc.c b/lib/libdtrace/common/dt_cc.c index 24a386bbde9..8b8bcf475cb 100644 --- a/lib/libdtrace/common/dt_cc.c +++ b/lib/libdtrace/common/dt_cc.c @@ -21,6 +21,8 @@ /* * 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. */ /* @@ -82,6 +84,7 @@ #include #include +#include #include #include @@ -676,13 +679,59 @@ dt_action_trace(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) ap->dtad_kind = DTRACEACT_DIFEXPR; } +/* + * The print() action behaves identically to trace(), except that it stores the + * CTF type of the argument (if present) within the DOF for the DIFEXPR action. + * To do this, we set the 'dtsd_strdata' to point to the fully-qualified CTF + * type ID for the result of the DIF action. We use the ID instead of the name + * to handles complex types like arrays and function pointers that can't be + * resolved by ctf_type_lookup(). This is later processed by + * dtrace_dof_create() and turned into a reference into the string table so + * that we can get the type information when we process the data after the + * fact. + */ +static void +dt_action_print(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) +{ + dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp); + dt_node_t *dret; + size_t len; + dt_module_t *dmp; + + if (dt_node_is_void(dnp->dn_args)) { + dnerror(dnp->dn_args, D_PRINT_VOID, + "print( ) may not be applied to a void expression\n"); + } + + if (dt_node_is_dynamic(dnp->dn_args)) { + dnerror(dnp->dn_args, D_PRINT_DYN, + "print( ) may not be applied to a dynamic expression\n"); + } + + dt_cg(yypcb, dnp->dn_args); + + dret = yypcb->pcb_dret; + dmp = dt_module_lookup_by_ctf(dtp, dret->dn_ctfp); + + len = snprintf(NULL, 0, "%s`%d", dmp->dm_name, dret->dn_type) + 1; + sdp->dtsd_strdata = dt_alloc(dtp, len); + if (sdp->dtsd_strdata == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + (void) snprintf(sdp->dtsd_strdata, len, "%s`%d", dmp->dm_name, + dret->dn_type); + + ap->dtad_difo = dt_as(yypcb); + ap->dtad_kind = DTRACEACT_DIFEXPR; +} + static void dt_action_tracemem(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) { dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp); dt_node_t *addr = dnp->dn_args; - dt_node_t *size = dnp->dn_args->dn_list; + dt_node_t *max = dnp->dn_args->dn_list; + dt_node_t *size; char n[DT_TYPE_NAMELEN]; @@ -694,17 +743,37 @@ dt_action_tracemem(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) dt_node_type_name(addr, n, sizeof (n))); } - if (dt_node_is_posconst(size) == 0) { - dnerror(size, D_TRACEMEM_SIZE, "tracemem( ) argument #2 must " + if (dt_node_is_posconst(max) == 0) { + dnerror(max, D_TRACEMEM_SIZE, "tracemem( ) argument #2 must " "be a non-zero positive integral constant expression\n"); } + if ((size = max->dn_list) != NULL) { + if (size->dn_list != NULL) { + dnerror(size, D_TRACEMEM_ARGS, "tracemem ( ) prototype " + "mismatch: expected at most 3 args\n"); + } + + if (!dt_node_is_scalar(size)) { + dnerror(size, D_TRACEMEM_DYNSIZE, "tracemem ( ) " + "dynamic size (argument #3) must be of " + "scalar type\n"); + } + + dt_cg(yypcb, size); + ap->dtad_difo = dt_as(yypcb); + ap->dtad_difo->dtdo_rtype = dt_int_rtype; + ap->dtad_kind = DTRACEACT_TRACEMEM_DYNSIZE; + + ap = dt_stmt_action(dtp, sdp); + } + dt_cg(yypcb, addr); ap->dtad_difo = dt_as(yypcb); - ap->dtad_kind = DTRACEACT_DIFEXPR; + ap->dtad_kind = DTRACEACT_TRACEMEM; ap->dtad_difo->dtdo_rtype.dtdt_flags |= DIF_TF_BYREF; - ap->dtad_difo->dtdo_rtype.dtdt_size = size->dn_value; + ap->dtad_difo->dtdo_rtype.dtdt_size = max->dn_value; } static void @@ -1034,6 +1103,9 @@ dt_compile_fun(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) case DT_ACT_TRACE: dt_action_trace(dtp, dnp->dn_expr, sdp); break; + case DT_ACT_PRINT: + dt_action_print(dtp, dnp->dn_expr, sdp); + break; case DT_ACT_TRACEMEM: dt_action_tracemem(dtp, dnp->dn_expr, sdp); break; @@ -1291,6 +1363,145 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) argmax = 5; } + if (fid->di_id == DTRACEAGG_LLQUANTIZE) { + /* + * For log/linear quantizations, we have between one and five + * arguments in addition to the expression: + * + * arg1 => Factor + * arg2 => Low magnitude + * arg3 => High magnitude + * arg4 => Number of steps per magnitude + * arg5 => Quantization increment value (defaults to 1) + */ + dt_node_t *llarg = dnp->dn_aggfun->dn_args->dn_list; + uint64_t oarg, order, v; + dt_idsig_t *isp; + int i; + + struct { + char *str; /* string identifier */ + int badtype; /* error on bad type */ + int badval; /* error on bad value */ + int mismatch; /* error on bad match */ + int shift; /* shift value */ + uint16_t value; /* value itself */ + } args[] = { + { "factor", D_LLQUANT_FACTORTYPE, + D_LLQUANT_FACTORVAL, D_LLQUANT_FACTORMATCH, + DTRACE_LLQUANTIZE_FACTORSHIFT }, + { "low magnitude", D_LLQUANT_LOWTYPE, + D_LLQUANT_LOWVAL, D_LLQUANT_LOWMATCH, + DTRACE_LLQUANTIZE_LOWSHIFT }, + { "high magnitude", D_LLQUANT_HIGHTYPE, + D_LLQUANT_HIGHVAL, D_LLQUANT_HIGHMATCH, + DTRACE_LLQUANTIZE_HIGHSHIFT }, + { "linear steps per magnitude", D_LLQUANT_NSTEPTYPE, + D_LLQUANT_NSTEPVAL, D_LLQUANT_NSTEPMATCH, + DTRACE_LLQUANTIZE_NSTEPSHIFT }, + { NULL } + }; + + assert(arg == 0); + + for (i = 0; args[i].str != NULL; i++) { + if (llarg->dn_kind != DT_NODE_INT) { + dnerror(llarg, args[i].badtype, "llquantize( ) " + "argument #%d (%s) must be an " + "integer constant\n", i + 1, args[i].str); + } + + if ((uint64_t)llarg->dn_value > UINT16_MAX) { + dnerror(llarg, args[i].badval, "llquantize( ) " + "argument #%d (%s) must be an unsigned " + "16-bit quantity\n", i + 1, args[i].str); + } + + args[i].value = (uint16_t)llarg->dn_value; + + assert(!(arg & (UINT16_MAX << args[i].shift))); + arg |= ((uint64_t)args[i].value << args[i].shift); + llarg = llarg->dn_list; + } + + assert(arg != 0); + + if (args[0].value < 2) { + dnerror(dnp, D_LLQUANT_FACTORSMALL, "llquantize( ) " + "factor (argument #1) must be two or more\n"); + } + + if (args[1].value >= args[2].value) { + dnerror(dnp, D_LLQUANT_MAGRANGE, "llquantize( ) " + "high magnitude (argument #3) must be greater " + "than low magnitude (argument #2)\n"); + } + + if (args[3].value < args[0].value) { + dnerror(dnp, D_LLQUANT_FACTORNSTEPS, "llquantize( ) " + "factor (argument #1) must be less than or " + "equal to the number of linear steps per " + "magnitude (argument #4)\n"); + } + + for (v = args[0].value; v < args[3].value; v *= args[0].value) + continue; + + if ((args[3].value % args[0].value) || (v % args[3].value)) { + dnerror(dnp, D_LLQUANT_FACTOREVEN, "llquantize( ) " + "factor (argument #1) must evenly divide the " + "number of steps per magnitude (argument #4), " + "and the number of steps per magnitude must evenly " + "divide a power of the factor\n"); + } + + for (i = 0, order = 1; i < args[2].value; i++) { + if (order * args[0].value > order) { + order *= args[0].value; + continue; + } + + dnerror(dnp, D_LLQUANT_MAGTOOBIG, "llquantize( ) " + "factor (%d) raised to power of high magnitude " + "(%d) overflows 64-bits\n", args[0].value, + args[2].value); + } + + isp = (dt_idsig_t *)aid->di_data; + + if (isp->dis_auxinfo == 0) { + /* + * This is the first time we've seen an llquantize() + * for this aggregation; we'll store our argument + * as the auxiliary signature information. + */ + isp->dis_auxinfo = arg; + } else if ((oarg = isp->dis_auxinfo) != arg) { + /* + * If we have seen this llquantize() before and the + * argument doesn't match the original argument, pick + * the original argument apart to concisely report the + * mismatch. + */ + int expected = 0, found = 0; + + for (i = 0; expected == found; i++) { + assert(args[i].str != NULL); + + expected = (oarg >> args[i].shift) & UINT16_MAX; + found = (arg >> args[i].shift) & UINT16_MAX; + } + + dnerror(dnp, args[i - 1].mismatch, "llquantize( ) " + "%s (argument #%d) doesn't match previous " + "declaration: expected %d, found %d\n", + args[i - 1].str, i, expected, found); + } + + incr = llarg; + argmax = 6; + } + if (fid->di_id == DTRACEAGG_QUANTIZE) { incr = dnp->dn_aggfun->dn_args->dn_list; argmax = 2; @@ -1913,25 +2124,23 @@ dt_lib_depend_free(dtrace_hdl_t *dtp) } } - /* - * Open all of the .d library files found in the specified directory and - * compile each one in topological order to cache its inlines and translators, - * etc. We silently ignore any missing directories and other files found - * therein. We only fail (and thereby fail dt_load_libs()) if we fail to - * compile a library and the error is something other than #pragma D depends_on. - * Dependency errors are silently ignored to permit a library directory to - * contain libraries which may not be accessible depending on our privileges. + * Open all the .d library files found in the specified directory and + * compile each one of them. We silently ignore any missing directories and + * other files found therein. We only fail (and thereby fail dt_load_libs()) if + * we fail to compile a library and the error is something other than #pragma D + * depends_on. Dependency errors are silently ignored to permit a library + * directory to contain libraries which may not be accessible depending on our + * privileges. */ static int dt_load_libs_dir(dtrace_hdl_t *dtp, const char *path) { struct dirent *dp; - const char *p; + const char *p, *end; DIR *dirp; char fname[PATH_MAX]; - dtrace_prog_t *pgp; FILE *fp; void *rv; dt_lib_depend_t *dld; @@ -1955,9 +2164,28 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, const char *path) continue; } + /* + * Skip files whose name match an already processed library + */ + for (dld = dt_list_next(&dtp->dt_lib_dep); dld != NULL; + dld = dt_list_next(dld)) { + end = strrchr(dld->dtld_library, '/'); + /* dt_lib_depend_add ensures this */ + assert(end != NULL); + if (strcmp(end + 1, dp->d_name) == 0) + break; + } + + if (dld != NULL) { + dt_dprintf("skipping library %s, already processed " + "library with the same name: %s", dp->d_name, + dld->dtld_library); + continue; + } + dtp->dt_filetag = fname; if (dt_lib_depend_add(dtp, &dtp->dt_lib_dep, fname) != 0) - goto err; + return (-1); /* preserve dt_errno */ rv = dt_compile(dtp, DT_CTX_DPROG, DTRACE_PROBESPEC_NAME, NULL, @@ -1966,7 +2194,7 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, const char *path) if (rv != NULL && dtp->dt_errno && (dtp->dt_errno != EDT_COMPILER || dtp->dt_errtag != dt_errtag(D_PRAGMA_DEPEND))) - goto err; + return (-1); /* preserve dt_errno */ if (dtp->dt_errno) dt_dprintf("error parsing library %s: %s\n", @@ -1977,6 +2205,27 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, const char *path) } (void) closedir(dirp); + + return (0); +} + +/* + * Perform a topological sorting of all the libraries found across the entire + * dt_lib_path. Once sorted, compile each one in topological order to cache its + * inlines and translators, etc. We silently ignore any missing directories and + * other files found therein. We only fail (and thereby fail dt_load_libs()) if + * we fail to compile a library and the error is something other than #pragma D + * depends_on. Dependency errors are silently ignored to permit a library + * directory to contain libraries which may not be accessible depending on our + * privileges. + */ +static int +dt_load_libs_sort(dtrace_hdl_t *dtp) +{ + dtrace_prog_t *pgp; + FILE *fp; + dt_lib_depend_t *dld; + /* * Finish building the graph containing the library dependencies * and perform a topological sort to generate an ordered list @@ -2037,7 +2286,14 @@ dt_load_libs(dtrace_hdl_t *dtp) dtp->dt_cflags |= DTRACE_C_NOLIBS; - for (dirp = dt_list_next(&dtp->dt_lib_path); + /* + * /usr/lib/dtrace is always at the head of the list. The rest of the + * list is specified in the precedence order the user requested. Process + * everything other than the head first. DTRACE_C_NOLIBS has already + * been spcified so dt_vopen will ensure that there is always one entry + * in dt_lib_path. + */ + for (dirp = dt_list_next(dt_list_next(&dtp->dt_lib_path)); dirp != NULL; dirp = dt_list_next(dirp)) { if (dt_load_libs_dir(dtp, dirp->dir_path) != 0) { dtp->dt_cflags &= ~DTRACE_C_NOLIBS; @@ -2045,6 +2301,16 @@ dt_load_libs(dtrace_hdl_t *dtp) } } + /* Handle /usr/lib/dtrace */ + dirp = dt_list_next(&dtp->dt_lib_path); + if (dt_load_libs_dir(dtp, dirp->dir_path) != 0) { + dtp->dt_cflags &= ~DTRACE_C_NOLIBS; + return (-1); /* errno is set for us */ + } + + if (dt_load_libs_sort(dtp) < 0) + return (-1); /* errno is set for us */ + return (0); } diff --git a/lib/libdtrace/common/dt_consume.c b/lib/libdtrace/common/dt_consume.c index 564189a000a..d3a554c1c6b 100644 --- a/lib/libdtrace/common/dt_consume.c +++ b/lib/libdtrace/common/dt_consume.c @@ -23,6 +23,11 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. + */ + #include #include #include @@ -681,6 +686,121 @@ dt_print_lquantize(dtrace_hdl_t *dtp, FILE *fp, const void *addr, return (0); } +int +dt_print_llquantize(dtrace_hdl_t *dtp, FILE *fp, const void *addr, + size_t size, uint64_t normal) +{ + int i, first_bin, last_bin, bin = 1, order, levels; + uint16_t factor, low, high, nsteps; + const int64_t *data = addr; + int64_t value = 1, next, step; + char positives = 0, negatives = 0; + long double total = 0; + uint64_t arg; + char c[32]; + + if (size < sizeof (uint64_t)) + return (dt_set_errno(dtp, EDT_DMISMATCH)); + + arg = *data++; + size -= sizeof (uint64_t); + + factor = DTRACE_LLQUANTIZE_FACTOR(arg); + low = DTRACE_LLQUANTIZE_LOW(arg); + high = DTRACE_LLQUANTIZE_HIGH(arg); + nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + + /* + * We don't expect to be handed invalid llquantize() parameters here, + * but sanity check them (to a degree) nonetheless. + */ + if (size > INT32_MAX || factor < 2 || low >= high || + nsteps == 0 || factor > nsteps) + return (dt_set_errno(dtp, EDT_DMISMATCH)); + + levels = (int)size / sizeof (uint64_t); + + first_bin = 0; + last_bin = levels - 1; + + while (first_bin < levels && data[first_bin] == 0) + first_bin++; + + if (first_bin == levels) { + first_bin = 0; + last_bin = 1; + } else { + if (first_bin > 0) + first_bin--; + + while (last_bin > 0 && data[last_bin] == 0) + last_bin--; + + if (last_bin < levels - 1) + last_bin++; + } + + for (i = first_bin; i <= last_bin; i++) { + positives |= (data[i] > 0); + negatives |= (data[i] < 0); + total += dt_fabsl((long double)data[i]); + } + + if (dt_printf(dtp, fp, "\n%16s %41s %-9s\n", "value", + "------------- Distribution -------------", "count") < 0) + return (-1); + + for (order = 0; order < low; order++) + value *= factor; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + + if (first_bin == 0) { + (void) snprintf(c, sizeof (c), "< %lld", value); + + if (dt_printf(dtp, fp, "%16s ", c) < 0) + return (-1); + + if (dt_print_quantline(dtp, fp, data[0], normal, + total, positives, negatives) < 0) + return (-1); + } + + while (order <= high) { + if (bin >= first_bin && bin <= last_bin) { + if (dt_printf(dtp, fp, "%16lld ", (long long)value) < 0) + return (-1); + + if (dt_print_quantline(dtp, fp, data[bin], + normal, total, positives, negatives) < 0) + return (-1); + } + + assert(value < next); + bin++; + + if ((value += step) != next) + continue; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + order++; + } + + if (last_bin < bin) + return (0); + + assert(last_bin == bin); + (void) snprintf(c, sizeof (c), ">= %lld", value); + + if (dt_printf(dtp, fp, "%16s ", c) < 0) + return (-1); + + return (dt_print_quantline(dtp, fp, data[bin], normal, + total, positives, negatives)); +} + /*ARGSUSED*/ static int dt_print_average(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, @@ -708,7 +828,7 @@ dt_print_stddev(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, /*ARGSUSED*/ int dt_print_bytes(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, - size_t nbytes, int width, int quiet) + size_t nbytes, int width, int quiet, int forceraw) { /* * If the byte stream is a series of printable characters, followed by @@ -721,6 +841,9 @@ dt_print_bytes(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, if (nbytes == 0) return (0); + if (forceraw) + goto raw; + if (dtp->dt_options[DTRACEOPT_RAWBYTES] != DTRACEOPT_UNSET) goto raw; @@ -1397,6 +1520,9 @@ dt_print_datum(dtrace_hdl_t *dtp, FILE *fp, dtrace_recdesc_t *rec, case DTRACEAGG_LQUANTIZE: return (dt_print_lquantize(dtp, fp, addr, size, normal)); + case DTRACEAGG_LLQUANTIZE: + return (dt_print_llquantize(dtp, fp, addr, size, normal)); + case DTRACEAGG_AVG: return (dt_print_average(dtp, fp, addr, size, normal)); @@ -1428,7 +1554,7 @@ dt_print_datum(dtrace_hdl_t *dtp, FILE *fp, dtrace_recdesc_t *rec, (uint32_t)normal); break; default: - err = dt_print_bytes(dtp, fp, addr, size, 50, 0); + err = dt_print_bytes(dtp, fp, addr, size, 50, 0, 0); break; } @@ -1583,6 +1709,7 @@ dt_consume_cpu(dtrace_hdl_t *dtp, FILE *fp, int cpu, dtrace_bufdesc_t *buf, int quiet = (dtp->dt_options[DTRACEOPT_QUIET] != DTRACEOPT_UNSET); int rval, i, n; dtrace_epid_t last = DTRACE_EPIDNONE; + uint64_t tracememsize = 0; dtrace_probedata_t data; uint64_t drops; caddr_t addr; @@ -1751,6 +1878,13 @@ dt_consume_cpu(dtrace_hdl_t *dtp, FILE *fp, int cpu, dtrace_bufdesc_t *buf, } } + if (act == DTRACEACT_TRACEMEM_DYNSIZE && + rec->dtrd_size == sizeof (uint64_t)) { + /* LINTED - alignment */ + tracememsize = *((unsigned long long *)addr); + continue; + } + rval = (*rfunc)(&data, rec, arg); if (rval == DTRACE_CONSUME_NEXT) @@ -1842,6 +1976,35 @@ dt_consume_cpu(dtrace_hdl_t *dtp, FILE *fp, int cpu, dtrace_bufdesc_t *buf, goto nextrec; } + /* + * If this is a DIF expression, and the record has a + * format set, this indicates we have a CTF type name + * associated with the data and we should try to print + * it out by type. + */ + if (act == DTRACEACT_DIFEXPR) { + const char *strdata = dt_strdata_lookup(dtp, + rec->dtrd_format); + if (strdata != NULL) { + n = dtrace_print(dtp, fp, strdata, + addr, rec->dtrd_size); + + /* + * dtrace_print() will return -1 on + * error, or return the number of bytes + * consumed. It will return 0 if the + * type couldn't be determined, and we + * should fall through to the normal + * trace method. + */ + if (n < 0) + return (-1); + + if (n > 0) + goto nextrec; + } + } + nofmt: if (act == DTRACEACT_PRINTA) { dt_print_aggdata_t pd; @@ -1910,6 +2073,23 @@ dt_consume_cpu(dtrace_hdl_t *dtp, FILE *fp, int cpu, dtrace_bufdesc_t *buf, goto nextrec; } + if (act == DTRACEACT_TRACEMEM) { + if (tracememsize == 0 || + tracememsize > rec->dtrd_size) { + tracememsize = rec->dtrd_size; + } + + n = dt_print_bytes(dtp, fp, addr, + tracememsize, 33, quiet, 1); + + tracememsize = 0; + + if (n < 0) + return (-1); + + goto nextrec; + } + switch (rec->dtrd_size) { case sizeof (uint64_t): n = dt_printf(dtp, fp, @@ -1933,7 +2113,7 @@ dt_consume_cpu(dtrace_hdl_t *dtp, FILE *fp, int cpu, dtrace_bufdesc_t *buf, break; default: n = dt_print_bytes(dtp, fp, addr, - rec->dtrd_size, 33, quiet); + rec->dtrd_size, 33, quiet, 0); break; } diff --git a/lib/libdtrace/common/dt_decl.c b/lib/libdtrace/common/dt_decl.c index bb779840406..d2a0b29ca8e 100644 --- a/lib/libdtrace/common/dt_decl.c +++ b/lib/libdtrace/common/dt_decl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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. @@ -19,13 +18,11 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -703,8 +700,7 @@ dt_decl_enumerator(char *s, dt_node_t *dnp) char *name; int value; - name = alloca(strlen(s) + 1); - (void) strcpy(name, s); + name = strdupa(s); free(s); if (dsp == NULL) diff --git a/lib/libdtrace/common/dt_dof.c b/lib/libdtrace/common/dt_dof.c index a7eb8e4d239..04c4c89cdbd 100644 --- a/lib/libdtrace/common/dt_dof.c +++ b/lib/libdtrace/common/dt_dof.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #include @@ -754,16 +755,23 @@ dtrace_dof_create(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, uint_t flags) dofa[i].dofa_difo = DOF_SECIDX_NONE; /* - * If the first action in a statement has format data, - * add the format string to the global string table. + * If the first action in a statement has string data, + * add the string to the global string table. This can + * be due either to a printf() format string + * (dtsd_fmtdata) or a print() type string + * (dtsd_strdata). */ if (sdp != NULL && ap == sdp->dtsd_action) { if (sdp->dtsd_fmtdata != NULL) { (void) dtrace_printf_format(dtp, sdp->dtsd_fmtdata, fmt, maxfmt + 1); strndx = dof_add_string(ddo, fmt); - } else + } else if (sdp->dtsd_strdata != NULL) { + strndx = dof_add_string(ddo, + sdp->dtsd_strdata); + } else { strndx = 0; /* use dtad_arg instead */ + } if ((next = dt_list_next(next)) != NULL) sdp = next->ds_desc; diff --git a/lib/libdtrace/common/dt_errtags.h b/lib/libdtrace/common/dt_errtags.h index 9e32dfdf249..473e2addc78 100644 --- a/lib/libdtrace/common/dt_errtags.h +++ b/lib/libdtrace/common/dt_errtags.h @@ -24,11 +24,14 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. + */ + #ifndef _DT_ERRTAGS_H #define _DT_ERRTAGS_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -187,8 +190,12 @@ typedef enum { D_PRINTA_AGGPROTO, /* printa() aggregation mismatch */ D_TRACE_VOID, /* trace() argument has void type */ D_TRACE_DYN, /* trace() argument has dynamic type */ + D_PRINT_VOID, /* print() argument has void type */ + D_PRINT_DYN, /* print() argument has dynamic type */ D_TRACEMEM_ADDR, /* tracemem() address bad type */ D_TRACEMEM_SIZE, /* tracemem() size bad type */ + D_TRACEMEM_ARGS, /* tracemem() illegal number of args */ + D_TRACEMEM_DYNSIZE, /* tracemem() dynamic size bad type */ D_STACK_PROTO, /* stack() prototype mismatch */ D_STACK_SIZE, /* stack() size argument bad type */ D_USTACK_FRAMES, /* ustack() frames arg bad type */ @@ -235,7 +242,24 @@ typedef enum { D_FREOPEN_INVALID, /* frename() filename is invalid */ D_LQUANT_MATCHBASE, /* lquantize() mismatch on base */ D_LQUANT_MATCHLIM, /* lquantize() mismatch on limit */ - D_LQUANT_MATCHSTEP /* lquantize() mismatch on step */ + D_LQUANT_MATCHSTEP, /* lquantize() mismatch on step */ + D_LLQUANT_FACTORTYPE, /* llquantize() bad magnitude type */ + D_LLQUANT_FACTORVAL, /* llquantize() bad magnitude value */ + D_LLQUANT_FACTORMATCH, /* llquantize() mismatch on magnitude */ + D_LLQUANT_LOWTYPE, /* llquantize() bad low mag type */ + D_LLQUANT_LOWVAL, /* llquantize() bad low mag value */ + D_LLQUANT_LOWMATCH, /* llquantize() mismatch on low mag */ + D_LLQUANT_HIGHTYPE, /* llquantize() bad high mag type */ + D_LLQUANT_HIGHVAL, /* llquantize() bad high mag value */ + D_LLQUANT_HIGHMATCH, /* llquantize() mismatch on high mag */ + D_LLQUANT_NSTEPTYPE, /* llquantize() bad # steps type */ + D_LLQUANT_NSTEPVAL, /* llquantize() bad # steps value */ + D_LLQUANT_NSTEPMATCH, /* llquantize() mismatch on # steps */ + D_LLQUANT_MAGRANGE, /* llquantize() bad magnitude range */ + D_LLQUANT_FACTORNSTEPS, /* llquantize() # steps < factor */ + D_LLQUANT_FACTOREVEN, /* llquantize() bad # steps/factor */ + D_LLQUANT_FACTORSMALL, /* llquantize() magnitude too small */ + D_LLQUANT_MAGTOOBIG /* llquantize() high mag too large */ } dt_errtag_t; extern const char *dt_errtag(dt_errtag_t); diff --git a/lib/libdtrace/common/dt_ident.c b/lib/libdtrace/common/dt_ident.c index c437e0ab031..3dfa058b169 100644 --- a/lib/libdtrace/common/dt_ident.c +++ b/lib/libdtrace/common/dt_ident.c @@ -20,12 +20,9 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -181,8 +178,7 @@ dt_idcook_func(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) int i = 0; assert(idp->di_iarg != NULL); - s = alloca(strlen(idp->di_iarg) + 1); - (void) strcpy(s, idp->di_iarg); + s = strdupa(idp->di_iarg); if ((p2 = strrchr(s, ')')) != NULL) *p2 = '\0'; /* mark end of parameter list string */ diff --git a/lib/libdtrace/common/dt_impl.h b/lib/libdtrace/common/dt_impl.h index 1937ce06474..b06fd6477d7 100644 --- a/lib/libdtrace/common/dt_impl.h +++ b/lib/libdtrace/common/dt_impl.h @@ -24,6 +24,11 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. + */ + #ifndef _DT_IMPL_H #define _DT_IMPL_H @@ -236,6 +241,8 @@ struct dtrace_hdl { dtrace_aggdesc_t **dt_aggdesc; /* aggregation descriptions */ int dt_maxformat; /* max format ID */ void **dt_formats; /* pointer to format array */ + int dt_maxstrdata; /* max strdata ID */ + char **dt_strdata; /* pointer to strdata array */ dt_aggregate_t dt_aggregate; /* aggregate */ dtrace_bufdesc_t dt_buf; /* staging buffer */ struct dt_pfdict *dt_pfdict; /* dictionary of printf conversions */ @@ -413,6 +420,7 @@ struct dtrace_hdl { #define DT_ACT_UMOD DT_ACT(26) /* umod() action */ #define DT_ACT_UADDR DT_ACT(27) /* uaddr() action */ #define DT_ACT_SETOPT DT_ACT(28) /* setopt() action */ +#define DT_ACT_PRINT DT_ACT(29) /* print() action */ /* * Sentinel to tell freopen() to restore the saved stdout. This must not @@ -596,10 +604,15 @@ extern void dt_aggid_destroy(dtrace_hdl_t *); extern void *dt_format_lookup(dtrace_hdl_t *, int); extern void dt_format_destroy(dtrace_hdl_t *); +extern const char *dt_strdata_lookup(dtrace_hdl_t *, int); +extern void dt_strdata_destroy(dtrace_hdl_t *); + extern int dt_print_quantize(dtrace_hdl_t *, FILE *, const void *, size_t, uint64_t); extern int dt_print_lquantize(dtrace_hdl_t *, FILE *, const void *, size_t, uint64_t); +extern int dt_print_llquantize(dtrace_hdl_t *, FILE *, + const void *, size_t, uint64_t); extern int dt_print_agg(const dtrace_aggdata_t *, void *); extern int dt_handle(dtrace_hdl_t *, dtrace_probedata_t *); diff --git a/lib/libdtrace/common/dt_map.c b/lib/libdtrace/common/dt_map.c index 15361862de8..8a3ce817e4d 100644 --- a/lib/libdtrace/common/dt_map.c +++ b/lib/libdtrace/common/dt_map.c @@ -23,7 +23,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2011 by Delphix. All rights reserved. + */ #include #include @@ -34,11 +36,82 @@ #include #include +static int +dt_strdata_add(dtrace_hdl_t *dtp, dtrace_recdesc_t *rec, void ***data, int *max) +{ + int maxformat; + dtrace_fmtdesc_t fmt; + void *result; + + if (rec->dtrd_format == 0) + return (0); + + if (rec->dtrd_format <= *max && + (*data)[rec->dtrd_format - 1] != NULL) { + return (0); + } + + bzero(&fmt, sizeof (fmt)); + fmt.dtfd_format = rec->dtrd_format; + fmt.dtfd_string = NULL; + fmt.dtfd_length = 0; + + if (dt_ioctl(dtp, DTRACEIOC_FORMAT, &fmt) == -1) + return (dt_set_errno(dtp, errno)); + + if ((fmt.dtfd_string = dt_alloc(dtp, fmt.dtfd_length)) == NULL) + return (dt_set_errno(dtp, EDT_NOMEM)); + + if (dt_ioctl(dtp, DTRACEIOC_FORMAT, &fmt) == -1) { + free(fmt.dtfd_string); + return (dt_set_errno(dtp, errno)); + } + + while (rec->dtrd_format > (maxformat = *max)) { + int new_max = maxformat ? (maxformat << 1) : 1; + size_t nsize = new_max * sizeof (void *); + size_t osize = maxformat * sizeof (void *); + void **new_data = dt_zalloc(dtp, nsize); + + if (new_data == NULL) { + dt_free(dtp, fmt.dtfd_string); + return (dt_set_errno(dtp, EDT_NOMEM)); + } + + bcopy(*data, new_data, osize); + free(*data); + + *data = new_data; + *max = new_max; + } + + switch (rec->dtrd_action) { + case DTRACEACT_DIFEXPR: + result = fmt.dtfd_string; + break; + case DTRACEACT_PRINTA: + result = dtrace_printa_create(dtp, fmt.dtfd_string); + dt_free(dtp, fmt.dtfd_string); + break; + default: + result = dtrace_printf_create(dtp, fmt.dtfd_string); + dt_free(dtp, fmt.dtfd_string); + break; + } + + if (result == NULL) + return (-1); + + (*data)[rec->dtrd_format - 1] = result; + + return (0); +} + static int dt_epid_add(dtrace_hdl_t *dtp, dtrace_epid_t id) { dtrace_id_t max; - int rval, i, maxformat; + int rval, i; dtrace_eprobedesc_t *enabled, *nenabled; dtrace_probedesc_t *probe; @@ -124,71 +197,23 @@ dt_epid_add(dtrace_hdl_t *dtp, dtrace_epid_t id) } for (i = 0; i < enabled->dtepd_nrecs; i++) { - dtrace_fmtdesc_t fmt; dtrace_recdesc_t *rec = &enabled->dtepd_rec[i]; - if (!DTRACEACT_ISPRINTFLIKE(rec->dtrd_action)) - continue; - - if (rec->dtrd_format == 0) - continue; - - if (rec->dtrd_format <= dtp->dt_maxformat && - dtp->dt_formats[rec->dtrd_format - 1] != NULL) - continue; - - bzero(&fmt, sizeof (fmt)); - fmt.dtfd_format = rec->dtrd_format; - fmt.dtfd_string = NULL; - fmt.dtfd_length = 0; - - if (dt_ioctl(dtp, DTRACEIOC_FORMAT, &fmt) == -1) { - rval = dt_set_errno(dtp, errno); - goto err; - } - - if ((fmt.dtfd_string = malloc(fmt.dtfd_length)) == NULL) { - rval = dt_set_errno(dtp, EDT_NOMEM); - goto err; - } - - if (dt_ioctl(dtp, DTRACEIOC_FORMAT, &fmt) == -1) { - rval = dt_set_errno(dtp, errno); - free(fmt.dtfd_string); - goto err; - } - - while (rec->dtrd_format > (maxformat = dtp->dt_maxformat)) { - int new_max = maxformat ? (maxformat << 1) : 1; - size_t nsize = new_max * sizeof (void *); - size_t osize = maxformat * sizeof (void *); - void **new_formats = malloc(nsize); - - if (new_formats == NULL) { - rval = dt_set_errno(dtp, EDT_NOMEM); - free(fmt.dtfd_string); + if (DTRACEACT_ISPRINTFLIKE(rec->dtrd_action)) { + if (dt_strdata_add(dtp, rec, &dtp->dt_formats, + &dtp->dt_maxformat) != 0) { + rval = -1; + goto err; + } + } else if (rec->dtrd_action == DTRACEACT_DIFEXPR) { + if (dt_strdata_add(dtp, rec, + (void ***)&dtp->dt_strdata, + &dtp->dt_maxstrdata) != 0) { + rval = -1; goto err; } - - bzero(new_formats, nsize); - bcopy(dtp->dt_formats, new_formats, osize); - free(dtp->dt_formats); - - dtp->dt_formats = new_formats; - dtp->dt_maxformat = new_max; } - dtp->dt_formats[rec->dtrd_format - 1] = - rec->dtrd_action == DTRACEACT_PRINTA ? - dtrace_printa_create(dtp, fmt.dtfd_string) : - dtrace_printf_create(dtp, fmt.dtfd_string); - - free(fmt.dtfd_string); - - if (dtp->dt_formats[rec->dtrd_format - 1] == NULL) { - rval = -1; /* dt_errno is set for us */ - goto err; - } } dtp->dt_pdesc[id] = probe; @@ -424,3 +449,28 @@ dt_aggid_destroy(dtrace_hdl_t *dtp) dtp->dt_aggdesc = NULL; dtp->dt_maxagg = 0; } + +const char * +dt_strdata_lookup(dtrace_hdl_t *dtp, int idx) +{ + if (idx == 0 || idx > dtp->dt_maxstrdata) + return (NULL); + + if (dtp->dt_strdata == NULL) + return (NULL); + + return (dtp->dt_strdata[idx - 1]); +} + +void +dt_strdata_destroy(dtrace_hdl_t *dtp) +{ + int i; + + for (i = 0; i < dtp->dt_maxstrdata; i++) { + free(dtp->dt_strdata[i]); + } + + free(dtp->dt_strdata); + dtp->dt_strdata = NULL; +} diff --git a/lib/libdtrace/common/dt_open.c b/lib/libdtrace/common/dt_open.c index 2b9cd7c414d..502a9d42ad7 100644 --- a/lib/libdtrace/common/dt_open.c +++ b/lib/libdtrace/common/dt_open.c @@ -21,6 +21,8 @@ /* * 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. */ #include @@ -103,8 +105,13 @@ #define DT_VERS_1_6_1 DT_VERSION_NUMBER(1, 6, 1) #define DT_VERS_1_6_2 DT_VERSION_NUMBER(1, 6, 2) #define DT_VERS_1_6_3 DT_VERSION_NUMBER(1, 6, 3) -#define DT_VERS_LATEST DT_VERS_1_6_3 -#define DT_VERS_STRING "Sun D 1.6.3" +#define DT_VERS_1_7 DT_VERSION_NUMBER(1, 7, 0) +#define DT_VERS_1_7_1 DT_VERSION_NUMBER(1, 7, 1) +#define DT_VERS_1_8 DT_VERSION_NUMBER(1, 8, 0) +#define DT_VERS_1_8_1 DT_VERSION_NUMBER(1, 8, 1) +#define DT_VERS_1_9 DT_VERSION_NUMBER(1, 9, 0) +#define DT_VERS_LATEST DT_VERS_1_9 +#define DT_VERS_STRING "Sun D 1.9" const dt_version_t _dtrace_versions[] = { DT_VERS_1_0, /* D API 1.0.0 (PSARC 2001/466) Solaris 10 FCS */ @@ -120,6 +127,11 @@ const dt_version_t _dtrace_versions[] = { DT_VERS_1_6_1, /* D API 1.6.1 */ DT_VERS_1_6_2, /* D API 1.6.2 */ DT_VERS_1_6_3, /* D API 1.6.3 */ + DT_VERS_1_7, /* D API 1.7 */ + DT_VERS_1_7_1, /* D API 1.7.1 */ + DT_VERS_1_8, /* D API 1.8 */ + DT_VERS_1_8_1, /* D API 1.8.1 */ + DT_VERS_1_9, /* D API 1.9 */ 0 }; @@ -250,7 +262,10 @@ static const dt_ident_t _dtrace_globals[] = { { "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "stack(...)" }, { "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0, - &dt_idops_func, "string(int64_t)" }, + &dt_idops_func, "string(int64_t, [int])" }, +{ "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN, + DT_VERS_1_7, &dt_idops_func, + "void(@, int32_t, int32_t, int32_t, int32_t, ...)" }, { "lquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LQUANTIZE, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@, int32_t, int32_t, ...)" }, @@ -292,6 +307,8 @@ static const dt_ident_t _dtrace_globals[] = { &dt_idops_type, "pid_t" }, { "ppid", DT_IDENT_SCALAR, 0, DIF_VAR_PPID, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "pid_t" }, +{ "print", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINT, DT_ATTR_STABCMN, DT_VERS_1_9, + &dt_idops_func, "void(@)" }, { "printa", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTA, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@, ...)" }, { "printf", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTF, DT_ATTR_STABCMN, DT_VERS_1_0, @@ -371,11 +388,15 @@ static const dt_ident_t _dtrace_globals[] = { { "timestamp", DT_IDENT_SCALAR, 0, DIF_VAR_TIMESTAMP, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "uint64_t" }, +{ "tolower", DT_IDENT_FUNC, 0, DIF_SUBR_TOLOWER, DT_ATTR_STABCMN, DT_VERS_1_8, + &dt_idops_func, "string(const char *)" }, +{ "toupper", DT_IDENT_FUNC, 0, DIF_SUBR_TOUPPER, DT_ATTR_STABCMN, DT_VERS_1_8, + &dt_idops_func, "string(const char *)" }, { "trace", DT_IDENT_ACTFUNC, 0, DT_ACT_TRACE, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@)" }, { "tracemem", DT_IDENT_ACTFUNC, 0, DT_ACT_TRACEMEM, DT_ATTR_STABCMN, DT_VERS_1_0, - &dt_idops_func, "void(@, size_t)" }, + &dt_idops_func, "void(@, size_t, ...)" }, { "trunc", DT_IDENT_ACTFUNC, 0, DT_ACT_TRUNC, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(...)" }, { "uaddr", DT_IDENT_ACTFUNC, 0, DT_ACT_UADDR, DT_ATTR_STABCMN, @@ -397,6 +418,8 @@ static const dt_ident_t _dtrace_globals[] = { &dt_idops_type, "uint32_t" }, { "usym", DT_IDENT_ACTFUNC, 0, DT_ACT_USYM, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" }, +{ "vmregs", DT_IDENT_ARRAY, 0, DIF_VAR_VMREGS, DT_ATTR_STABCMN, DT_VERS_1_7, + &dt_idops_regs, NULL }, { "vtimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_VTIMESTAMP, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "uint64_t" }, @@ -1339,6 +1362,7 @@ dtrace_close(dtrace_hdl_t *dtp) dt_epid_destroy(dtp); dt_aggid_destroy(dtp); dt_format_destroy(dtp); + dt_strdata_destroy(dtp); dt_buffered_destroy(dtp); dt_aggregate_destroy(dtp); free(dtp->dt_buf.dtbd_data); diff --git a/lib/libdtrace/common/dt_options.c b/lib/libdtrace/common/dt_options.c index 5353bfae528..426f8cb73c7 100644 --- a/lib/libdtrace/common/dt_options.c +++ b/lib/libdtrace/common/dt_options.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -837,30 +835,6 @@ dt_options_load(dtrace_hdl_t *dtp) return (0); } -/*ARGSUSED*/ -static int -dt_opt_preallocate(dtrace_hdl_t *dtp, const char *arg, uintptr_t option) -{ - dtrace_optval_t size; - void *p; - - if (arg == NULL || dt_optval_parse(arg, &size) != 0) - return (dt_set_errno(dtp, EDT_BADOPTVAL)); - - if (size > SIZE_MAX) - size = SIZE_MAX; - - if ((p = dt_zalloc(dtp, size)) == NULL) { - do { - size /= 2; - } while ((p = dt_zalloc(dtp, size)) == NULL); - } - - dt_free(dtp, p); - - return (0); -} - typedef struct dt_option { const char *o_name; int (*o_func)(dtrace_hdl_t *, const char *, uintptr_t); @@ -899,7 +873,6 @@ static const dt_option_t _dtrace_ctoptions[] = { { "linktype", dt_opt_linktype }, { "nolibs", dt_opt_cflags, DTRACE_C_NOLIBS }, { "pgmax", dt_opt_pgmax }, - { "preallocate", dt_opt_preallocate }, { "pspec", dt_opt_cflags, DTRACE_C_PSPEC }, { "stdc", dt_opt_stdc }, { "strip", dt_opt_dflags, DTRACE_D_STRIP }, diff --git a/lib/libdtrace/common/dt_parser.c b/lib/libdtrace/common/dt_parser.c index 9aabc18565d..05715894a7d 100644 --- a/lib/libdtrace/common/dt_parser.c +++ b/lib/libdtrace/common/dt_parser.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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. @@ -21,12 +20,10 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent Inc. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * DTrace D Language Parser * @@ -472,9 +469,9 @@ dt_node_name(const dt_node_t *dnp, char *buf, size_t len) case DT_NODE_XLATOR: (void) snprintf(buf, len, "translator <%s> (%s)", dt_type_name(dnp->dn_xlator->dx_dst_ctfp, - dnp->dn_xlator->dx_dst_type, n1, sizeof (n1)), + dnp->dn_xlator->dx_dst_type, n1, sizeof (n1)), dt_type_name(dnp->dn_xlator->dx_src_ctfp, - dnp->dn_xlator->dx_src_type, n2, sizeof (n2))); + dnp->dn_xlator->dx_src_type, n2, sizeof (n2))); break; case DT_NODE_PROG: (void) snprintf(buf, len, "%s", "program"); @@ -723,12 +720,19 @@ dt_node_type_name(const dt_node_t *dnp, char *buf, size_t len) size_t dt_node_type_size(const dt_node_t *dnp) { + ctf_id_t base; + if (dnp->dn_kind == DT_NODE_STRING) return (strlen(dnp->dn_string) + 1); if (dt_node_is_dynamic(dnp) && dnp->dn_ident != NULL) return (dt_ident_size(dnp->dn_ident)); + base = ctf_type_resolve(dnp->dn_ctfp, dnp->dn_type); + + if (ctf_type_kind(dnp->dn_ctfp, base) == CTF_K_FORWARD) + return (0); + return (ctf_type_size(dnp->dn_ctfp, dnp->dn_type)); } @@ -1440,9 +1444,9 @@ dt_node_decl(void) "\t current: %s\n\tprevious: %s\n", dmp->dm_name, dsp->ds_ident, dt_type_name(dtt.dtt_ctfp, dtt.dtt_type, - n1, sizeof (n1)), + n1, sizeof (n1)), dt_type_name(ott.dtt_ctfp, ott.dtt_type, - n2, sizeof (n2))); + n2, sizeof (n2))); } else if (!exists && dt_module_extern(dtp, dmp, dsp->ds_ident, &dtt) == NULL) { xyerror(D_UNKNOWN, @@ -1452,7 +1456,7 @@ dt_node_decl(void) dt_dprintf("extern %s`%s type=<%s>\n", dmp->dm_name, dsp->ds_ident, dt_type_name(dtt.dtt_ctfp, dtt.dtt_type, - n1, sizeof (n1))); + n1, sizeof (n1))); } break; } @@ -1756,8 +1760,7 @@ dt_node_offsetof(dt_decl_t *ddp, char *s) ctf_id_t type; uint_t kind; - name = alloca(strlen(s) + 1); - (void) strcpy(name, s); + name = strdupa(s); free(s); err = dt_decl_type(ddp, &dtt); diff --git a/lib/libdtrace/common/dt_pragma.c b/lib/libdtrace/common/dt_pragma.c index a8bab85c008..9fae5ac42c4 100644 --- a/lib/libdtrace/common/dt_pragma.c +++ b/lib/libdtrace/common/dt_pragma.c @@ -20,18 +20,20 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent Inc. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include +#include #include #include +#include +#include + #include #include #include @@ -199,6 +201,29 @@ dt_pragma_binding(const char *prname, dt_node_t *dnp) dtp->dt_globals->dh_defer = &dt_pragma_apply; } +static void +dt_pragma_depends_finddep(dtrace_hdl_t *dtp, const char *lname, char *lib, + size_t len) +{ + dt_dirpath_t *dirp; + struct stat sbuf; + int found = 0; + + for (dirp = dt_list_next(&dtp->dt_lib_path); dirp != NULL; + dirp = dt_list_next(dirp)) { + (void) snprintf(lib, len, "%s/%s", dirp->dir_path, lname); + + if (stat(lib, &sbuf) == 0) { + found = 1; + break; + } + } + + if (!found) + xyerror(D_PRAGMA_DEPEND, + "failed to find dependency in libpath: %s", lname); +} + /* * The #pragma depends_on directive can be used to express a dependency on a * module, provider or library which if not present will cause processing to @@ -228,16 +253,13 @@ dt_pragma_depends(const char *prname, dt_node_t *cnp) if (yypcb->pcb_cflags & DTRACE_C_CTL) { assert(dtp->dt_filetag != NULL); - /* - * We have the file we are working on in dtp->dt_filetag - * so find that node and add the dependency in. - */ + dt_pragma_depends_finddep(dtp, nnp->dn_string, lib, + sizeof (lib)); + dld = dt_lib_depend_lookup(&dtp->dt_lib_dep, dtp->dt_filetag); assert(dld != NULL); - (void) snprintf(lib, sizeof (lib), "%s%s", - dld->dtld_libpath, nnp->dn_string); if ((dt_lib_depend_add(dtp, &dld->dtld_dependencies, lib)) != 0) { xyerror(D_PRAGMA_DEPEND, @@ -259,8 +281,8 @@ dt_pragma_depends(const char *prname, dt_node_t *cnp) dtp->dt_filetag); assert(dld != NULL); - (void) snprintf(lib, sizeof (lib), "%s%s", - dld->dtld_libpath, nnp->dn_string); + dt_pragma_depends_finddep(dtp, nnp->dn_string, lib, + sizeof (lib)); dld = dt_lib_depend_lookup(&dtp->dt_lib_dep_sorted, lib); assert(dld != NULL); @@ -337,8 +359,7 @@ dt_pragma_option(const char *prname, dt_node_t *dnp) "superfluous arguments specified for #pragma %s\n", prname); } - opt = alloca(strlen(dnp->dn_string) + 1); - (void) strcpy(opt, dnp->dn_string); + opt = strdupa(dnp->dn_string); if ((val = strchr(opt, '=')) != NULL) *val++ = '\0'; diff --git a/lib/libdtrace/common/dt_print.c b/lib/libdtrace/common/dt_print.c new file mode 100644 index 00000000000..261fc8ced4d --- /dev/null +++ b/lib/libdtrace/common/dt_print.c @@ -0,0 +1,648 @@ +/* + * 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. + */ +/* + * Copyright (c) 2011 by Delphix. All rights reserved. + */ + +/* + * DTrace print() action + * + * This file contains the post-processing logic for the print() action. The + * print action behaves identically to trace() in that it generates a + * DTRACEACT_DIFEXPR action, but the action argument field refers to a CTF type + * string stored in the DOF string table (similar to printf formats). We + * take the result of the trace action and post-process it in the fashion of + * MDB's ::print dcmd. + * + * This implementation differs from MDB's in the following ways: + * + * - We do not expose any options or flags. The behavior of print() is + * equivalent to "::print -tn". + * + * - MDB will display "holes" in structures (unused padding between + * members). + * + * - When printing arrays of structures, MDB will leave a trailing ',' + * after the last element. + * + * - MDB will print time_t types as date and time. + * + * - MDB will detect when an enum is actually the OR of several flags, + * and print it out with the constituent flags separated. + * + * - For large arrays, MDB will print the first few members and then + * print a "..." continuation line. + * + * - MDB will break and wrap arrays at 80 columns. + * + * - MDB prints out floats and doubles by hand, as it must run in kmdb + * context. We're able to leverage the printf() format strings, + * but the result is a slightly different format. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +/* determines whether the given integer CTF encoding is a character */ +#define CTF_IS_CHAR(e) \ + (((e).cte_format & (CTF_INT_CHAR | CTF_INT_SIGNED)) == \ + (CTF_INT_CHAR | CTF_INT_SIGNED) && (e).cte_bits == NBBY) +/* determines whether the given CTF kind is a struct or union */ +#define CTF_IS_STRUCTLIKE(k) \ + ((k) == CTF_K_STRUCT || (k) == CTF_K_UNION) + +/* + * Print structure passed down recursively through printing algorithm. + */ +typedef struct dt_printarg { + caddr_t pa_addr; /* base address of trace data */ + ctf_file_t *pa_ctfp; /* CTF container */ + int pa_depth; /* member depth */ + int pa_nest; /* nested array depth */ + FILE *pa_file; /* output file */ +} dt_printarg_t; + +static int dt_print_member(const char *, ctf_id_t, ulong_t, int, void *); + +/* + * Safe version of ctf_type_name() that will fall back to just "" if it + * can't resolve the type. + */ +static void +dt_print_type_name(ctf_file_t *ctfp, ctf_id_t id, char *buf, size_t buflen) +{ + if (ctf_type_name(ctfp, id, buf, buflen) == NULL) + (void) snprintf(buf, buflen, "<%ld>", id); +} + +/* + * Print any necessary trailing braces for structures or unions. We don't get + * invoked when a struct or union ends, so we infer the need to print braces + * based on the depth the last time we printed something and the new depth. + */ +static void +dt_print_trailing_braces(dt_printarg_t *pap, int depth) +{ + int d; + + for (d = pap->pa_depth; d > depth; d--) { + (void) fprintf(pap->pa_file, "%*s}%s", + (d + pap->pa_nest - 1) * 4, "", + d == depth + 1 ? "" : "\n"); + } +} + +/* + * Print the appropriate amount of indentation given the current depth and + * array nesting. + */ +static void +dt_print_indent(dt_printarg_t *pap) +{ + (void) fprintf(pap->pa_file, "%*s", + (pap->pa_depth + pap->pa_nest) * 4, ""); +} + +/* + * Print a bitfield. It's worth noting that the D compiler support for + * bitfields is currently broken; printing "D`user_desc_t" (pulled in by the + * various D provider files) will produce incorrect results compared to + * "genunix`user_desc_t". + */ +static void +print_bitfield(dt_printarg_t *pap, ulong_t off, ctf_encoding_t *ep) +{ + FILE *fp = pap->pa_file; + caddr_t addr = pap->pa_addr + off / NBBY; + uint64_t mask = (1ULL << ep->cte_bits) - 1; + uint64_t value = 0; + size_t size = (ep->cte_bits + (NBBY - 1)) / NBBY; + uint8_t *buf = (uint8_t *)&value; + uint8_t shift; + + /* + * On big-endian machines, we need to adjust the buf pointer to refer + * to the lowest 'size' bytes in 'value', and we need to shift based on + * the offset from the end of the data, not the offset of the start. + */ +#ifdef _BIG_ENDIAN + buf += sizeof (value) - size; + off += ep->cte_bits; +#endif + bcopy(addr, buf, size); + shift = off % NBBY; + + /* + * Offsets are counted from opposite ends on little- and + * big-endian machines. + */ +#ifdef _BIG_ENDIAN + shift = NBBY - shift; +#endif + + /* + * If the bits we want do not begin on a byte boundary, shift the data + * right so that the value is in the lowest 'cte_bits' of 'value'. + */ + if (off % NBBY != 0) + value >>= shift; + value &= mask; + + (void) fprintf(fp, "%#llx", (u_longlong_t)value); +} + +/* + * Dump the contents of memory as a fixed-size integer in hex. + */ +static void +dt_print_hex(FILE *fp, caddr_t addr, size_t size) +{ + switch (size) { + case sizeof (uint8_t): + (void) fprintf(fp, "%#x", *(uint8_t *)addr); + break; + case sizeof (uint16_t): + /* LINTED - alignment */ + (void) fprintf(fp, "%#x", *(uint16_t *)addr); + break; + case sizeof (uint32_t): + /* LINTED - alignment */ + (void) fprintf(fp, "%#x", *(uint32_t *)addr); + break; + case sizeof (uint64_t): + (void) fprintf(fp, "%#llx", + /* LINTED - alignment */ + (unsigned long long)*(uint64_t *)addr); + break; + default: + (void) fprintf(fp, "", (uint_t)size); + } +} + +/* + * Print an integer type. Before dumping the contents via dt_print_hex(), we + * first check the encoding to see if it's part of a bitfield or a character. + */ +static void +dt_print_int(ctf_id_t base, ulong_t off, dt_printarg_t *pap) +{ + FILE *fp = pap->pa_file; + ctf_file_t *ctfp = pap->pa_ctfp; + ctf_encoding_t e; + size_t size; + caddr_t addr = pap->pa_addr + off / NBBY; + + if (ctf_type_encoding(ctfp, base, &e) == CTF_ERR) { + (void) fprintf(fp, ""); + return; + } + + /* + * This comes from MDB - it's not clear under what circumstances this + * would be found. + */ + if (e.cte_format & CTF_INT_VARARGS) { + (void) fprintf(fp, "..."); + return; + } + + /* + * We print this as a bitfield if the bit encoding indicates it's not + * an even power of two byte size, or is larger than 8 bytes. + */ + size = e.cte_bits / NBBY; + if (size > 8 || (e.cte_bits % NBBY) != 0 || (size & (size - 1)) != 0) { + print_bitfield(pap, off, &e); + return; + } + + /* + * If this is a character, print it out as such. + */ + if (CTF_IS_CHAR(e)) { + char c = *(char *)addr; + if (isprint(c)) + (void) fprintf(fp, "'%c'", c); + else if (c == 0) + (void) fprintf(fp, "'\\0'"); + else + (void) fprintf(fp, "'\\%03o'", c); + return; + } + + dt_print_hex(fp, addr, size); +} + +/* + * Print a floating point (float, double, long double) value. + */ +/* ARGSUSED */ +static void +dt_print_float(ctf_id_t base, ulong_t off, dt_printarg_t *pap) +{ + FILE *fp = pap->pa_file; + ctf_file_t *ctfp = pap->pa_ctfp; + ctf_encoding_t e; + caddr_t addr = pap->pa_addr + off / NBBY; + + if (ctf_type_encoding(ctfp, base, &e) == 0) { + if (e.cte_format == CTF_FP_SINGLE && + e.cte_bits == sizeof (float) * NBBY) { + /* LINTED - alignment */ + (void) fprintf(fp, "%+.7e", *((float *)addr)); + } else if (e.cte_format == CTF_FP_DOUBLE && + e.cte_bits == sizeof (double) * NBBY) { + /* LINTED - alignment */ + (void) fprintf(fp, "%+.7e", *((double *)addr)); + } else if (e.cte_format == CTF_FP_LDOUBLE && + e.cte_bits == sizeof (long double) * NBBY) { + /* LINTED - alignment */ + (void) fprintf(fp, "%+.16LE", *((long double *)addr)); + } else { + (void) fprintf(fp, ""); + } + } +} + +/* + * A pointer is printed as a fixed-size integer. This is used both for + * pointers and functions. + */ +static void +dt_print_ptr(ctf_id_t base, ulong_t off, dt_printarg_t *pap) +{ + FILE *fp = pap->pa_file; + ctf_file_t *ctfp = pap->pa_ctfp; + caddr_t addr = pap->pa_addr + off / NBBY; + size_t size = ctf_type_size(ctfp, base); + + dt_print_hex(fp, addr, size); +} + +/* + * Print out an array. This is somewhat complex, as we must manually visit + * each member, and recursively invoke ctf_type_visit() for each member. If + * the members are non-structs, then we print them out directly: + * + * [ 0x14, 0x2e, 0 ] + * + * If they are structs, then we print out the necessary leading and trailing + * braces, to end up with: + * + * [ + * type { + * ... + * }, + * type { + * ... + * } + * ] + * + * We also use a heuristic to detect whether the array looks like a character + * array. If the encoding indicates it's a character, and we have all + * printable characters followed by a null byte, then we display it as a + * string: + * + * [ "string" ] + */ +static void +dt_print_array(ctf_id_t base, ulong_t off, dt_printarg_t *pap) +{ + FILE *fp = pap->pa_file; + ctf_file_t *ctfp = pap->pa_ctfp; + caddr_t addr = pap->pa_addr + off / NBBY; + ctf_arinfo_t car; + ssize_t eltsize; + ctf_encoding_t e; + int i; + boolean_t isstring; + int kind; + ctf_id_t rtype; + + if (ctf_array_info(ctfp, base, &car) == CTF_ERR) { + (void) fprintf(fp, "0x%p", (void *)addr); + return; + } + + if ((eltsize = ctf_type_size(ctfp, car.ctr_contents)) < 0 || + (rtype = ctf_type_resolve(ctfp, car.ctr_contents)) == CTF_ERR || + (kind = ctf_type_kind(ctfp, rtype)) == CTF_ERR) { + (void) fprintf(fp, "", car.ctr_contents); + return; + } + + /* see if this looks like a string */ + isstring = B_FALSE; + if (kind == CTF_K_INTEGER && + ctf_type_encoding(ctfp, rtype, &e) != CTF_ERR && CTF_IS_CHAR(e)) { + char c; + for (i = 0; i < car.ctr_nelems; i++) { + c = *((char *)addr + eltsize * i); + if (!isprint(c) || c == '\0') + break; + } + + if (i != car.ctr_nelems && c == '\0') + isstring = B_TRUE; + } + + /* + * As a slight aesthetic optimization, if we are a top-level type, then + * don't bother printing out the brackets. This lets print("foo") look + * like: + * + * string "foo" + * + * As D will internally represent this as a char[256] array. + */ + if (!isstring || pap->pa_depth != 0) + (void) fprintf(fp, "[ "); + + if (isstring) + (void) fprintf(fp, "\""); + + for (i = 0; i < car.ctr_nelems; i++) { + if (isstring) { + char c = *((char *)addr + eltsize * i); + if (c == '\0') + break; + (void) fprintf(fp, "%c", c); + } else { + /* + * Recursively invoke ctf_type_visit() on each member. + * We setup a new printarg struct with 'pa_nest' set to + * indicate that we are within a nested array. + */ + dt_printarg_t pa = *pap; + pa.pa_nest += pap->pa_depth + 1; + pa.pa_depth = 0; + pa.pa_addr = addr + eltsize * i; + (void) ctf_type_visit(ctfp, car.ctr_contents, + dt_print_member, &pa); + + dt_print_trailing_braces(&pa, 0); + if (i != car.ctr_nelems - 1) + (void) fprintf(fp, ", "); + else if (CTF_IS_STRUCTLIKE(kind)) + (void) fprintf(fp, "\n"); + } + } + + if (isstring) + (void) fprintf(fp, "\""); + + if (!isstring || pap->pa_depth != 0) { + if (CTF_IS_STRUCTLIKE(kind)) + dt_print_indent(pap); + else + (void) fprintf(fp, " "); + (void) fprintf(fp, "]"); + } +} + +/* + * This isued by both structs and unions to print the leading brace. + */ +/* ARGSUSED */ +static void +dt_print_structlike(ctf_id_t id, ulong_t off, dt_printarg_t *pap) +{ + (void) fprintf(pap->pa_file, "{"); +} + +/* + * For enums, we try to print the enum name, and fall back to the value if it + * can't be determined. We do not do any fancy flag processing like mdb. + */ +/* ARGSUSED */ +static void +dt_print_enum(ctf_id_t base, ulong_t off, dt_printarg_t *pap) +{ + FILE *fp = pap->pa_file; + ctf_file_t *ctfp = pap->pa_ctfp; + const char *ename; + int value = 0; + + if ((ename = ctf_enum_name(ctfp, base, value)) != NULL) + (void) fprintf(fp, "%s", ename); + else + (void) fprintf(fp, "%d", value); +} + +/* + * Forward declaration. There's not much to do here without the complete + * type information, so just print out this fact and drive on. + */ +/* ARGSUSED */ +static void +dt_print_tag(ctf_id_t base, ulong_t off, dt_printarg_t *pap) +{ + (void) fprintf(pap->pa_file, ""); +} + +typedef void dt_printarg_f(ctf_id_t, ulong_t, dt_printarg_t *); + +static dt_printarg_f *const dt_printfuncs[] = { + dt_print_int, /* CTF_K_INTEGER */ + dt_print_float, /* CTF_K_FLOAT */ + dt_print_ptr, /* CTF_K_POINTER */ + dt_print_array, /* CTF_K_ARRAY */ + dt_print_ptr, /* CTF_K_FUNCTION */ + dt_print_structlike, /* CTF_K_STRUCT */ + dt_print_structlike, /* CTF_K_UNION */ + dt_print_enum, /* CTF_K_ENUM */ + dt_print_tag /* CTF_K_FORWARD */ +}; + +/* + * Print one member of a structure. This callback is invoked from + * ctf_type_visit() recursively. + */ +static int +dt_print_member(const char *name, ctf_id_t id, ulong_t off, int depth, + void *data) +{ + char type[DT_TYPE_NAMELEN]; + int kind; + dt_printarg_t *pap = data; + FILE *fp = pap->pa_file; + ctf_file_t *ctfp = pap->pa_ctfp; + boolean_t arraymember; + boolean_t brief; + ctf_encoding_t e; + ctf_id_t rtype; + + dt_print_trailing_braces(pap, depth); + /* + * dt_print_trailing_braces() doesn't include the trailing newline; add + * it here if necessary. + */ + if (depth < pap->pa_depth) + (void) fprintf(fp, "\n"); + pap->pa_depth = depth; + + if ((rtype = ctf_type_resolve(ctfp, id)) == CTF_ERR || + (kind = ctf_type_kind(ctfp, rtype)) == CTF_ERR || + kind < CTF_K_INTEGER || kind > CTF_K_FORWARD) { + dt_print_indent(pap); + (void) fprintf(fp, "%s = ", name, id); + return (0); + } + + dt_print_type_name(ctfp, id, type, sizeof (type)); + + arraymember = (pap->pa_nest != 0 && depth == 0); + brief = (arraymember && !CTF_IS_STRUCTLIKE(kind)); + + if (!brief) { + /* + * If this is a direct array member and a struct (otherwise + * brief would be true), then print a trailing newline, as the + * array printing code doesn't include it because it might be a + * simple type. + */ + if (arraymember) + (void) fprintf(fp, "\n"); + dt_print_indent(pap); + + /* always print the type */ + (void) fprintf(fp, "%s", type); + if (name[0] != '\0') { + /* + * For aesthetics, we don't include a space between the + * type name and member name if the type is a pointer. + * This will give us "void *foo =" instead of "void * + * foo =". Unions also have the odd behavior that the + * type name is returned as "union ", with a trailing + * space, so we also avoid printing a space if the type + * name already ends with a space. + */ + if (type[strlen(type) - 1] != '*' && + type[strlen(type) -1] != ' ') { + (void) fprintf(fp, " "); + } + (void) fprintf(fp, "%s", name); + + /* + * If this looks like a bitfield, or is an integer not + * aligned on a byte boundary, print the number of + * bits after the name. + */ + if (kind == CTF_K_INTEGER && + ctf_type_encoding(ctfp, id, &e) == 0) { + ulong_t bits = e.cte_bits; + ulong_t size = bits / NBBY; + + if (bits % NBBY != 0 || + off % NBBY != 0 || + size > 8 || + size != ctf_type_size(ctfp, id)) { + (void) fprintf(fp, " :%lu", bits); + } + } + + (void) fprintf(fp, " ="); + } + (void) fprintf(fp, " "); + } + + dt_printfuncs[kind - 1](rtype, off, pap); + + /* direct simple array members are not separated by newlines */ + if (!brief) + (void) fprintf(fp, "\n"); + + return (0); +} + +/* + * Main print function invoked by dt_consume_cpu(). + */ +int +dtrace_print(dtrace_hdl_t *dtp, FILE *fp, const char *typename, + caddr_t addr, size_t len) +{ + const char *s; + char *object; + dt_printarg_t pa; + ctf_id_t id; + dt_module_t *dmp; + + /* + * Split the fully-qualified type ID (module`id). This should + * always be the format, but if for some reason we don't find the + * expected value, return 0 to fall back to the generic trace() + * behavior. + */ + for (s = typename; *s != '\0' && *s != '`'; s++) + ; + + if (*s != '`') + return (0); + + object = alloca(s - typename + 1); + bcopy(typename, object, s - typename); + object[s - typename] = '\0'; + id = atoi(s + 1); + + /* + * Try to get the CTF kind for this id. If something has gone horribly + * wrong and we can't resolve the ID, bail out and let trace() do the + * work. + */ + dmp = dt_module_lookup_by_name(dtp, object); + if (dmp == NULL || ctf_type_kind(dt_module_getctf(dtp, dmp), + id) == CTF_ERR) { + return (0); + } + + /* setup the print structure and kick off the main print routine */ + pa.pa_addr = addr; + pa.pa_ctfp = dt_module_getctf(dtp, dmp); + pa.pa_nest = 0; + pa.pa_depth = 0; + pa.pa_file = fp; + (void) ctf_type_visit(pa.pa_ctfp, id, dt_print_member, &pa); + + dt_print_trailing_braces(&pa, 0); + + return (len); +} diff --git a/lib/libdtrace/common/dt_printf.c b/lib/libdtrace/common/dt_printf.c index 52904789bc7..eabc42338bc 100644 --- a/lib/libdtrace/common/dt_printf.c +++ b/lib/libdtrace/common/dt_printf.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ #include @@ -1300,6 +1301,14 @@ pfprint_lquantize(dtrace_hdl_t *dtp, FILE *fp, const char *format, return (dt_print_lquantize(dtp, fp, addr, size, normal)); } +/*ARGSUSED*/ +static int +pfprint_llquantize(dtrace_hdl_t *dtp, FILE *fp, const char *format, + const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal) +{ + return (dt_print_llquantize(dtp, fp, addr, size, normal)); +} + static int dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv, const dtrace_recdesc_t *recs, uint_t nrecs, const void *buf, @@ -1485,6 +1494,9 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv, case DTRACEAGG_LQUANTIZE: func = pfprint_lquantize; break; + case DTRACEAGG_LLQUANTIZE: + func = pfprint_llquantize; + break; case DTRACEACT_MOD: func = pfprint_mod; break; diff --git a/lib/libdtrace/common/dt_program.c b/lib/libdtrace/common/dt_program.c index 19f377de26a..7d725bd0af8 100644 --- a/lib/libdtrace/common/dt_program.c +++ b/lib/libdtrace/common/dt_program.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #include @@ -347,6 +348,7 @@ dtrace_stmt_destroy(dtrace_hdl_t *dtp, dtrace_stmtdesc_t *sdp) if (sdp->dtsd_fmtdata != NULL) dt_printf_destroy(sdp->dtsd_fmtdata); + dt_free(dtp, sdp->dtsd_strdata); dt_ecbdesc_release(dtp, sdp->dtsd_ecbdesc); dt_free(dtp, sdp); diff --git a/lib/libdtrace/common/dt_string.c b/lib/libdtrace/common/dt_string.c index 3a5315eef99..782d66c2b8a 100644 --- a/lib/libdtrace/common/dt_string.c +++ b/lib/libdtrace/common/dt_string.c @@ -29,23 +29,6 @@ #include #include -#include - -/* - * Create a copy of string s, but only duplicate the first n bytes. - */ -char * -strndup(const char *s, size_t n) -{ - char *s2 = malloc(n + 1); - - if (s2 == NULL) - longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); - - (void) strncpy(s2, s, n); - s2[n] = '\0'; - return (s2); -} /* * Transform string s inline, converting each embedded C escape sequence string diff --git a/lib/libdtrace/common/dt_string.h b/lib/libdtrace/common/dt_string.h index 1fd412b1ad7..a9bb7a1eb70 100644 --- a/lib/libdtrace/common/dt_string.h +++ b/lib/libdtrace/common/dt_string.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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. @@ -19,16 +18,14 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _DT_STRING_H #define _DT_STRING_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include @@ -36,7 +33,6 @@ extern "C" { #endif -extern char *strndup(const char *, size_t); extern size_t stresc2chr(char *); extern char *strchr2esc(const char *, size_t); extern const char *strbasename(const char *); diff --git a/lib/libdtrace/common/dt_subr.c b/lib/libdtrace/common/dt_subr.c index 97221c84d6c..f586504cfbc 100644 --- a/lib/libdtrace/common/dt_subr.c +++ b/lib/libdtrace/common/dt_subr.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #include @@ -222,8 +221,7 @@ dtrace_str2attr(const char *str, dtrace_attribute_t *attr) return (-1); /* invalid function arguments */ *attr = _dtrace_maxattr; - p = alloca(strlen(str) + 1); - (void) strcpy(p, str); + p = strdupa(str); if ((p = dt_getstrattr(p, &q)) == NULL) return (0); diff --git a/lib/libdtrace/common/dtrace.h b/lib/libdtrace/common/dtrace.h index 1c041207c0a..87df1ca4402 100644 --- a/lib/libdtrace/common/dtrace.h +++ b/lib/libdtrace/common/dtrace.h @@ -24,11 +24,13 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _DTRACE_H #define _DTRACE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -148,6 +150,7 @@ typedef struct dtrace_stmtdesc { dtrace_actdesc_t *dtsd_action_last; /* last action in action list */ void *dtsd_aggdata; /* aggregation data */ void *dtsd_fmtdata; /* type-specific output data */ + void *dtsd_strdata; /* type-specific string data */ void (*dtsd_callback)(); /* callback function for EPID */ void *dtsd_data; /* callback data pointer */ dtrace_attribute_t dtsd_descattr; /* probedesc attributes */ @@ -239,6 +242,18 @@ extern int dtrace_freopen(dtrace_hdl_t *, FILE *, void *, const dtrace_probedata_t *, const dtrace_recdesc_t *, uint_t, const void *, size_t); +/* + * Type-specific output printing + * + * The print() action will associate a string data record that is actually the + * fully-qualified type name of the data traced by the DIFEXPR action. This is + * stored in the same 'format' record from the kernel, but we know by virtue of + * the fact that the action is still DIFEXPR that it is actually a reference to + * plain string data. + */ +extern int dtrace_print(dtrace_hdl_t *, FILE *, const char *, + caddr_t, size_t); + /* * DTrace Work Interface */ diff --git a/lib/libdtrace/i386/regs.d.in b/lib/libdtrace/i386/regs.d.in index 3328f33515b..d18c5f7ff1f 100644 --- a/lib/libdtrace/i386/regs.d.in +++ b/lib/libdtrace/i386/regs.d.in @@ -23,8 +23,9 @@ * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright 2011 Joyent, Inc. All rights reserved. + */ inline int R_GS = @GS@; #pragma D binding "1.0" R_GS @@ -115,3 +116,149 @@ inline int R_R14 = @REG_R14@; inline int R_R15 = @REG_R15@; #pragma D binding "1.0" R_R15 +enum vmregs_vmx { + VMX_VIRTUAL_PROCESSOR_ID = 0x00000000, + VMX_GUEST_ES_SELECTOR = 0x00000800, + VMX_GUEST_CS_SELECTOR = 0x00000802, + VMX_GUEST_SS_SELECTOR = 0x00000804, + VMX_GUEST_DS_SELECTOR = 0x00000806, + VMX_GUEST_FS_SELECTOR = 0x00000808, + VMX_GUEST_GS_SELECTOR = 0x0000080a, + VMX_GUEST_LDTR_SELECTOR = 0x0000080c, + VMX_GUEST_TR_SELECTOR = 0x0000080e, + VMX_HOST_ES_SELECTOR = 0x00000c00, + VMX_HOST_CS_SELECTOR = 0x00000c02, + VMX_HOST_SS_SELECTOR = 0x00000c04, + VMX_HOST_DS_SELECTOR = 0x00000c06, + VMX_HOST_FS_SELECTOR = 0x00000c08, + VMX_HOST_GS_SELECTOR = 0x00000c0a, + VMX_HOST_TR_SELECTOR = 0x00000c0c, + VMX_IO_BITMAP_A = 0x00002000, + VMX_IO_BITMAP_A_HIGH = 0x00002001, + VMX_IO_BITMAP_B = 0x00002002, + VMX_IO_BITMAP_B_HIGH = 0x00002003, + VMX_MSR_BITMAP = 0x00002004, + VMX_MSR_BITMAP_HIGH = 0x00002005, + VMX_VM_EXIT_MSR_STORE_ADDR = 0x00002006, + VMX_VM_EXIT_MSR_STORE_ADDR_HIGH = 0x00002007, + VMX_VM_EXIT_MSR_LOAD_ADDR = 0x00002008, + VMX_VM_EXIT_MSR_LOAD_ADDR_HIGH = 0x00002009, + VMX_VM_ENTRY_MSR_LOAD_ADDR = 0x0000200a, + VMX_VM_ENTRY_MSR_LOAD_ADDR_HIGH = 0x0000200b, + VMX_TSC_OFFSET = 0x00002010, + VMX_TSC_OFFSET_HIGH = 0x00002011, + VMX_VIRTUAL_APIC_PAGE_ADDR = 0x00002012, + VMX_VIRTUAL_APIC_PAGE_ADDR_HIGH = 0x00002013, + VMX_APIC_ACCESS_ADDR = 0x00002014, + VMX_APIC_ACCESS_ADDR_HIGH = 0x00002015, + VMX_EPT_POINTER = 0x0000201a, + VMX_EPT_POINTER_HIGH = 0x0000201b, + VMX_GUEST_PHYSICAL_ADDRESS = 0x00002400, + VMX_GUEST_PHYSICAL_ADDRESS_HIGH = 0x00002401, + VMX_VMCS_LINK_POINTER = 0x00002800, + VMX_VMCS_LINK_POINTER_HIGH = 0x00002801, + VMX_GUEST_IA32_DEBUGCTL = 0x00002802, + VMX_GUEST_IA32_DEBUGCTL_HIGH = 0x00002803, + VMX_GUEST_IA32_PAT = 0x00002804, + VMX_GUEST_IA32_PAT_HIGH = 0x00002805, + VMX_GUEST_PDPTR0 = 0x0000280a, + VMX_GUEST_PDPTR0_HIGH = 0x0000280b, + VMX_GUEST_PDPTR1 = 0x0000280c, + VMX_GUEST_PDPTR1_HIGH = 0x0000280d, + VMX_GUEST_PDPTR2 = 0x0000280e, + VMX_GUEST_PDPTR2_HIGH = 0x0000280f, + VMX_GUEST_PDPTR3 = 0x00002810, + VMX_GUEST_PDPTR3_HIGH = 0x00002811, + VMX_HOST_IA32_PAT = 0x00002c00, + VMX_HOST_IA32_PAT_HIGH = 0x00002c01, + VMX_PIN_BASED_VM_EXEC_CONTROL = 0x00004000, + VMX_CPU_BASED_VM_EXEC_CONTROL = 0x00004002, + VMX_EXCEPTION_BITMAP = 0x00004004, + VMX_PAGE_FAULT_ERROR_CODE_MASK = 0x00004006, + VMX_PAGE_FAULT_ERROR_CODE_MATCH = 0x00004008, + VMX_CR3_TARGET_COUNT = 0x0000400a, + VMX_VM_EXIT_CONTROLS = 0x0000400c, + VMX_VM_EXIT_MSR_STORE_COUNT = 0x0000400e, + VMX_VM_EXIT_MSR_LOAD_COUNT = 0x00004010, + VMX_VM_ENTRY_CONTROLS = 0x00004012, + VMX_VM_ENTRY_MSR_LOAD_COUNT = 0x00004014, + VMX_VM_ENTRY_INTR_INFO_FIELD = 0x00004016, + VMX_VM_ENTRY_EXCEPTION_ERROR_CODE = 0x00004018, + VMX_VM_ENTRY_INSTRUCTION_LEN = 0x0000401a, + VMX_TPR_THRESHOLD = 0x0000401c, + VMX_SECONDARY_VM_EXEC_CONTROL = 0x0000401e, + VMX_PLE_GAP = 0x00004020, + VMX_PLE_WINDOW = 0x00004022, + VMX_VM_INSTRUCTION_ERROR = 0x00004400, + VMX_VM_EXIT_REASON = 0x00004402, + VMX_VM_EXIT_INTR_INFO = 0x00004404, + VMX_VM_EXIT_INTR_ERROR_CODE = 0x00004406, + VMX_IDT_VECTORING_INFO_FIELD = 0x00004408, + VMX_IDT_VECTORING_ERROR_CODE = 0x0000440a, + VMX_VM_EXIT_INSTRUCTION_LEN = 0x0000440c, + VMX_VMX_INSTRUCTION_INFO = 0x0000440e, + VMX_GUEST_ES_LIMIT = 0x00004800, + VMX_GUEST_CS_LIMIT = 0x00004802, + VMX_GUEST_SS_LIMIT = 0x00004804, + VMX_GUEST_DS_LIMIT = 0x00004806, + VMX_GUEST_FS_LIMIT = 0x00004808, + VMX_GUEST_GS_LIMIT = 0x0000480a, + VMX_GUEST_LDTR_LIMIT = 0x0000480c, + VMX_GUEST_TR_LIMIT = 0x0000480e, + VMX_GUEST_GDTR_LIMIT = 0x00004810, + VMX_GUEST_IDTR_LIMIT = 0x00004812, + VMX_GUEST_ES_AR_BYTES = 0x00004814, + VMX_GUEST_CS_AR_BYTES = 0x00004816, + VMX_GUEST_SS_AR_BYTES = 0x00004818, + VMX_GUEST_DS_AR_BYTES = 0x0000481a, + VMX_GUEST_FS_AR_BYTES = 0x0000481c, + VMX_GUEST_GS_AR_BYTES = 0x0000481e, + VMX_GUEST_LDTR_AR_BYTES = 0x00004820, + VMX_GUEST_TR_AR_BYTES = 0x00004822, + VMX_GUEST_INTERRUPTIBILITY_INFO = 0x00004824, + VMX_GUEST_ACTIVITY_STATE = 0X00004826, + VMX_GUEST_SYSENTER_CS = 0x0000482A, + VMX_HOST_IA32_SYSENTER_CS = 0x00004c00, + VMX_CR0_GUEST_HOST_MASK = 0x00006000, + VMX_CR4_GUEST_HOST_MASK = 0x00006002, + VMX_CR0_READ_SHADOW = 0x00006004, + VMX_CR4_READ_SHADOW = 0x00006006, + VMX_CR3_TARGET_VALUE0 = 0x00006008, + VMX_CR3_TARGET_VALUE1 = 0x0000600a, + VMX_CR3_TARGET_VALUE2 = 0x0000600c, + VMX_CR3_TARGET_VALUE3 = 0x0000600e, + VMX_EXIT_QUALIFICATION = 0x00006400, + VMX_GUEST_LINEAR_ADDRESS = 0x0000640a, + VMX_GUEST_CR0 = 0x00006800, + VMX_GUEST_CR3 = 0x00006802, + VMX_GUEST_CR4 = 0x00006804, + VMX_GUEST_ES_BASE = 0x00006806, + VMX_GUEST_CS_BASE = 0x00006808, + VMX_GUEST_SS_BASE = 0x0000680a, + VMX_GUEST_DS_BASE = 0x0000680c, + VMX_GUEST_FS_BASE = 0x0000680e, + VMX_GUEST_GS_BASE = 0x00006810, + VMX_GUEST_LDTR_BASE = 0x00006812, + VMX_GUEST_TR_BASE = 0x00006814, + VMX_GUEST_GDTR_BASE = 0x00006816, + VMX_GUEST_IDTR_BASE = 0x00006818, + VMX_GUEST_DR7 = 0x0000681a, + VMX_GUEST_RSP = 0x0000681c, + VMX_GUEST_RIP = 0x0000681e, + VMX_GUEST_RFLAGS = 0x00006820, + VMX_GUEST_PENDING_DBG_EXCEPTIONS = 0x00006822, + VMX_GUEST_SYSENTER_ESP = 0x00006824, + VMX_GUEST_SYSENTER_EIP = 0x00006826, + VMX_HOST_CR0 = 0x00006c00, + VMX_HOST_CR3 = 0x00006c02, + VMX_HOST_CR4 = 0x00006c04, + VMX_HOST_FS_BASE = 0x00006c06, + VMX_HOST_GS_BASE = 0x00006c08, + VMX_HOST_TR_BASE = 0x00006c0a, + VMX_HOST_GDTR_BASE = 0x00006c0c, + VMX_HOST_IDTR_BASE = 0x00006c0e, + VMX_HOST_IA32_SYSENTER_ESP = 0x00006c10, + VMX_HOST_IA32_SYSENTER_EIP = 0x00006c12, + VMX_HOST_RSP = 0x00006c14, + VMX_HOST_RIP = 0x00006c16 +}; diff --git a/tools/ctf/cvt/dwarf.c b/tools/ctf/cvt/dwarf.c index a7e97dfb23a..ce8f6f96016 100644 --- a/tools/ctf/cvt/dwarf.c +++ b/tools/ctf/cvt/dwarf.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * DWARF to tdata conversion * @@ -1832,8 +1830,11 @@ dw_read(tdata_t *td, Elf *elf, const char *filename) } if ((rc = dwarf_next_cu_header(dw.dw_dw, &hdrlen, &vers, &abboff, - &addrsz, &nxthdr, &dw.dw_err)) != DW_DLV_OK || - (cu = die_sibling(&dw, NULL)) == NULL || + &addrsz, &nxthdr, &dw.dw_err)) != DW_DLV_OK) + terminate("file does not contain valid DWARF data: %s\n", + dwarf_errmsg(dw.dw_err)); + + if ((cu = die_sibling(&dw, NULL)) == NULL || (child = die_child(&dw, cu)) == NULL) terminate("file does not contain dwarf type data " "(try compiling with -g)\n"); -- 2.45.0