Index: lib/libpmc/libpmc.c =================================================================== RCS file: /usr/home/kmacy/devel/ncvs/src/lib/libpmc/libpmc.c,v retrieving revision 1.10 diff -d -u -r1.10 libpmc.c --- lib/libpmc/libpmc.c 20 Mar 2006 15:28:59 -0000 1.10 +++ lib/libpmc/libpmc.c 19 Feb 2007 05:14:08 -0000 @@ -52,12 +52,12 @@ struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int p6_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); #endif #if defined(__i386__) static int p5_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); -static int p6_allocate_pmc(enum pmc_event _pe, char *_ctrspec, - struct pmc_op_pmcallocate *_pmc_config); #endif #define PMC_CALL(cmd, params) \ @@ -1304,12 +1304,12 @@ { return -1 || pe || ctrspec || pmc_config; /* shut up gcc */ } - +#endif /* * Pentium Pro style PMCs. These PMCs are found in Pentium II, Pentium III, * and Pentium M CPUs. */ - +#if defined(__amd64__) || defined(__i386__) static struct pmc_event_alias p6_aliases[] = { EV_ALIAS("branches", "p6-br-inst-retired"), EV_ALIAS("branch-mispredicts", "p6-br-miss-pred-retired"), @@ -1941,7 +1941,7 @@ /* set parser pointer */ switch (cpu_info.pm_cputype) { -#if defined(__i386__) +#if defined(__i386__) case PMC_CPU_AMD_K7: pmc_mdep_event_aliases = k7_aliases; pmc_mdep_allocate_pmc = k7_allocate_pmc; @@ -1953,12 +1953,12 @@ case PMC_CPU_INTEL_P6: /* P6 ... Pentium M CPUs have */ case PMC_CPU_INTEL_PII: /* similar PMCs. */ case PMC_CPU_INTEL_PIII: +#endif +#if defined(__amd64__) || defined(__i386__) case PMC_CPU_INTEL_PM: pmc_mdep_event_aliases = p6_aliases; pmc_mdep_allocate_pmc = p6_allocate_pmc; break; -#endif -#if defined(__amd64__) || defined(__i386__) case PMC_CPU_INTEL_PIV: pmc_mdep_event_aliases = p4_aliases; pmc_mdep_allocate_pmc = p4_allocate_pmc; @@ -1968,7 +1968,6 @@ pmc_mdep_allocate_pmc = k8_allocate_pmc; break; #endif - default: /* * Some kind of CPU this version of the library knows nothing