PERFORCE change 96531 for review

John Birrell jb at FreeBSD.org
Mon May 1 23:56:05 UTC 2006


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

Change 96531 by jb at jb_freebsd2 on 2006/05/01 23:55:18

	Just a few remaining issues with this function.

Affected files ...

.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_probe.c#6 edit

Differences ...

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

@@ -32,8 +32,10 @@
 	cookie = dtrace_interrupt_disable();
 	probe = dtrace_probes[id - 1];
 	cpuid = CPU->cpu_id;
-#ifdef DOODAD
+
+#if defined(sun)
 	onintr = CPU_ON_INTR(CPU);
+#endif
 
 	if (!onintr && probe->dtpr_predcache != DTRACE_CACHEIDNONE &&
 	    probe->dtpr_predcache == curthread->t_predcache) {
@@ -45,6 +47,7 @@
 		return;
 	}
 
+#if defined(sun)
 	if (panic_quiesce) {
 		/*
 		 * We don't trace anything if we're panicking.
@@ -52,8 +55,6 @@
 		dtrace_interrupt_enable(cookie);
 		return;
 	}
-#else
-onintr = 0;
 #endif
 
 	now = dtrace_gethrtime();
@@ -157,13 +158,12 @@
 			 * profile case, the check above will ensure that
 			 * we're examining a user context.
 			 */
+#ifdef DOODAD
 			if (ecb->dte_cond & DTRACE_COND_OWNER) {
-printf("%s(%d): DOODAD\n",__FUNCTION__,__LINE__);
-#ifdef DOODAD
 				cred_t *cr;
 				cred_t *s_cr =
 				    ecb->dte_state->dts_cred.dcr_cred;
-				proc_t *proc;
+				proc_t *proc = NULL;
 
 				ASSERT(s_cr != NULL);
 
@@ -177,12 +177,11 @@
 				    (proc = ttoproc(curthread)) == NULL ||
 				    (proc->p_flag & SNOCD))
 					continue;
+			}
 #endif
-			}
 
+#if defined(sun)
 			if (ecb->dte_cond & DTRACE_COND_ZONEOWNER) {
-printf("%s(%d): DOODAD\n",__FUNCTION__,__LINE__);
-#ifdef DOODAD
 				cred_t *cr;
 				cred_t *s_cr =
 				    ecb->dte_state->dts_cred.dcr_cred;
@@ -193,8 +192,8 @@
 				    s_cr->cr_zone->zone_id !=
 				    cr->cr_zone->zone_id)
 					continue;
+			}
 #endif
-			}
 		}
 
 		if (now - state->dts_alive > dtrace_deadman_timeout) {
@@ -322,11 +321,10 @@
 				if (!dtrace_priv_proc(state))
 					continue;
 
+#if defined(sun)
 				/*
 				 * See comment in DIF_VAR_PID.
 				 */
-printf("%s(%d): DOODAD\n",__FUNCTION__,__LINE__);
-#ifdef DOODAD
 				if (DTRACE_ANCHORED(mstate.dtms_probe) &&
 				    CPU_ON_INTR(CPU)) {
 					int depth = DTRACE_USTACK_NFRAMES(
@@ -446,7 +444,7 @@
 			case DTRACEACT_USYM:
 			case DTRACEACT_UMOD:
 			case DTRACEACT_UADDR: {
-printf("%s(%d): DOODAD\n",__FUNCTION__,__LINE__);
+printf("%s(%d): USYM, UMOD or UADDR\n",__FUNCTION__,__LINE__);
 #ifdef DOODAD
 				struct pid *pid = curthread->t_procp->p_pidp;
 


More information about the p4-projects mailing list