From 9832ab49051fc219d16cca9941ccb9252deebc30 Mon Sep 17 00:00:00 2001 From: pfg Date: Wed, 24 Apr 2013 20:10:52 +0000 Subject: [PATCH] MFC r248690, r248706, 248708, r248752: Dtrace: merge new functions from Illumos. This covers illumos issues: 1455 DTrace tracemem() should take an optional size argument 1451 DTrace needs toupper()/tolower() subroutines 1457 lltostr() D subroutine should take an optional base 1694 Add type-aware print() action 3511 dtrace.c erroneously checks for memory alignment on amd64 This includes an enhanced print() described here: http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/ This change bumps the DT_VERS_* number to 1.9.0 in accordance to what is done in illumos. Illumos Revisions: 13457:571b0355c2e3 13458:5e394d8db762 13459:c3454574dd1a 13501:c3a7090dbc16 13483:f413e6c5d297 Reference: https://www.illumos.org/issues/1455 https://www.illumos.org/issues/1451 https://www.illumos.org/issues/1457 https://www.illumos.org/issues/1560 https://www.illumos.org/issues/1694 https://www.illumos.org/issues/3511 Tested by: Fabian Keil Obtained from: Illumos git-svn-id: svn://svn.freebsd.org/base/stable/9@249856 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- .../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/pointers/err.InvalidAddress5.d | 49 +- .../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 + .../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 + .../dtrace/test/tst/common/print/tst.struct.d | 59 + .../test/tst/common/print/tst.struct.d.out | 12 + .../tst/common/tracemem/err.D_TRACEMEM_ARGS.d | 29 + .../common/tracemem/err.D_TRACEMEM_DYNSIZE.d | 30 + ...rr.D_PROTO_LEN.toomany.d => tst.dynsize.d} | 28 +- .../tst/common/tracemem/tst.dynsize.d.out | 1313 +++++++++++++++++ .../opensolaris/lib/libdtrace/common/dt_cc.c | 80 +- .../lib/libdtrace/common/dt_consume.c | 62 +- .../opensolaris/lib/libdtrace/common/dt_dof.c | 14 +- .../lib/libdtrace/common/dt_errtags.h | 11 +- .../lib/libdtrace/common/dt_impl.h | 11 +- .../opensolaris/lib/libdtrace/common/dt_map.c | 172 ++- .../lib/libdtrace/common/dt_open.c | 24 +- .../lib/libdtrace/common/dt_print.c | 648 ++++++++ .../lib/libdtrace/common/dt_program.c | 2 + .../opensolaris/lib/libdtrace/common/dtrace.h | 13 + cddl/lib/libdtrace/Makefile | 1 + .../opensolaris/uts/common/dtrace/dtrace.c | 111 +- .../opensolaris/uts/common/sys/dtrace.h | 20 +- 39 files changed, 3537 insertions(+), 129 deletions(-) create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.array.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.array.d.out create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.bitfield.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.bitfield.d.out create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.primitive.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.primitive.d.out create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.struct.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.struct.d.out create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d rename cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/{err.D_PROTO_LEN.toomany.d => tst.dynsize.d} (75%) create mode 100644 cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out create mode 100644 cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d new file mode 100644 index 000000000..9d4e40b4d --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d new file mode 100644 index 000000000..2c1389bde --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d new file mode 100644 index 000000000..7d9c27f90 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d new file mode 100644 index 000000000..afaa7f976 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d new file mode 100644 index 000000000..9658f6a75 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d new file mode 100644 index 000000000..bee8697fb --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d new file mode 100644 index 000000000..1afe37dc6 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out new file mode 100644 index 000000000..94e225771 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d new file mode 100644 index 000000000..2539630e9 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d new file mode 100644 index 000000000..fd803f2ef --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d index 64b772894..c4d35e9e3 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -32,44 +34,51 @@ * a runtime error. * * SECTION: Pointers and Arrays/Generic Pointers - * - * NOTES: - * This test doesn't apply to x86; for the time being, we're working - * around this with the preprocessor. */ #pragma D option quiet -int array[3]; -uintptr_t uptr; +#if defined(__i386) || defined(__amd64) +#define __x86 1 +#endif + +int array[2]; +char *ptr; int *p; int *q; int *r; BEGIN { -#ifdef __i386 - exit(1); -#else - array[0] = 20; - array[1] = 40; - array[2] = 80; + array[0] = 0x12345678; + array[1] = 0xabcdefff; - uptr = (uintptr_t) &array[0]; + ptr = (char *) &array[0]; - p = (int *) (uptr); - q = (int *) (uptr + 2); - r = (int *) (uptr + 3); + p = (int *) (ptr); + q = (int *) (ptr + 2); + r = (int *) (ptr + 3); - printf("array[0]: %d\t*p: %d\n", array[0], *p); - printf("array[1]: %d\t*q: %d\n", array[1], *q); - printf("array[2]: %d\t*r: %d\n", array[2], *r); + printf("*p: 0x%x\n", *p); + printf("*q: 0x%x\n", *q); + printf("*r: 0x%x\n", *r); + /* + * On x86, the above unaligned memory accesses are allowed and should + * not result in the ERROR probe firing. + */ +#ifdef __x86 + exit(1); +#else exit(0); #endif } ERROR { +#ifdef __x86 + exit(0); +#else exit(1); +#endif } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d new file mode 100644 index 000000000..892b44561 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.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 by Delphix. All rights reserved. + */ + +BEGIN +{ + print(*curpsinfo); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d new file mode 100644 index 000000000..902f07272 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.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 by Delphix. All rights reserved. + */ + +BEGIN +{ + print((void)`p0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d new file mode 100644 index 000000000..a1d3be1f6 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.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 by Delphix. All rights reserved. + */ + +BEGIN +{ + print(); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.array.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.array.d new file mode 100644 index 000000000..9650bf7c0 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.array.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 by Delphix. All rights reserved. + */ + +#pragma D option quiet + +typedef struct bar { + int alpha; +} bar_t; + +typedef struct foo { + int a[3]; + char b[30]; + bar_t c[2]; + char d[3]; +} foo_t; + +BEGIN +{ + this->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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.array.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.array.d.out new file mode 100644 index 000000000..0702d4bb5 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.bitfield.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.bitfield.d new file mode 100644 index 000000000..ff77bb0ec --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.bitfield.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.bitfield.d.out new file mode 100644 index 000000000..309444d5c --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.primitive.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.primitive.d new file mode 100644 index 000000000..559dab184 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.primitive.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.primitive.d.out new file mode 100644 index 000000000..f7e407672 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.struct.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.struct.d new file mode 100644 index 000000000..2fb1c4140 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.struct.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.struct.d.out new file mode 100644 index 000000000..b7b210837 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.d new file mode 100644 index 000000000..1eb96be52 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ARGS.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 +{ + tracemem(`dtrace_zero, 256, 0, "fishpong"); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.d new file mode 100644 index 000000000..554bb7dfb --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_DYNSIZE.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 +{ + tracemem(`dtrace_zero, 256, "fishpong"); + exit(0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_PROTO_LEN.toomany.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d similarity index 75% rename from cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_PROTO_LEN.toomany.d rename to cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d index dfe8e4d22..de530e811 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/err.D_PROTO_LEN.toomany.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d @@ -20,20 +20,26 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * ASSERTION: - * Test tracemem() with too many arguments. - * - * SECTION: Actions and Subroutines/tracemem() - */ +#pragma D option quiet BEGIN { - tracemem(123, 456, 789); + i = -10; +} + +tick-10ms +/i++ < 150/ +{ + printf("%d:", i); + tracemem(`dtrace_zero, 128, i); + printf("\n"); +} + +tick-10ms +/i >= 150/ +{ + exit(0); } diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.dynsize.d.out new file mode 100644 index 000000000..6415893b8 --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c index d5423f634..0ac479541 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c @@ -22,6 +22,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, Joyent Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ /* @@ -679,13 +680,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`%ld", 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`%ld", 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]; @@ -697,17 +744,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 @@ -1114,6 +1181,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; diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c index a4f2de8b3..797e7e3ea 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c @@ -25,6 +25,7 @@ /* * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #include @@ -832,7 +833,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, int raw) + size_t nbytes, int width, int quiet, int forceraw) { /* * If the byte stream is a series of printable characters, followed by @@ -845,7 +846,10 @@ dt_print_bytes(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, if (nbytes == 0) return (0); - if (raw || dtp->dt_options[DTRACEOPT_RAWBYTES] != DTRACEOPT_UNSET) + if (forceraw) + goto raw; + + if (dtp->dt_options[DTRACEOPT_RAWBYTES] != DTRACEOPT_UNSET) goto raw; for (i = 0; i < nbytes; i++) { @@ -2019,6 +2023,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; @@ -2187,6 +2192,13 @@ again: } } + 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) @@ -2290,6 +2302,35 @@ again: 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; @@ -2358,6 +2399,23 @@ nofmt: 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, diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c index 6ed9480ec..01ef0f998 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c +++ b/cddl/contrib/opensolaris/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 @@ -758,16 +759,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/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h index 8495f1584..eff9f2824 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h +++ b/cddl/contrib/opensolaris/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 */ diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index 99498d9fd..61d901b86 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -26,6 +26,7 @@ /* * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #ifndef _DT_IMPL_H @@ -253,6 +254,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 */ @@ -438,8 +441,9 @@ 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_PRINTM DT_ACT(29) /* printm() action */ -#define DT_ACT_PRINTT DT_ACT(30) /* printt() action */ +#define DT_ACT_PRINT DT_ACT(29) /* print() action */ +#define DT_ACT_PRINTM DT_ACT(30) /* printm() action */ +#define DT_ACT_PRINTT DT_ACT(31) /* printt() action */ /* * Sentinel to tell freopen() to restore the saved stdout. This must not @@ -641,6 +645,9 @@ 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 *, diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c index 1c5c868bb..c6d92c87e 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c +++ b/cddl/contrib/opensolaris/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; @@ -132,71 +205,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; @@ -440,3 +465,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/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c index c2d817a79..dcc4e7cfe 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c @@ -22,6 +22,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ #include @@ -116,8 +117,12 @@ #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_1_7 DT_VERSION_NUMBER(1, 7, 0) -#define DT_VERS_LATEST DT_VERS_1_7 -#define DT_VERS_STRING "Sun D 1.7" +#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 */ @@ -134,6 +139,10 @@ const dt_version_t _dtrace_versions[] = { 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 }; @@ -289,7 +298,7 @@ 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, ...)" }, @@ -351,6 +360,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, @@ -457,11 +468,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(...)" }, { "typeref", DT_IDENT_FUNC, 0, DIF_SUBR_TYPEREF, DT_ATTR_STABCMN, DT_VERS_1_1, @@ -1612,6 +1627,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/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c new file mode 100644 index 000000000..261fc8ced --- /dev/null +++ b/cddl/contrib/opensolaris/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/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c index b110df396..a325c42cb 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c +++ b/cddl/contrib/opensolaris/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 @@ -352,6 +353,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/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h index eb5ab43b1..b2e31086c 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h @@ -154,6 +154,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)(void); /* callback function for EPID */ void *dtsd_data; /* callback data pointer */ dtrace_attribute_t dtsd_descattr; /* probedesc attributes */ @@ -245,6 +246,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/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 72f020145..eabbfeecd 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -32,6 +32,7 @@ SRCS= dt_aggregate.c \ dt_pcb.c \ dt_pid.c \ dt_pragma.c \ + dt_print.c \ dt_printf.c \ dt_proc.c \ dt_program.c \ diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index 342eb4e2b..892c83408 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -443,7 +443,7 @@ static kmutex_t dtrace_errlock; #define DTRACE_STORE(type, tomax, offset, what) \ *((type *)((uintptr_t)(tomax) + (uintptr_t)offset)) = (type)(what); -#ifndef __i386 +#ifndef __x86 #define DTRACE_ALIGNCHECK(addr, size, flags) \ if (addr & (size - 1)) { \ *flags |= CPU_DTRACE_BADALIGN; \ @@ -4019,6 +4019,53 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs, break; } + case DIF_SUBR_TOUPPER: + case DIF_SUBR_TOLOWER: { + uintptr_t s = tupregs[0].dttk_value; + uint64_t size = state->dts_options[DTRACEOPT_STRSIZE]; + char *dest = (char *)mstate->dtms_scratch_ptr, c; + size_t len = dtrace_strlen((char *)s, size); + char lower, upper, convert; + int64_t i; + + if (subr == DIF_SUBR_TOUPPER) { + lower = 'a'; + upper = 'z'; + convert = 'A'; + } else { + lower = 'A'; + upper = 'Z'; + convert = 'a'; + } + + if (!dtrace_canload(s, len + 1, mstate, vstate)) { + regs[rd] = 0; + break; + } + + if (!DTRACE_INSCRATCH(mstate, size)) { + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); + regs[rd] = 0; + break; + } + + for (i = 0; i < size - 1; i++) { + if ((c = dtrace_load8(s + i)) == '\0') + break; + + if (c >= lower && c <= upper) + c = convert + (c - lower); + + dest[i] = c; + } + + ASSERT(i < size); + dest[i] = '\0'; + regs[rd] = (uintptr_t)dest; + mstate->dtms_scratch_ptr += size; + break; + } + #if defined(sun) case DIF_SUBR_GETMAJOR: #ifdef _LP64 @@ -4283,9 +4330,20 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs, case DIF_SUBR_LLTOSTR: { int64_t i = (int64_t)tupregs[0].dttk_value; - int64_t val = i < 0 ? i * -1 : i; - uint64_t size = 22; /* enough room for 2^64 in decimal */ + uint64_t val, digit; + uint64_t size = 65; /* enough room for 2^64 in binary */ char *end = (char *)mstate->dtms_scratch_ptr + size - 1; + int base = 10; + + if (nargs > 1) { + if ((base = tupregs[1].dttk_value) <= 1 || + base > ('z' - 'a' + 1) + ('9' - '0' + 1)) { + *flags |= CPU_DTRACE_ILLOP; + break; + } + } + + val = (base == 10 && i < 0) ? i * -1 : i; if (!DTRACE_INSCRATCH(mstate, size)) { DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); @@ -4293,13 +4351,24 @@ dtrace_dif_subr(uint_t subr, uint_t rd, uint64_t *regs, break; } - for (*end-- = '\0'; val; val /= 10) - *end-- = '0' + (val % 10); + for (*end-- = '\0'; val; val /= base) { + if ((digit = val % base) <= '9' - '0') { + *end-- = '0' + digit; + } else { + *end-- = 'a' + (digit - ('9' - '0') - 1); + } + } + + if (i == 0 && base == 16) + *end-- = '0'; + + if (base == 16) + *end-- = 'x'; - if (i == 0) + if (i == 0 || base == 8 || base == 16) *end-- = '0'; - if (i < 0) + if (i < 0 && base == 10) *end-- = '-'; regs[rd] = (uintptr_t)end + 1; @@ -6015,6 +6084,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, dtrace_buffer_t *aggbuf = &state->dts_aggbuffer[cpuid]; dtrace_vstate_t *vstate = &state->dts_vstate; dtrace_provider_t *prov = probe->dtpr_provider; + uint64_t tracememsize = 0; int committed = 0; caddr_t tomax; @@ -6466,6 +6536,11 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, case DTRACEACT_PRINTA: case DTRACEACT_SYSTEM: case DTRACEACT_FREOPEN: + case DTRACEACT_TRACEMEM: + break; + + case DTRACEACT_TRACEMEM_DYNSIZE: + tracememsize = val; break; case DTRACEACT_SYM: @@ -6537,6 +6612,12 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, if (dp->dtdo_rtype.dtdt_flags & DIF_TF_BYREF) { uintptr_t end = valoffs + size; + if (tracememsize != 0 && + valoffs + tracememsize < end) { + end = valoffs + tracememsize; + tracememsize = 0; + } + if (!dtrace_vcanload((void *)(uintptr_t)val, &dp->dtdo_rtype, &mstate, vstate)) continue; @@ -10128,12 +10209,14 @@ dtrace_ecb_action_add(dtrace_ecb_t *ecb, dtrace_actdesc_t *desc) case DTRACEACT_PRINTA: case DTRACEACT_SYSTEM: case DTRACEACT_FREOPEN: + case DTRACEACT_DIFEXPR: /* * We know that our arg is a string -- turn it into a * format. */ if (arg == 0) { - ASSERT(desc->dtad_kind == DTRACEACT_PRINTA); + ASSERT(desc->dtad_kind == DTRACEACT_PRINTA || + desc->dtad_kind == DTRACEACT_DIFEXPR); format = 0; } else { ASSERT(arg != 0); @@ -10146,7 +10229,8 @@ dtrace_ecb_action_add(dtrace_ecb_t *ecb, dtrace_actdesc_t *desc) /*FALLTHROUGH*/ case DTRACEACT_LIBACT: - case DTRACEACT_DIFEXPR: + case DTRACEACT_TRACEMEM: + case DTRACEACT_TRACEMEM_DYNSIZE: if (dp == NULL) return (EINVAL); @@ -12189,15 +12273,20 @@ dtrace_dof_actdesc(dof_hdr_t *dof, dof_sec_t *sec, dtrace_vstate_t *vstate, (uintptr_t)sec->dofs_offset + offs); kind = (dtrace_actkind_t)desc->dofa_kind; - if (DTRACEACT_ISPRINTFLIKE(kind) && + if ((DTRACEACT_ISPRINTFLIKE(kind) && (kind != DTRACEACT_PRINTA || + desc->dofa_strtab != DOF_SECIDX_NONE)) || + (kind == DTRACEACT_DIFEXPR && desc->dofa_strtab != DOF_SECIDX_NONE)) { dof_sec_t *strtab; char *str, *fmt; uint64_t i; /* - * printf()-like actions must have a format string. + * The argument to these actions is an index into the + * DOF string table. For printf()-like actions, this + * is the format string. For print(), this is the + * CTF type of the expression result. */ if ((strtab = dtrace_dof_sect(dof, DOF_SECT_STRTAB, desc->dofa_strtab)) == NULL) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index cad30d31c..9ab657ff2 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -303,13 +303,15 @@ typedef enum dtrace_probespec { #define DIF_SUBR_INET_NTOP 41 #define DIF_SUBR_INET_NTOA 42 #define DIF_SUBR_INET_NTOA6 43 -#define DIF_SUBR_MEMREF 44 -#define DIF_SUBR_TYPEREF 45 -#define DIF_SUBR_SX_SHARED_HELD 46 -#define DIF_SUBR_SX_EXCLUSIVE_HELD 47 -#define DIF_SUBR_SX_ISEXCLUSIVE 48 +#define DIF_SUBR_TOUPPER 44 +#define DIF_SUBR_TOLOWER 45 +#define DIF_SUBR_MEMREF 46 +#define DIF_SUBR_TYPEREF 47 +#define DIF_SUBR_SX_SHARED_HELD 48 +#define DIF_SUBR_SX_EXCLUSIVE_HELD 49 +#define DIF_SUBR_SX_ISEXCLUSIVE 50 -#define DIF_SUBR_MAX 48 /* max subroutine value */ +#define DIF_SUBR_MAX 50 /* max subroutine value */ typedef uint32_t dif_instr_t; @@ -418,8 +420,10 @@ typedef struct dtrace_difv { #define DTRACEACT_PRINTF 3 /* printf() action */ #define DTRACEACT_PRINTA 4 /* printa() action */ #define DTRACEACT_LIBACT 5 /* library-controlled action */ -#define DTRACEACT_PRINTM 6 /* printm() action */ -#define DTRACEACT_PRINTT 7 /* printt() action */ +#define DTRACEACT_TRACEMEM 6 /* tracemem() action */ +#define DTRACEACT_TRACEMEM_DYNSIZE 7 /* dynamic tracemem() size */ +#define DTRACEACT_PRINTM 8 /* printm() action (BSD) */ +#define DTRACEACT_PRINTT 9 /* printt() action (BSD) */ #define DTRACEACT_PROC 0x0100 #define DTRACEACT_USTACK (DTRACEACT_PROC + 1) -- 2.45.0