PERFORCE change 135012 for review

John Birrell jb at FreeBSD.org
Thu Feb 7 21:20:00 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=135012

Change 135012 by jb at jb_freebsd1 on 2008/02/08 05:19:17

	Use uintptr_t types instead of uint64_t to better match the
	machine type.

Affected files ...

.. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#24 edit
.. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#34 edit

Differences ...

==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#24 (text) ====

@@ -273,7 +273,7 @@
 { "max", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MAX, DT_ATTR_STABCMN, DT_VERS_1_0,
 	&dt_idops_func, "void(@)" },
 { "memref", DT_IDENT_FUNC, 0, DIF_SUBR_MEMREF, DT_ATTR_STABCMN, DT_VERS_1_1,
-	&dt_idops_func, "uint64_t *(void *, size_t)" },
+	&dt_idops_func, "uintptr_t *(void *, size_t)" },
 { "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0,
 	&dt_idops_func, "void(@)" },
 { "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN,
@@ -315,7 +315,7 @@
 { "printf", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTF, DT_ATTR_STABCMN, DT_VERS_1_0,
 	&dt_idops_func, "void(@, ...)" },
 { "printm", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTM, DT_ATTR_STABCMN, DT_VERS_1_0,
-	&dt_idops_func, "void(size_t, uint64_t *)" },
+	&dt_idops_func, "void(size_t, uintptr_t *)" },
 { "probefunc", DT_IDENT_SCALAR, 0, DIF_VAR_PROBEFUNC,
 	DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" },
 { "probemod", DT_IDENT_SCALAR, 0, DIF_VAR_PROBEMOD,

==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#34 (text) ====

@@ -6029,7 +6029,7 @@
 
 			case DTRACEACT_PRINTM: {
 				/* The DIF returns a 'memref'. */
-				uint64_t *memref = (uint64_t *) val;
+				uintptr_t *memref = (uintptr_t *) val;
 
 				/* Get the size from the memref. */
 				size = memref[1];
@@ -6038,21 +6038,21 @@
 				 * Check if the size exceeds the allocated
 				 * buffer size.
 				 */
-				if (size + sizeof(uint64_t) > dp->dtdo_rtype.dtdt_size) {
+				if (size + sizeof(uintptr_t) > dp->dtdo_rtype.dtdt_size) {
 					/* Flag a drop! */
 					*flags |= CPU_DTRACE_DROP;
 					continue;
 				}
 
 				/* Store the size in the buffer first. */
-				DTRACE_STORE(uint64_t, tomax,
+				DTRACE_STORE(uintptr_t, tomax,
 				    valoffs, size);
 
 				/*
 				 * Offset the buffer address to the start
 				 * of the data.
 				 */
-				valoffs += sizeof(uint64_t);
+				valoffs += sizeof(uintptr_t);
 
 				/*
 				 * Reset to the memory address rather than


More information about the p4-projects mailing list