mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
Ignore absent CPUs when listing the current state of PMC hardware.
This commit is contained in:
parent
7dada26401
commit
5d09484b2a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184998
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user