From 88660748b0d47af04f9ca035f515deae96f5f49b Mon Sep 17 00:00:00 2001 From: "George V. Neville-Neil" Date: Mon, 11 Oct 2010 14:31:24 +0000 Subject: [PATCH] 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 --- usr.sbin/pmccontrol/pmccontrol.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c index 84c4f17e01f..cce1e0ef14a 100644 --- a/usr.sbin/pmccontrol/pmccontrol.c +++ b/usr.sbin/pmccontrol/pmccontrol.c @@ -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)