Date: Tue, 27 May 2008 06:26:21 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 142368 for review Message-ID: <200805270626.m4R6QLW1048473@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142368 Change 142368 by jb@freebsd3 on 2008/05/27 06:25:53 Add a hook for the double trap handler. Only process trap types that could be relevant to DTrace. Affected files ... .. //depot/projects/dtrace7/src/sys/i386/i386/trap.c#4 edit Differences ... ==== //depot/projects/dtrace7/src/sys/i386/i386/trap.c#4 (text+ko) ==== @@ -113,6 +113,8 @@ */ dtrace_trap_func_t dtrace_trap_func; +dtrace_doubletrap_func_t dtrace_doubletrap_func; + /* * This is a hook which is initialised by the systrace module * when it is loaded. This keeps the DTrace syscall provider @@ -251,7 +253,8 @@ * handled the trap and modified the trap frame so that this * function can return normally. */ - if (dtrace_trap_func != NULL) + if ((type == T_PROTFLT || type == T_PAGEFLT) && + dtrace_trap_func != NULL) if ((*dtrace_trap_func)(frame, type)) goto out; #endif @@ -953,6 +956,10 @@ void dblfault_handler() { +#ifdef KDTRACE_HOOKS + if (dtrace_doubletrap_func != NULL) + (*dtrace_doubletrap_func)(); +#endif printf("\nFatal double fault:\n"); printf("eip = 0x%x\n", PCPU_GET(common_tss.tss_eip)); printf("esp = 0x%x\n", PCPU_GET(common_tss.tss_esp));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805270626.m4R6QLW1048473>