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