Date: Tue, 13 Jun 2006 00:57:59 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 99103 for review Message-ID: <200606130057.k5D0vxYr053196@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99103 Change 99103 by jb@jb_freebsd2 on 2006/06/13 00:57:48 Can't do any more printfs from the probe context now that fbt is around because it creates double faults which end in tears. Increment/decrement a count to help debug illegal probe recursion. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probe.c#9 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probe.c#9 (text+ko) ==== @@ -50,6 +50,9 @@ } #endif + /* Keep track of when a probe is being executed. */ + dtrace_in_probe++; + now = dtrace_gethrtime(); vtime = dtrace_vtime_references != 0; @@ -435,7 +438,6 @@ case DTRACEACT_USYM: case DTRACEACT_UMOD: case DTRACEACT_UADDR: { -printf("%s(%d): USYM, UMOD or UADDR\n",__FUNCTION__,__LINE__); #ifdef DOODAD struct pid *pid = curthread->t_procp->p_pidp; @@ -608,5 +610,11 @@ if (vtime) curthread->t_dtrace_start = dtrace_gethrtime(); + /* + * Probes shouldn't be called recursively, so this should return + * to zero. + */ + dtrace_in_probe--; + dtrace_interrupt_enable(cookie); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606130057.k5D0vxYr053196>