PERFORCE change 97034 for review

John Birrell jb at FreeBSD.org
Fri May 12 23:26:09 UTC 2006


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

Change 97034 by jb at jb_freebsd2 on 2006/05/12 23:25:25

	Zero the size of the structure, not just the size of the pointer. Oops.
	
	On FreeBSD, only process CPUs if they are present.

Affected files ...

.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#12 edit

Differences ...

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

@@ -658,7 +658,7 @@
 		dtrace_membar_producer();
 		state->dts_laststatus = dtrace_gethrtime();
 
-		bzero(stat, sizeof (stat));
+		bzero(stat, sizeof (*stat));
 
 		mutex_enter(&dtrace_lock);
 
@@ -674,6 +674,10 @@
 		dstate = &state->dts_vstate.dtvs_dynvars;
 
 		for (i = 0; i < NCPU; i++) {
+#if !defined(sun)
+			if (pcpu_find(i) == NULL)
+				continue;
+#endif
 			dtrace_dstate_percpu_t *dcpu = &dstate->dtds_percpu[i];
 
 			stat->dtst_dyndrops += dcpu->dtdsc_drops;


More information about the p4-projects mailing list