Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2006 16:37:07 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        John Birrell <jb@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 96007 for review
Message-ID:  <200604241637.08322.jhb@freebsd.org>
In-Reply-To: <200604241913.k3OJDEAq055317@repoman.freebsd.org>
References:  <200604241913.k3OJDEAq055317@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 24 April 2006 15:13, John Birrell wrote:
> http://perforce.freebsd.org/chv.cgi?CH=96007
> 
> Change 96007 by jb@jb_freebsd2 on 2006/04/24 19:13:05
> 
> 	Use mp_maxid instead of mp_ncpus. cpus are sparse, so this code
> 	needs to be changed to use the cpu list, only allocating buffers
> 	for the cpus that exist.
> 
> Affected files ...
> 
> .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_buffer.c#4 edit
> 
> Differences ...
> 
> ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_buffer.c#4 (text+ko) ====
> 
> @@ -148,7 +148,7 @@
>  	int i;
>  
>  	ASSERT(MUTEX_HELD(&dtrace_lock));
> -	for (i = 0; i < mp_ncpus; i++) {
> +	for (i = 0; i < mp_maxid; i++) {

Use <= with mp_maxid.  The range is 0 .. mp_maxid (inclusive).

>  		buf = &bufs[i];
>  
>  		/*
> @@ -158,7 +158,6 @@
>  		 */
>  		if (buf->dtb_tomax != NULL) {
>  			ASSERT(buf->dtb_size == size);
> -printf("buf->dtb_size %ld size %ld\n",(long) buf->dtb_size,(long) size);
>  			continue;
>  		}
>  
> 

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604241637.08322.jhb>