pmccontrol.c (145256) | pmccontrol.c (145774) |
---|---|
1/*- 2 * Copyright (c) 2003,2004 Joseph Koshy 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003,2004 Joseph Koshy 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/usr.sbin/pmccontrol/pmccontrol.c 145256 2005-04-19 04:01:25Z jkoshy $"); | 29__FBSDID("$FreeBSD: head/usr.sbin/pmccontrol/pmccontrol.c 145774 2005-05-01 14:11:49Z jkoshy $"); |
30 31#include <sys/types.h> 32#include <sys/queue.h> 33#include <sys/sysctl.h> 34 35#include <assert.h> 36#include <err.h> 37#include <errno.h> --- 245 unchanged lines hidden (view full) --- 283 const struct pmc_op_getcpuinfo *ci; 284 285 if (pmc_cpuinfo(&ci) != 0) 286 err(EX_OSERR, "Unable to determine CPU information"); 287 288 eventnamelist = NULL; 289 290 for (i = 0; i < ci->pm_nclass; i++) { | 30 31#include <sys/types.h> 32#include <sys/queue.h> 33#include <sys/sysctl.h> 34 35#include <assert.h> 36#include <err.h> 37#include <errno.h> --- 245 unchanged lines hidden (view full) --- 283 const struct pmc_op_getcpuinfo *ci; 284 285 if (pmc_cpuinfo(&ci) != 0) 286 err(EX_OSERR, "Unable to determine CPU information"); 287 288 eventnamelist = NULL; 289 290 for (i = 0; i < ci->pm_nclass; i++) { |
291 c = ci->pm_classes[i]; | 291 c = ci->pm_classes[i].pm_class; |
292 293 printf("%s\n", pmc_name_of_class(c)); 294 if (pmc_event_names_of_class(c, &eventnamelist, &nevents) < 0) 295 err(EX_OSERR, "ERROR: Cannot find information for " 296 "event class \"%s\"", pmc_name_of_class(c)); 297 298 for (j = 0; j < nevents; j++) 299 printf("\t%s\n", eventnamelist[j]); --- 177 unchanged lines hidden --- | 292 293 printf("%s\n", pmc_name_of_class(c)); 294 if (pmc_event_names_of_class(c, &eventnamelist, &nevents) < 0) 295 err(EX_OSERR, "ERROR: Cannot find information for " 296 "event class \"%s\"", pmc_name_of_class(c)); 297 298 for (j = 0; j < nevents; j++) 299 printf("\t%s\n", eventnamelist[j]); --- 177 unchanged lines hidden --- |