Date: Fri, 12 May 2006 23:26:08 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 97034 for review Message-ID: <200605122326.k4CNQ82D004058@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=97034 Change 97034 by jb@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605122326.k4CNQ82D004058>