svn commit: r213753 - stable/8/usr.sbin/pmccontrol

George V. Neville-Neil gnn at FreeBSD.org
Tue Oct 12 22:10:08 UTC 2010


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)


More information about the svn-src-stable-8 mailing list