From owner-cvs-all@FreeBSD.ORG Thu Dec 8 13:16:35 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A0B716A41F; Thu, 8 Dec 2005 13:16:35 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D2CE43D53; Thu, 8 Dec 2005 13:16:32 +0000 (GMT) (envelope-from rwatson@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 jB8DGMMo085362; Thu, 8 Dec 2005 13:16:22 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jB8DGMXn085361; Thu, 8 Dec 2005 13:16:22 GMT (envelope-from rwatson) Message-Id: <200512081316.jB8DGMXn085361@repoman.freebsd.org> From: Robert Watson Date: Thu, 8 Dec 2005 13:16:22 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/tools/tools/umastat umastat.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2005 13:16:35 -0000 rwatson 2005-12-08 13:16:22 UTC FreeBSD src repository Modified files: tools/tools/umastat umastat.c Log: Teach umastat about the variable-length array of per-CPU caches at the end of struct uma_zone. It is declared as an array of size [1], but then sized at run-time by UMA to include room for mp_maxid+1 CPUs. We have to copy the uma_zone first at the declared structure size, then check to make sure it's not an internal zone before copying the larger size (UMA internal zones don't use per-CPU caches). This fixes umastat for SMP. Revision Changes Path 1.2 +74 -23 src/tools/tools/umastat/umastat.c