PERFORCE change 99103 for review

John Birrell jb at FreeBSD.org
Tue Jun 13 01:00:21 UTC 2006


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

Change 99103 by jb at 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);
 }


More information about the p4-projects mailing list