PERFORCE change 132616 for review

John Birrell jb at FreeBSD.org
Sat Jan 5 23:01:38 PST 2008


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

Change 132616 by jb at jb_freebsd1 on 2008/01/06 07:00:54

	Define and call the invalid opcode init and uninit functions which
	add/remove the hook to/from the exception handler code.

Affected files ...

.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#25 edit
.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#21 edit
.. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#13 edit

Differences ...

==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#25 (text+ko) ====

@@ -53,6 +53,9 @@
 	/* Hang our hook for thread switches. */
 	dtrace_vtime_switch_func = dtrace_vtime_switch;
 
+	/* Hang our hook for invalid opcodes. */
+	dtrace_invop_init();
+
 	/*
 	 * XXX This is a short term hack to avoid having to comment
 	 * out lots and lots of lock/unlock calls.

==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#21 (text+ko) ====

@@ -159,6 +159,9 @@
 	/* XXX Hack */
 	mutex_destroy(&mod_lock);
 
+	/* Reset out hook for invalid opcodes. */
+	dtrace_invop_uninit();
+
 	/*
 	 * Reset our hook for thread switches, but ensure that vtime isn't
 	 * active first.

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

@@ -15965,6 +15965,9 @@
 static struct clonedevs	*dtrace_clones;		/* Ptr to the array of cloned devices. */
 static eventhandler_tag	eh_tag;			/* Event handler tag. */
 
+void dtrace_invop_init(void);
+void dtrace_invop_uninit(void);
+
 static struct cdevsw dtrace_cdevsw = {
 	.d_version	= D_VERSION,
 	.d_close	= dtrace_close,


More information about the p4-projects mailing list