From owner-svn-src-stable-7@FreeBSD.ORG Tue Oct 12 22:11:31 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B968E106564A; Tue, 12 Oct 2010 22:11:31 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6E478FC13; Tue, 12 Oct 2010 22:11:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9CMBVn3063712; Tue, 12 Oct 2010 22:11:31 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CMBVTX063710; Tue, 12 Oct 2010 22:11:31 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201010122211.o9CMBVTX063710@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 12 Oct 2010 22:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213754 - stable/7/usr.sbin/pmccontrol X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 22:11:31 -0000 Author: gnn Date: Tue Oct 12 22:11:31 2010 New Revision: 213754 URL: http://svn.freebsd.org/changeset/base/213754 Log: MFC 213691: 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. Modified: stable/7/usr.sbin/pmccontrol/pmccontrol.c Directory Properties: stable/7/usr.sbin/pmccontrol/ (props changed) Modified: stable/7/usr.sbin/pmccontrol/pmccontrol.c ============================================================================== --- stable/7/usr.sbin/pmccontrol/pmccontrol.c Tue Oct 12 22:10:07 2010 (r213753) +++ stable/7/usr.sbin/pmccontrol/pmccontrol.c Tue Oct 12 22:11:31 2010 (r213754) @@ -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)