If I can add just a little more to this: it has been our experience that you get the best operation from perf_events in kernel 2.6.33+ (as Stephane recommends). Some distros have not yet gotten up to that version yet. PAPI now supports perf_events, so you should be good to go with that. All this stuff is still shaking out, but good work has been done which we all appreciate.
----- Original Message -----
Sent: Wednesday, June 23, 2010 2:13:00 PM
Subject: perfmon2-devel Digest, Vol 32, Issue 9
Date: Wed, 23 Jun 2010 15:11:03 +0200
From: stephane eranian <eranian@...>
Subject: Re: [perfmon2] difference between kinds of perf-tools
To: lulu he <loloseed@...>
Content-Type: text/plain; charset=UTF-8
On Mon, Jun 21, 2010 at 9:55 AM, lulu he <loloseed@...> wrote:
> I wanna collect statistics of paralle applications every 10M
> instructions or 100M.
> I know serveral tools may do this,
> ie. oprofile, pfmon, PAPI, VTune.
> My question is this , I am not really sure what the above 4 tools
> share in common?
> A common kernel interface? OR a common library?
> As far as I know, pfmon needs perfmon2 kernel patch, PAPI needs
> perfctr kernel patch?
They do not share must in common, though PAPI can work on top
of perfctr or perfmon and soon perf_events.
The perf_events interface is now the official kernel API to access
the performance counters. So I advise you to use this API and tools.
You need a kernel >= 2.6.31. I recommend using 2.6.34. As for the
tool, it is called perf. It comes from the kernel sources. Some distros
may already provide a package for it, otherwise compile it from the
kernel source tree in tools/perf.
The perf tool can collect profiles. You can chose the event and the
sampling period. This is what you need.
> And which library(libpfmon,or?) should I use for collecting statistics
> every 10M instructions?
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. ?See the prize list and enter to win:
> _______________________________________________ perfmon2-devel mailing
> list perfmon2-devel@...
End of perfmon2-devel Digest, Vol 32, Issue 9