Date: Mon, 11 Oct 2010 14:31:24 +0000 (UTC) From: "George V. Neville-Neil" <gnn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r213691 - head/usr.sbin/pmccontrol Message-ID: <201010111431.o9BEVO2i018185@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gnn Date: Mon Oct 11 14:31:24 2010 New Revision: 213691 URL: http://svn.freebsd.org/changeset/base/213691 Log: 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 Modified: head/usr.sbin/pmccontrol/pmccontrol.c Modified: head/usr.sbin/pmccontrol/pmccontrol.c ============================================================================== --- head/usr.sbin/pmccontrol/pmccontrol.c Mon Oct 11 13:31:09 2010 (r213690) +++ head/usr.sbin/pmccontrol/pmccontrol.c Mon Oct 11 14:31:24 2010 (r213691) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010111431.o9BEVO2i018185>