svn commit: r184998 - head/usr.sbin/pmccontrol
Joseph Koshy
jkoshy at FreeBSD.org
Sat Nov 15 20:26:38 PST 2008
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);
More information about the svn-src-all
mailing list