Ignore absent CPUs when listing the current state of PMC hardware.

This commit is contained in:
Joseph Koshy 2008-11-16 04:26:38 +00:00
parent 7dada26401
commit 5d09484b2a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184998

View File

@ -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);