perf_counter based PAPI

Open discussion of PAPI.

perf_counter based PAPI

Postby ce107 » Tue Aug 25, 2009 4:34 pm

Let me initialize the forum. :)

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?
ce107
 
Posts: 3
Joined: Tue Aug 25, 2009 4:23 pm

Re: perf_counter based PAPI

Postby Dan Terpstra » Tue Aug 25, 2009 4:43 pm

Thanks for initiating the forum! 8-)
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
 
Posts: 57
Joined: Mon Aug 24, 2009 5:42 pm

Re: perf_counter based PAPI

Postby ce107 » Wed Aug 26, 2009 12:05 pm

Dan Terpstra wrote:Thanks for initiating the forum! 8-)
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.
ce107
 
Posts: 3
Joined: Tue Aug 25, 2009 4:23 pm

Re: perf_counter based PAPI

Postby Dan Terpstra » Wed Aug 26, 2009 12:37 pm

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
Dan Terpstra
 
Posts: 57
Joined: Mon Aug 24, 2009 5:42 pm

Re: perf_counter based PAPI

Postby Memo » Wed Aug 26, 2009 1:49 pm

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!
Memo
 
Posts: 2
Joined: Wed Aug 26, 2009 1:34 pm

Re: perf_counter based PAPI

Postby Dan Terpstra » Wed Aug 26, 2009 2:21 pm

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).
Dan Terpstra
 
Posts: 57
Joined: Mon Aug 24, 2009 5:42 pm

Re: perf_counter based PAPI

Postby cjashfor » Wed Aug 26, 2009 7:11 pm

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.
cjashfor
 
Posts: 6
Joined: Wed Aug 26, 2009 2:25 am


Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest