From owner-p4-projects@FreeBSD.ORG Mon Apr 24 19:13:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 107F016A405; Mon, 24 Apr 2006 19:13:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6C1716A403 for ; Mon, 24 Apr 2006 19:13:14 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9423843D46 for ; Mon, 24 Apr 2006 19:13:14 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3OJDE0p055320 for ; Mon, 24 Apr 2006 19:13:14 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3OJDEAq055317 for perforce@freebsd.org; Mon, 24 Apr 2006 19:13:14 GMT (envelope-from jb@freebsd.org) Date: Mon, 24 Apr 2006 19:13:14 GMT Message-Id: <200604241913.k3OJDEAq055317@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 96007 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Apr 2006 19:13:15 -0000 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++) { 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; }