Now that it's in the main kernel and I expect that within the next 9 months at least one or two bleeding edge distros will ship with 2.6.31 or later kernels, PAPI installation will become a lot easier. But that assumes a backend that works with perf_counters. When can we expect that?

Thanks for initiating the forum! We're working on it.There is code in the development tree contributed by Corey Ashford of IBM that implements preliminary support for PCL (Performance Counters for Linux) on the IBM Power series. We haven't tested that yet on x86, but hope to get to it soon. The goal is to have it ready before the 2.6.31 kernel is in wide distribution.- dan

Dan Terpstra wrote:Thanks for initiating the forum! We're working on it.There is code in the development tree contributed by Corey Ashford of IBM that implements preliminary support for PCL (Performance Counters for Linux) on the IBM Power series. We haven't tested that yet on x86, but hope to get to it soon. The goal is to have it ready before the 2.6.31 kernel is in wide distribution.- dan

Perhaps someone should have told them that PCL was already a name used in the community (though that project is apparently entirely dormant since quite a few years now) - it's sort of funny to have PAPI on top of PCL.

In "their" defense, the kernel guys who developed this stuff never really named it anything. I suspect they felt they didn't need to, since it would just be part of the kernel anyway. perf_counters is awfully similar to Mikael Pettersson's perfctr. Many in the counter community were calling it "Performance Counters for Linux", which is quite a mouthful. It quickly got shortened to "PCL", not ignoring the irony in reusing the acronym of the earlier and now defunct "program counter library" project from Germany.- dan

ce107 wrote:Now that it's in the main kernel and I expect that within the next 9 months at least one or two bleeding edge distros will ship with 2.6.31 or later kernels, PAPI installation will become a lot easier. But that assumes a backend that works with perf_counters. When can we expect that?

Let me see if I got this right, because it sounds too good to be true ... Will (some) performance counter library be a part of the standard kernel? We have been looking forward to that for a long time. Is similarity to Pettersson's work just a coincidence(!) or are they actually collaborating? In any case, this is good news. I believe PAPI gurus in the forum/list have been receiving more counter-related questions than the PAPI itself!

Actually it's the name perf_counters that's similar to Mikael's perfctr. The implementation is significantly different. In either case, yes, it's in the kernel starting with 2.6.31 (which isn't released yet).

The kernel folks are referring to "Performance Counters for Linux" (the title of the original proposal posted on LKML) as just perf_counters now, and the user-space tool they've developed as "perf". I think they chose to refer to it as perf_counters because the bulk of the code is contained in kernel/perf_counter.c in the kernel source. So only a few of the kernel developers will call it PCL, and those are the ones from IBM who hadn't followed the LKML discussion much.

To straighten things out on the PAPI side, we probably ought to change the name of the PAPI substrate to perf_counters rather than PCL, to reduce the confusion.... though it might make it harder to distinguish perfctr from perf_counters!

As far as a standard library goes, that's still up in the air. Peter Zijlstra was working on a library called libperf, which will I think provide some of the same ability as Stephane Eranian's libpfm, but oriented a bit differently since it will only support perf_counters.

Stephane Eranian was also working on a new version of libpfm to support perf_counters.

I'm not clear on the current status of these two projects.

In the case of libperf, it's possible it may get shipped with the kernel source, like the perf tool. The perf tool is the only case where the source for a user-space tool is in the kernel's git tree. When you download a 2.6.31 kernel, you get perf too.