From owner-svn-src-all@FreeBSD.ORG Sun Nov 16 04:26:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C6411065677; Sun, 16 Nov 2008 04:26:38 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68E6F8FC08; Sun, 16 Nov 2008 04:26:38 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAG4QchK042844; Sun, 16 Nov 2008 04:26:38 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAG4QcL1042843; Sun, 16 Nov 2008 04:26:38 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811160426.mAG4QcL1042843@svn.freebsd.org> From: Joseph Koshy Date: Sun, 16 Nov 2008 04:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184998 - head/usr.sbin/pmccontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2008 04:26:38 -0000 Author: jkoshy Date: Sun Nov 16 04:26:38 2008 New Revision: 184998 URL: http://svn.freebsd.org/changeset/base/184998 Log: Ignore absent CPUs when listing the current state of PMC hardware. Modified: head/usr.sbin/pmccontrol/pmccontrol.c Modified: head/usr.sbin/pmccontrol/pmccontrol.c ============================================================================== --- head/usr.sbin/pmccontrol/pmccontrol.c Sun Nov 16 04:21:59 2008 (r184997) +++ head/usr.sbin/pmccontrol/pmccontrol.c Sun Nov 16 04:26:38 2008 (r184998) @@ -256,9 +256,12 @@ pmcc_do_list_state(void) (logical_cpus_mask & (1 << cpu))) continue; /* skip P4-style 'logical' cpus */ #endif - if (pmc_pmcinfo(cpu, &pi) < 0) + if (pmc_pmcinfo(cpu, &pi) < 0) { + if (errno == ENXIO) + continue; err(EX_OSERR, "Unable to get PMC status for CPU %d", cpu); + } printf("#CPU %d:\n", c++); npmc = pmc_npmc(cpu);