diff options
author | gnn <gnn@FreeBSD.org> | 2010-10-11 14:31:24 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2010-10-11 14:31:24 +0000 |
commit | b70c0f5aa8b46d37430be4bf0d5a770769e053f7 (patch) | |
tree | a4cd8bfb3d6305bbbaf13873b9529de1a75f2903 /usr.sbin/pmccontrol | |
parent | 2c6068194e36b120c621126818a018bcc1a5deda (diff) | |
download | FreeBSD-src-b70c0f5aa8b46d37430be4bf0d5a770769e053f7.zip FreeBSD-src-b70c0f5aa8b46d37430be4bf0d5a770769e053f7.tar.gz |
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
Diffstat (limited to 'usr.sbin/pmccontrol')
-rw-r--r-- | usr.sbin/pmccontrol/pmccontrol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c index 84c4f17..cce1e0e 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) |