Hi,
On Fri, Dec 11, 2009 at 10:00 PM, Bhavishya Goel <bhavishya.g...@gmail.com> wrote: > I just installed the libpfm and pfmon on my new core i7 870 machine, but the > command pfmon -I command detected the PMU model as generic intel > architecture ("Intel architectural PMU") instead of Intel Nehalem. Digging > into the libpfm code, I found that the libpfm_intel_nhm.c identified only > value '26' for cpu_model for intel nehalem while the cpu model for core i7 > 870 is 30. Adding the switch case for value 30 (with same code as for 26) > in pfm_nhm_init and pfm_nhm_detect functions did the trick, or so it seems. > Before, the pfmon -L spit out just five counters, but now it spits out 450 > counters, so it does seem to work. Is there anything else I should take care > of? This is with an older version of libpfm. If you pull libpfm from CVS it should have Core i5 support. But I think what you did is good enough for libpfm. The kernel will use perfmon_intel_arch as the kernel module. That should get you going for most counting and sampling on with the CORE PMU. To get access to more advanced stuff, you need the following kernel changes: You are on 2.6.29, then you have to do a similar trick in a couple of files: arch/x86/perfmon/perfmon.c:pfm_arch_get_pmu_module_name() add: case 30: return "perfmon_intel_nhm"; arch/x86/perfmon/perfmon_intel_arch:pfm_intel_arch_probe_pmu() add: case 30: return -1; arch/x86/perfmon/perfmon_intel_nhm.c:pfm_nhm_probe_pmu() add: case 30: break; An alternative may be to simply pull the 2.6.30 code from the perfmon kernel GIT tree. ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel