Linux performance counters

Performance counter drivers under linux are an interesting affair. There's oprofile, perfctr and perfmon2. Neither does exactly what I need in combination with Xeon, but put together they'd be an excellent tool.

Now: I want to measure L1 cache misses on Xeon. oprofile can't do it out of the box (one has to program some extra registers that oprofile doesn't seem to know about), perfctr has very weak user-mode tools (basically, it's just a library), and perfmon2 doesn't seem to support Xeon. perfmon2 seems the best designed project, compiles cleanly and reports it's initialized, but trying to start any user-mode program just says that the processor isn't supported. The author of perfctr has himself said on a mailing list that he's giving up on perfctr development in favor of perfmon2.

Has anyone managed to get perfmon2 working on Xeon/P4 (not Pentium M)? And how?



Unknown said...


I am trying to do the same. I want to read the Cache misses and TLB misses on a Xeon 5150 processor. Were you able to modify any of these tools to provide this information. Do let me know.


Unknown said...

cputrack/analyze/collect/cpustat... welcome to Solaris :-)