Hello
The following are the patches I needed to get perfmon2 working on an SGI
Octane machine I have that has a MIPS R12000 processor.
The patch turns on perfmon2 support, as well as hard-codes
the number of counters (with r10000 and r12000 machines there is no way
to detect the number of perf ctrs, you just have to hard-code in the
proper values).
Vince
--- ./arch/mips/perfmon/perfmon.c.orig 2007-08-28 21:46:36.000000000 -0400
+++ ./arch/mips/perfmon/perfmon.c 2007-08-28 22:47:14.000000000 -0400
@@ -316,6 +316,7 @@
#endif
case CPU_SB1:
case CPU_SB1A:
+ case CPU_R12000:
case CPU_25KF:
case CPU_24K:
case CPU_20KC:
--- ./arch/mips/perfmon/perfmon_mips64.c.orig 2007-08-28 22:45:36.000000000
-0400
+++ ./arch/mips/perfmon/perfmon_mips64.c 2007-08-29 12:47:48.000000000
-0400
@@ -72,6 +72,7 @@
#endif
case CPU_SB1:
case CPU_SB1A:
+ case CPU_R12000:
case CPU_25KF:
case CPU_24K:
case CPU_20KC:
@@ -122,6 +123,9 @@
case CPU_5KC:
pfm_mips64_pmu_conf.pmu_name = "MIPS5KC";
break;
+ case CPU_R12000:
+ pfm_mips64_pmu_conf.pmu_name = "MIPSR12000";
+ break;
case CPU_20KC:
pfm_mips64_pmu_conf.pmu_name = "MIPS20KC";
break;
@@ -152,7 +156,16 @@
return -1;
}
- num = n_counters();
+ if (c->cputype==CPU_R12000) {
+ num=4;
+ }
+ else if (c->cputype==CPU_R10000) {
+ num=2;
+ }
+ else {
+ num = n_counters();
+ }
+
if (num == 0) {
PFM_INFO("cputype 0x%x has no counters",c->cputype);
return -1;
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/