Refresh OProfile code running on the target side to 0.9.5 for ARMV7.
diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c
index b9d13de..e168b43 100644
--- a/libop/op_cpu_type.c
+++ b/libop/op_cpu_type.c
@@ -14,6 +14,7 @@
#include <string.h>
#include "op_cpu_type.h"
+#include "op_hw_specific.h"
struct cpu_descr {
char const * pretty;
@@ -74,6 +75,13 @@
{ "ppc64 POWER5++", "ppc64/power5++", CPU_PPC64_POWER5pp, 6 },
{ "e300", "ppc/e300", CPU_PPC_E300, 4 },
{ "AVR32", "avr32", CPU_AVR32, 3 },
+ { "ARM V7 PMNC", "arm/armv7", CPU_ARM_V7, 5 },
+ { "Intel Architectural Perfmon", "i386/arch_perfmon", CPU_ARCH_PERFMON, 0},
+ { "AMD64 family11h", "x86-64/family11h", CPU_FAMILY11H, 4 },
+ { "ppc64 POWER7", "ppc64/power7", CPU_PPC64_POWER7, 6 },
+ { "ppc64 compat version 1", "ppc64/ibm-compat-v1", CPU_PPC64_IBM_COMPAT_V1, 4 },
+ { "Intel Core/i7", "i386/core_i7", CPU_CORE_I7, 4 },
+ { "Intel Atom", "i386/atom", CPU_ATOM, 2 },
};
static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr);
@@ -151,8 +159,14 @@
int op_get_nr_counters(op_cpu cpu_type)
{
+ int cnt;
+
if (cpu_type <= CPU_NO_GOOD || cpu_type >= MAX_CPU_TYPE)
return 0;
+ cnt = arch_num_counters(cpu_type);
+ if (cnt >= 0)
+ return cnt;
+
return cpu_descrs[cpu_type].nr_counters;
}