mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
Add code to print the number and type of the CPU that is present in
the system as well has how many PMCs there are per CPU. In this code CPU and core are equivalent. MFC after: 1 day
This commit is contained in:
parent
5bcc8fafda
commit
88660748b0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213691
@ -243,6 +243,10 @@ pmcc_do_list_state(void)
|
||||
if (pmc_cpuinfo(&pc) != 0)
|
||||
err(EX_OSERR, "Unable to determine CPU information");
|
||||
|
||||
printf("%d %s CPUs present, with %d PMCs per CPU\n", pc->pm_ncpu,
|
||||
pmc_name_of_cputype(pc->pm_cputype),
|
||||
pc->pm_npmc);
|
||||
|
||||
dummy = sizeof(logical_cpus_mask);
|
||||
if (sysctlbyname("machdep.logical_cpus_mask", &logical_cpus_mask,
|
||||
&dummy, NULL, 0) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user