Date: Sun, 6 Jan 2008 07:01:37 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 132616 for review Message-ID: <200801060701.m0671b9S056254@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132616 Change 132616 by jb@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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801060701.m0671b9S056254>