PERFORCE change 143165 for review

John Birrell jb at FreeBSD.org
Mon Jun 9 03:20:43 UTC 2008


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

Change 143165 by jb at freebsd3 on 2008/06/09 03:20:11

	The DTrace syscall provider on releng6 breaks the sysent ABI, so it
	has to be enabled using the BREAK_SYSENT_ABI kernel option. The rest
	of DTrace functions without this.

Affected files ...

.. //depot/projects/dtrace6/src/sys/cddl/dev/systrace/systrace.c#2 edit

Differences ...

==== //depot/projects/dtrace6/src/sys/cddl/dev/systrace/systrace.c#2 (text+ko) ====

@@ -131,6 +131,7 @@
 	 * function registered. If so, it is a syscall registered
 	 * by a loaded module.
 	 */
+#ifdef BREAK_SYSENT_ABI
 	if (sysent->sy_systrace_args_func != NULL)
 		/*
 		 * Convert the syscall parameters using the registered
@@ -144,6 +145,7 @@
 		 * into thhe array of 64-bit values that DTrace 
 		 * expects.
 		 */
+#endif
 		systrace_args(sysnum, params, uargs, &n_args);
 
 	/* Process the probe using the converted argments. */
@@ -207,21 +209,25 @@
 static void
 systrace_enable(void *arg, dtrace_id_t id, void *parg)
 {
+#ifdef BREAK_SYSENT_ABI
 	int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg);
 
 	if (SYSTRACE_ISENTRY((uintptr_t)parg))
 		sysent[sysnum].sy_entry = id;
 	else
 		sysent[sysnum].sy_return = id;
+#endif
 }
 
 static void
 systrace_disable(void *arg, dtrace_id_t id, void *parg)
 {
+#ifdef BREAK_SYSENT_ABI
 	int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg);
 
 	sysent[sysnum].sy_entry = 0;
 	sysent[sysnum].sy_return = 0;
+#endif
 }
 
 static void
@@ -261,6 +267,10 @@
 
 	switch (type) {
 	case MOD_LOAD:
+#ifndef BREAK_SYSENT_ABI
+		printf("systrace: The BREAK_SYSENT_ABI kernel option is required to use the DTrace syscall provider!\n");
+		error = EOPNOTSUPP;
+#endif
 		break;
 
 	case MOD_UNLOAD:


More information about the p4-projects mailing list